How to setup datasource for MS Access MDB file using UCanAccess on Ubuntu 14.04 LTS

Hey Guys,

I’m looking for some help regarding the steps I have to follow to setup
UCanAccess on my Ubuntu box for a small ColdFusion site that uses MS Access
for a db. I have everything working in terms of lucee but I can’t seem to
figure out how to get the UCanAccess datasource to connect to my MS Access
db. Here is what I’ve done so far:

  1. I downloaded the ucanaccess.zip file and extracted all jar files and put
    them in /opt/lucee/lib/ folder.
  2. I’ve renamed hypersonic-hsqldb.jar to hypersonic-hsqldb_old.jar
  3. I tried using hsqldb.jar that came with the ucanaccess.zip file but it
    didn’t work. So renamed it to hypersonic-hsqldb.jar.
  4. I login to the Lucee server admin console and I try to setup the
    datasource using the following:

Type: Other - JDBC DriverClass:
net.ucanaccess.jdbc.UcanloadDriverConnection:
jdbc:ucanaccess:///home/MyUserName/www/database/MyMsAccessDB.mdb

I’m getting this error:

*The UCANACCESS_HOME system variable isn’t defined: it should
be:-DUCANACCESS_HOME=*Where do I have to define this/these variables and
what values should they be set to? I’ve searched all over the web but I
can’t seem to find anything. Is this even possible to do on Ubuntu or will
this only work on Windows?

Any help is appreciated.

Thank you,

Mike

Michael Aushana wrote on 2016-05-30:

The UCANACCESS_HOME system variable isn’t defined:
it should be:
-DUCANACCESS_HOME=

This looks like an argument to the servlet engine at startup - e.g. Tomcat (maybe check catalina.sh for the startup)

Looks like an environment variable needs to be set

Mark Drew

  • Sent by typing with my thumbs.> On 31 May 2016, at 06:36, Hugo Ahlenius <@Hugo_Ahlenius> wrote:

Michael Aushana wrote on 2016-05-30:

The UCANACCESS_HOME system variable isn’t defined:
it should be:
-DUCANACCESS_HOME=

This looks like an argument to the servlet engine at startup - e.g. Tomcat (maybe check catalina.sh for the startup)


Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there…

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/198901d1bafe%24541a8a20%24fc4f9e60%24%40oxel.net.
For more options, visit https://groups.google.com/d/optout.

Hi Mike

A few things:

  1. I downloaded the ucanaccess.zip file and extracted all jar files and put them in /opt/lucee/lib/ folder.
    That should make it available, you should put it in a sub folder of it’s own I think
  2. I’ve renamed hypersonic-hsqldb.jar to hypersonic-hsqldb_old.jar
    the name of hypersonic.jar doesn’t matter, if its extension is .jar it will still be loaded, so if you don’t want it maybe rename it .old rather than old.jar
  3. I tried using hsqldb.jar that came with the ucanaccess.zip file but it didn’t work. So renamed it to hypersonic-hsqldb.jar.
    Again, the name of the file doesn’t matter except the extension so hypersonic-hsqldb is still being loaded.
  4. I login to the Lucee server admin console and I try to setup the datasource using the following:

Type: Other - JDBC Driver
Class: net.ucanaccess.jdbc.UcanloadDriver
Connection: jdbc:ucanaccess:///home/MyUserName/www/database/MyMsAccessDB.mdb

I’m getting this error:

The UCANACCESS_HOME system variable isn’t defined:
it should be:
-DUCANACCESS_HOME=

See:
java - UCANACCESS_HOME system variable not set - Stack Overflow http://stackoverflow.com/questions/34464565/ucanaccess-home-system-variable-not-set

Where do I have to define this/these variables and what values should they be set to? I’ve searched all over the web but I can’t seem to find anything. Is this even possible to do on Ubuntu or will this only work on Windows?
you can set this in the opt/lucee/tomcat/bin/setenv.sh file.

Regards

Mark drew