Android Question JRDC : WARNING: Could not load driverClass null

Ryan Pigeon

Member
Can anyone help?

My config file:

DriveClass=net.ucanaccess.jdbc.UcanaccessDriver
JdbcUrl=jdbc:ucanaccess://c:/users/public/persons.accdb;memory=true;

My Attributes:

#AdditionalJar: ucanaccess-4.0.4
#AdditionalJar: commons-lang-2.6
#AdditionalJar: commons-logging-1.1.3
#AdditionalJar: hsqldb-2.3.1
#AdditionalJar: jackcess-2.1.11

Thank u
 

Ryan Pigeon

Member
Thank you, Erel. I still get this error message even when I test the connection:

Waiting for debugger to connect...
Program started.
2021-11-14 08:54:15.172:INFO::main: Logging initialized @575ms to org.eclipse.jetty.util.log.StdErrLog
Nov 14, 2021 8:54:15 AM com.mchange.v2.log.MLog
INFO: MLog clients using java 1.4+ standard logging.
Nov 14, 2021 8:54:15 AM com.mchange.v2.c3p0.C3P0Registry
INFO: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
2021-11-14 08:54:15.584:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_311-b11
2021-11-14 08:54:15.608:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2021-11-14 08:54:15.608:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2021-11-14 08:54:15.609:INFO:eek:ejs.session:main: node0 Scavenging every 660000ms
2021-11-14 08:54:15.612:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@7a9273a8{/,file:///C:/Users/Bruno/Desktop/MSACCESS%20jRDC%20WORKING!/jRDC%20server/Objects/www,AVAILABLE}
2021-11-14 08:54:15.615:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened C:\Users\Bruno\Desktop\MSACCESS jRDC WORKING!\jRDC server\Objects\logs\b4j-2021_11_14.request.log
2021-11-14 08:54:15.624:INFO:eek:ejs.AbstractConnector:main: Started ServerConnector@77ec78b9{HTTP/1.1,[http/1.1]}{0.0.0.0:17178}
2021-11-14 08:54:15.625:INFO:eek:ejs.Server:main: Started @1030ms
Emulated network latency: 100ms
jRDC is running (version = 2.22)
Nov 14, 2021 8:54:16 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hgeby9al83x5vwljemku|3834d63f, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> null, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hgeby9al83x5vwljemku|3834d63f, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:ucanaccess://c:/users/public/persons.accdb, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 150, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> true, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
Nov 14, 2021 8:54:16 AM com.mchange.v2.c3p0.DriverManagerDataSource
WARNING: Could not load driverClass null
java.lang.ClassNotFoundException: null
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Nov 14, 2021 8:54:16 AM com.mchange.v2.c3p0.DriverManagerDataSource
WARNING: Could not load driverClass null
java.lang.ClassNotFoundException: null
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Nov 14, 2021 8:54:16 AM com.mchange.v2.c3p0.DriverManagerDataSource
WARNING: Could not load driverClass null
java.lang.ClassNotFoundException: null
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Loading: com/healthmarketscience/jackcess/index_codes_genleg.txt
 
Upvote 0

Ryan Pigeon

Member
OK! That issue (ahem!) solved.

When I try add entry to persons.accdb then this happens: (SORRY - I promise to leave everyone alone when I get this access to msaccess sorted using jRDC.)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; EVENTS_ID1 table: EVENTS</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /rdc. Reason:
<pre> org.hsqldb.HsqlException: integrity constraint violation: unique constraint or index violation; EVENTS_ID1 table: EVENTS</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>

</body>
</html>
 
Upvote 0

Ryan Pigeon

Member
Erel. Thank you for your help - appreciate it.

I have it at the point where it seems the data gets read from the access database, but when I try delete a record it does not delete it. Even when I try add a record it shows that it's added but does not show in the database. Any ideas?
 
Upvote 0

Ryan Pigeon

Member
1. Better to post the error from the server output.
2. Using MS Access as a database server is a mistake. Use a proper database instead.
3. Based on the error message, you tried to insert data that violated a unique or primary key constraint.
I totally understand about not using msaccess, but I have an application (that is 18 years old and still being used by many) that uses one and I just need to write a small app to read, delete & update records on this database.
 
Upvote 0

Ryan Pigeon

Member
Just to show server side jRDC: When I delete record, it shows deleted, but remains in database (c:/users/public/test.mdb)

Waiting for debugger to connect...
Program started.
2021-11-14 11:12:43.743:INFO::main: Logging initialized @568ms to org.eclipse.jetty.util.log.StdErrLog
Nov 14, 2021 11:12:43 AM com.mchange.v2.log.MLog
INFO: MLog clients using java 1.4+ standard logging.
Nov 14, 2021 11:12:44 AM com.mchange.v2.c3p0.C3P0Registry
INFO: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
2021-11-14 11:12:44.153:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_311-b11
2021-11-14 11:12:44.177:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2021-11-14 11:12:44.177:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2021-11-14 11:12:44.178:INFO:eek:ejs.session:main: node0 Scavenging every 600000ms
2021-11-14 11:12:44.181:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@76a3e297{/,file:///C:/Users/Bruno/Desktop/MySQL%20jRDC/jRDC_B4J%20Server/Objects/www,AVAILABLE}
2021-11-14 11:12:44.183:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened C:\Users\Bruno\Desktop\MySQL jRDC\jRDC_B4J Server\Objects\logs\b4j-2021_11_14.request.log
2021-11-14 11:12:44.193:INFO:eek:ejs.AbstractConnector:main: Started ServerConnector@43bd930a{HTTP/1.1,[http/1.1]}{0.0.0.0:8090}
2021-11-14 11:12:44.193:INFO:eek:ejs.Server:main: Started @1019ms
Emulated network latency: 100ms
jRDC is running (version = 2.22)
Nov 14, 2021 11:12:54 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hgeby9al88v8t51yx2xwu|5e025e70, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> net.ucanaccess.jdbc.UcanaccessDriver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hgeby9al88v8t51yx2xwu|5e025e70, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:ucanaccess://c:/users/public/test.mdb, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 150, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> true, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
Loading: com/healthmarketscience/jackcess/index_codes_genleg.txt
SELECT * FROM events WHERE month = ? AND id_user = ?
Command: query: getEvents, took: 449ms, client=192.168.1.105
DELETE * FROM events WHERE id = ?
Command: batch (size=1), took: 25ms, client=192.168.1.105
SELECT * FROM events WHERE month = ? AND id_user = ?
Command: query: getEvents, took: 3ms, client=192.168.1.105
SELECT * FROM events WHERE month = ? AND id_user = ?
Command: query: getEvents, took: 2ms, client=192.168.1.105


So, initially it reads the records into the listview, but when I try add or delete, it says "succesfull", but does not update database at all.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Just a small tip not related to your question. When you paste code, use the code menu and then paste your code

1. Click code

1636955721415.png


2. Paste your code

1636955834846.png


3. Click Continue..

PS: It would be nice to get to see this, I had just realized that there are a lot of people using Access here and me, wanting to convince them to rather use my apps, it would be awesome to show them proof of concept based on their existing ms access databases.

All the best. I will be following the thread for solutions.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Just found this, it could be worth checking out:

 
Upvote 0
Top