2/9/15 7:58:33 AM Registering 'net.ucanaccess.jdbc.UcanaccessDriver' with the Driver Manager.
2/9/15 7:58:33 AM Connecting to database server.
2/9/15 7:58:33 AM com/healthmarketscience/jackcess/util/ErrorHandler
java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/util/ErrorHandler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.linoma.commons.DriverManagerPlus.getConnection(Unknown Source)
at com.linoma.dpa.resources.DatabaseResource.test(Unknown Source)
at com.linoma.dpa.resources.ResourceTester.test(Unknown Source)
at com.linoma.dpa.j2ee.forms.ConfigureResourceForm.test(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:78)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
at javax.faces.component.UICommand.broadcast(UICommand.java:143)
at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:329)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEventsForPhase(AjaxViewRoot.java:304)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:261)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:474)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.linoma.dpa.j2ee.IECompatibilityModeFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.linoma.dpa.security.SecurityFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.util.ErrorHandler
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please, just check the jackcess version
in your classpath, or if there are
more than one jackcess jar.
The right version is that in the
related ucanaccess distribution.
Cheers Marco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Running Console also connect to the target database.
C:\My_Server\userdata\lib>console
Please, enter the full path to the access file (.mdb or accdb): \My_Server\Myfiles\Databases\goanywhere.accdb
Loaded Tables:
TABLE1
Loaded Queries:
TABLE1 QUERY
Loaded Indexes:
Primary Key on TABLE1 Columns: (ID)
UCanAccess>
Copyright (c) 2012 Marco Amadei
UCanAccess version 2.0.9.5
You are connected!!
Type quit to exit
Commands end with ;
use:
export <pathToCsv>;
for exporting into a .csv file the result set from the last executed query
UCanAccess>
What else can we do? Is there a CLASSPATH variable in another context, like within JVM? Are assigning the right value to the CLASSPATH variable?
Any advice is appreciated.
Thanks
Sergio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, your classpath setting is totally pointless(as it should point to a list of jar files, not to a directory, unless it directly contains class files), the console.bat body sets successfully the classpath before launching java, and the connection between console application and the db succeed through the jdbc driver ucanaccess.
So, what's the question? I've lost the context...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, nothing strange in the classpath but consider the classloading may be dynamic and depend on the application server you're using, so you likely should check its documentation. The path variable should point to a directory containing the java executable. Also consider this forum isn't for generic java advice.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The application (GoAnywhere Director) that we are using requires to define
a JDBC URL
The following syntax:
jdbc:ucanaccess://c:/goanywhere.accdb
works all the way up to retrieve data from MS Access Tables and Queries.
when we move it to
jdbc:ucanaccess://p:/goanywhere.accdb where "p" is a network drive it does not work, it does not work either when the network path of the P drive is used.
Is there any limitation on UcanAccess to reach out to network drives?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Absolutely no limitations. Use the network path as you would to access to file via java.io.
The GoAnywhere Director must have rights in read/write mode to the network directory.
Last edit: Marco Amadei 2015-07-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your were correct. After making GoAnywhere Director to run using an Active Directory account we have been able to connect using the network path to non-local MS Access Databases.
JDBC URL was set as:
jdbc:ucanaccess://\server_name/share_name/Database_Folder/goanywhere.accdb
and JDBC driver called as: net.ucanaccess.jdbc.UcanaccessDriver
For the record We also had to make the version.txt file to match the UCanAccess version 2.0.9.5 and adjust the CLASSPATH environment variable as you suggested.
Thank you for all of your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Once I placed all the *.jar files including ucanaccess jar together , I am no more gettting that message (com/healthmarketscience/jackcess/util/ErrorHandler)
But now my JDBC URL doesn't seem to be correct when I am testing from GoAnywhere Directory/MFT
accdb file residing in a network shared location
I am trying different combination but not sure what is the correct way
I have just tested the ucanaccess JDBC Driver from LibreOffice using its JDBC connector capability and the right syntax to access an MS Access database file is :
jdbc: ucanaccess:///your_database_folder/your_database_file.accdb (or .mdb)
Be careful: There are really three slashes because the prefix URLs is "ucanaccess://" and the beginning of the path on an Unix-like OS is "/", so in my case, "/home/vincent/Bases/test.accdb" where the "Bases" folder is a network share with Read/Write/eXecution permissions (even if you don't need to have the execution right).
I believed UcanaccessDriver didn't support JDBC URL too but seeing the "UcanaccessDriver.class" into the "ucanaccess-VERSION.jar" file with GHex (a sector editor), I saw I did a mistake. The author had put a "AcceptURLs" comment into his script.
Tested with LibreOffice 5.1.6.2 on Peppermint 7 (based on Ubuntu 16.04 LTS)
Best regards,
Vincent.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks
This is my setup.
Name: JDBC2Access
Description: UCanAccess JDBC Driver
JDBC Driver: net.ucanaccess.jdbc.UcanaccessDriver
JDBC URL: jdbc:ucanaccess:\Myfiles\Databases\goanywhere.accdb
This is the results of the connection test:
2/9/15 7:58:33 AM Registering 'net.ucanaccess.jdbc.UcanaccessDriver' with the Driver Manager.
2/9/15 7:58:33 AM Connecting to database server.
2/9/15 7:58:33 AM com/healthmarketscience/jackcess/util/ErrorHandler
java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/util/ErrorHandler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.linoma.commons.DriverManagerPlus.getConnection(Unknown Source)
at com.linoma.dpa.resources.DatabaseResource.test(Unknown Source)
at com.linoma.dpa.resources.ResourceTester.test(Unknown Source)
at com.linoma.dpa.j2ee.forms.ConfigureResourceForm.test(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component._MethodExpressionToMethodBinding.invoke(_MethodExpressionToMethodBinding.java:78)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
at javax.faces.component.UICommand.broadcast(UICommand.java:143)
at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:329)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEventsForPhase(AjaxViewRoot.java:304)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:261)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:474)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.linoma.dpa.j2ee.IECompatibilityModeFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.linoma.dpa.security.SecurityFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.util.ErrorHandler
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Please, just check the jackcess version
in your classpath, or if there are
more than one jackcess jar.
The right version is that in the
related ucanaccess distribution.
Cheers Marco
all of the copies are jackcess-2.0.8.jar
Derek
We have changed the Classpath variable in the Windows Server to look like:
CLASSPATH=C:\My_Server\userdata\lib;
This how the directory looks like:
Directory of C:\My_server\userdata\lib
07/22/2015 02:32 PM <DIR> .
07/22/2015 02:32 PM <DIR> ..
07/22/2015 12:38 PM 630 console.bat
07/22/2015 12:38 PM 462 console.sh
07/22/2015 02:32 PM 616 console2.bat
11/12/2012 11:56 PM 787 copyright.txt
07/22/2015 02:12 PM <DIR> lib
07/22/2015 02:16 PM <DIR> licenses
12/27/2010 02:46 PM 438 readme.txt
07/22/2015 12:38 PM 300,177 ucanaccess-2.0.9.5.jar
01/17/2015 03:13 PM 18 version.txt
Running Console also connect to the target database.
C:\My_Server\userdata\lib>console
Please, enter the full path to the access file (.mdb or accdb): \My_Server\Myfiles\Databases\goanywhere.accdb
Loaded Tables:
TABLE1
Loaded Queries:
TABLE1 QUERY
Loaded Indexes:
Primary Key on TABLE1 Columns: (ID)
UCanAccess>
Copyright (c) 2012 Marco Amadei
UCanAccess version 2.0.9.5
You are connected!!
Type quit to exit
Commands end with ;
use:
export <pathToCsv>;
for exporting into a .csv file the result set from the last executed query
UCanAccess>
What else can we do? Is there a CLASSPATH variable in another context, like within JVM? Are assigning the right value to the CLASSPATH variable?
Any advice is appreciated.
Thanks
Sergio
You may want to look at how UCanAccess' "console.bat" sets up the CLASSPATH and try to do the same for your application.
No, your classpath setting is totally pointless(as it should point to a list of jar files, not to a directory, unless it directly contains class files), the console.bat body sets successfully the classpath before launching java, and the connection between console application and the db succeed through the jdbc driver ucanaccess.
So, what's the question? I've lost the context...
Good morning Marco, this is how we have set the environment variables
H:>echo %path%
C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsP
owerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\
H:>echo %classpath%
C:\Program Files\Linoma Software\GoAnywhere\userdata\lib\lib\hsqldb.jar;C:\Program Files\Linoma Software\GoAnywhere\user
data\lib\lib\jackcess-2.1.0.jar;C:\Program Files\Linoma Software\GoAnywhere\userdata\lib\lib\commons-lang-2.6.jar;C:\Pro
gram Files\Linoma Software\GoAnywhere\userdata\lib\lib\commons-logging-1.1.1.jar;C:\Program Files\Linoma Software\GoAnyw
here\userdata\lib\ucanaccess-2.0.9.5.jar;
The question was if we were setting up correctly the environment variables? Do you see any thing strange on the path to Java itself?
Thanks
No, nothing strange in the classpath but consider the classloading may be dynamic and depend on the application server you're using, so you likely should check its documentation. The path variable should point to a directory containing the java executable. Also consider this forum isn't for generic java advice.
The application (GoAnywhere Director) that we are using requires to define
a JDBC URL
The following syntax:
jdbc:ucanaccess://c:/goanywhere.accdb
works all the way up to retrieve data from MS Access Tables and Queries.
when we move it to
jdbc:ucanaccess://p:/goanywhere.accdb where "p" is a network drive it does not work, it does not work either when the network path of the P drive is used.
Is there any limitation on UcanAccess to reach out to network drives?
Thanks
Absolutely no limitations. Use the network path as you would to access to file via java.io.
The GoAnywhere Director must have rights in read/write mode to the network directory.
Last edit: Marco Amadei 2015-07-28
Your were correct. After making GoAnywhere Director to run using an Active Directory account we have been able to connect using the network path to non-local MS Access Databases.
JDBC URL was set as:
jdbc:ucanaccess://\server_name/share_name/Database_Folder/goanywhere.accdb
and JDBC driver called as: net.ucanaccess.jdbc.UcanaccessDriver
For the record We also had to make the version.txt file to match the UCanAccess version 2.0.9.5 and adjust the CLASSPATH environment variable as you suggested.
Thank you for all of your help.
Hi There,
Our GoA is installed in Linux server.
I have placed the complete folder strcuture of Ucanaccess to ~userdata/lib directory of GoA server.
awsuxgaft01d:Linux:eaimgo1d: /home/eaimgo1d/goa/GoAnywhere/userdata/lib --> ls -ltr
total 17928
-rw-r--r-- 1 eaimgo1d eaimgr 16 Feb 3 15:22 version.txt
-rw-r--r-- 1 eaimgo1d eaimgr 387604 Feb 3 15:22 ucanaccess-5.0.0.jar
-rw-r--r-- 1 eaimgo1d eaimgr 558 Feb 3 15:22 copyright.txt
-rwxr--r-- 1 eaimgo1d eaimgr 467 Feb 3 15:22 console.sh
-rw-r--r-- 1 eaimgo1d eaimgr 660 Feb 3 15:22 console.bat
drwxr-xr-x 2 eaimgo1d eaimgr 6144 Feb 4 14:59 lib
drwxr-xr-x 2 eaimgo1d eaimgr 6144 Feb 4 14:59 licenses
drwxr-xr-x 2 eaimgo1d eaimgr 6144 Feb 4 14:59 loader
I am receiving the same issue while configuring the DB connection in GoA MFT
Error:
com/healthmarketscience/jackcess/util/ErrorHandler
I have mentioned JDBC Driver - net.ucanaccess.jdbc.UcanaccessDriver
JDBC URL is - jdbc:ucanaccess://\BRTAP253/e:/csapps\Bid_Cost\BidCost.accdb
Can someone pls. help urgently.
Regards,
Harish
Once I placed all the *.jar files including ucanaccess jar together , I am no more gettting that message (com/healthmarketscience/jackcess/util/ErrorHandler)
But now my JDBC URL doesn't seem to be correct when I am testing from GoAnywhere Directory/MFT
accdb file residing in a network shared location
I am trying different combination but not sure what is the correct way
jdbc:ucanaccess:\/BRTAP253/csapps/Bid_Cost/Bid_Cost.accdb
M Driver 'net.ucanaccess.jdbc.UcanaccessDriver' does not support JDBC URL 'jdbc:ucanaccess:\/BRTAP253/csapps/Bid_Cost/Bid_Cost.accdb'.
Hi everybody,
I have just tested the ucanaccess JDBC Driver from LibreOffice using its JDBC connector capability and the right syntax to access an MS Access database file is :
jdbc: ucanaccess:///your_database_folder/your_database_file.accdb (or .mdb)
Be careful: There are really three slashes because the prefix URLs is "ucanaccess://" and the beginning of the path on an Unix-like OS is "/", so in my case, "/home/vincent/Bases/test.accdb" where the "Bases" folder is a network share with Read/Write/eXecution permissions (even if you don't need to have the execution right).
I believed UcanaccessDriver didn't support JDBC URL too but seeing the "UcanaccessDriver.class" into the "ucanaccess-VERSION.jar" file with GHex (a sector editor), I saw I did a mistake. The author had put a "AcceptURLs" comment into his script.
Tested with LibreOffice 5.1.6.2 on Peppermint 7 (based on Ubuntu 16.04 LTS)
Best regards,
Vincent.