Android Question Remote Database Connector - Java webserver- Help me - Aiuto

vibby

Member
Licensed User
ENG
Hello,
I followed the RDC tutoria for connect to any remote DB.
At the end, the tutorial tells to do a test.

SS-2013-08-04_17.06.17.png

But instead of giving me connection ok, it gives me error.
I don't understand.
Can anyone help me?
Thank you so much.
Alessio
Down the error.

ITA
Ciao a tutti.
ho seguito il tutorial RDC Connect to any remote DB.
Alla fine del tutorial ti dice di fare un test.

SS-2013-08-04_17.06.17.png

Però invece di darmi connessione ok, mi da il seguente errore, ma non riesco a capire il perché.
Qualcuno mi può aiutare?
Grazie Mille.
Alessio
Posto di seguito l errore.

------------------------------------------------------------------------------------------------------
C:\Program Files\Java\jdk1.8.0_161>"C:\Program Files\Java\jdk1.8.0_161\bin\java"
-Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteS
erver
B4A Remote Database Connecter (version 0.9)
loading: C:\Program Files\Java\jdk1.8.0_161\config.properties
2018-02-08 10:46:48.412:INFO::jetty-7.4.2.v20110526
2018-02-08 10:46:48.506:INFO::started o.e.j.s.ServletContextHandler{/,null}
feb 08, 2018 10:46:48 AM com.mchange.v2.log.MLog <clinit>
INFORMAZIONI: MLog clients using java 1.4+ standard logging.
feb 08, 2018 10:46:50 AM com.mchange.v2.c3p0.C3P0Registry banner
INFORMAZIONI: Initializing c3p0-0.9.2.1 [built 20-March-2013 11:16:28 +0000; deb
ug? true; trace: 10]
2018-02-08 10:46:51.064:INFO::Started SelectChannelConnector@0.0.0.0:17178 START
ING
feb 08, 2018 10:47:07 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource g
etPoolManager
INFORMAZIONI: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSourc
e [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000
, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailu
re -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, co
nnectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dat
aSourceName -> 1hgeby99twesbjv73x8q1|3cb5cdba, debugUnreturnedConnectionStackTra
ces -> false, description -> null, driverClass -> net.ucanaccess.jdbc.Ucanaccess
Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false
, identityToken -> 1hgeby99twesbjv73x8q1|3cb5cdba, idleConnectionTestPeriod -> 6
00, initialPoolSize -> 3, jdbcUrl -> jdbc:ucanaccess://c:/alessio/lavori/bar_mob
ile/db/bar.accdb, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdle
Time -> 1800, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatement
s -> 150, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads ->
3, preferredTestQuery -> null, properties -> {}, propertyCycle -> 0, statementC
acheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnecti
onOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, us
esTraditionalReflectiveProxies -> false ]
feb 08, 2018 10:47:07 AM com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolT
hread run
AVVERTENZA: An Error forced the closing of Thread[C3P0PooledConnectionPoolManage
r[identityToken->1hgeby99twesbjv73x8q1|3cb5cdba]-HelperThread-#2,5,main]. Will a
ttempt to reconstruct, but this might mean that something bad is happening.
java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/util/ErrorHandl
er
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(Driver
ManagerDataSource.java:112)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:129)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.ut
il.ErrorHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more

feb 08, 2018 10:47:07 AM com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolT
hread run
AVVERTENZA: An Error forced the closing of Thread[C3P0PooledConnectionPoolManage
r[identityToken->1hgeby99twesbjv73x8q1|3cb5cdba]-HelperThread-#0,5,main]. Will a
ttempt to reconstruct, but this might mean that something bad is happening.
java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/util/ErrorHandl
er
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(Driver
ManagerDataSource.java:112)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:129)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.ut
il.ErrorHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more

Exception in thread "C3P0PooledConnectionPoolManager[identityToken->1hgeby99twes
bjv73x8q1|3cb5cdba]-HelperThread-#2" java.lang.NoClassDefFoundError: com/healthm
arketscience/jackcess/util/ErrorHandler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(Driver
ManagerDataSource.java:112)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:129)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.ut
il.ErrorHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more
Exception in thread "C3P0PooledConnectionPoolManager[identityToken->1hgeby99twes
bjv73x8q1|3cb5cdba]-HelperThread-#0" java.lang.NoClassDefFoundError: com/healthm
arketscience/jackcess/util/ErrorHandler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(Driver
ManagerDataSource.java:112)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:129)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.ut
il.ErrorHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more
feb 08, 2018 10:47:07 AM com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolT
hread run
AVVERTENZA: An Error forced the closing of Thread[C3P0PooledConnectionPoolManage
r[identityToken->1hgeby99twesbjv73x8q1|3cb5cdba]-HelperThread-#1,5,main]. Will a
ttempt to reconstruct, but this might mean that something bad is happening.
java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/util/ErrorHandl
er
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(Driver
ManagerDataSource.java:112)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:129)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.ut
il.ErrorHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more

Exception in thread "C3P0PooledConnectionPoolManager[identityToken->1hgeby99twes
bjv73x8q1|3cb5cdba]-HelperThread-#1" java.lang.NoClassDefFoundError: com/healthm
arketscience/jackcess/util/ErrorHandler
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(Driver
ManagerDataSource.java:112)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManag
erDataSource.java:129)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnecti
on(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionRe
sourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResource
Pool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPe
ndingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourc
ePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.ru
n(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(Thre
adPoolAsynchronousRunner.java:648)
Caused by: java.lang.ClassNotFoundException: com.healthmarketscience.jackcess.ut
il.ErrorHandler
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more
java.sql.SQLException: An attempt by a client to checkout a Connection has timed
out.
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:687)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(A
bstractPoolBackedDataSource.java:140)
at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538
)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:478)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:937)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
406)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:871)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.
java:589)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:1048)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)

at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:41
1)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
dPoint.java:535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd
Point.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:529)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out whil
e waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePo
ol@3cf85b1b -- timeout at awaitAvailable()
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicRes
ourcePool.java:1416)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(
BasicResourcePool.java:606)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicR
esourcePool.java:526)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConn
ectionInUse(C3P0PooledConnectionPool.java:755)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConne
ction(C3P0PooledConnectionPool.java:682)
... 21 more
Terminare il processo batch (S/N)?

-------------------------------------------------------------------------------------------------------
 

vibby

Member
Licensed User
Hello,
I have read the tutorial of the jrdc2, i have download the server zip file, but I don't understand first and second step.

1. Add the relevant JDBC jar file to the additional libraries folder.
2. Add a reference to this jar


Code:
#AdditionalJar: mysql-connector-java-5.1.27-bin

I don't understand, where I must put my jdbc jar file and where I must write the up line code.

Help me...... ;(
 
Upvote 0
Top