Android Question B4J Could not load driverClass net.sourceforge.jtds.jdbc.Driver

Status
Not open for further replies.

Georg Machacek

New Member
Licensed User
I tried real hard but can't solve this problem.
I think maybe it will be somthing easy.
Hope somebody could help.

****************************************
PART OF CONFIG.PROPERTIES FILE

DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds:sqlserver://localhost/TOPTECH

****************************************

****************************************
PART OF MAIN FILE

'jdbc jar file
#AdditionalJar: mssql-jdbc-7.2.1.jre11.jar

****************************************

****************************************
PART OF THE PROTOKOLL

Waiting for debugger to connect...
Program started.
2019-03-25 21:40:20.217:INFO::main: Logging initialized @591ms to org.eclipse.jetty.util.log.StdErrLog
Mär 25, 2019 9:40:20 PM com.mchange.v2.log.MLog
INFORMATION: MLog clients using java 1.4+ standard logging.
Mär 25, 2019 9:40:20 PM com.mchange.v2.c3p0.C3P0Registry
INFORMATION: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
2019-03-25 21:40:20.826:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_192-b12
2019-03-25 21:40:20.867:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2019-03-25 21:40:20.867:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2019-03-25 21:40:20.869:INFO:eek:ejs.session:main: node0 Scavenging every 600000ms
2019-03-25 21:40:20.874:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@1d8d30f7{/,file:///C:/toptech/jRDC2/jRDC/Objects/www,AVAILABLE}
2019-03-25 21:40:20.877:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened C:\toptech\jRDC2\jRDC\Objects\logs\b4j-2019_03_25.request.log
2019-03-25 21:40:20.892:INFO:eek:ejs.AbstractConnector:main: Started ServerConnector@1e7c7811{HTTP/1.1,[http/1.1]}{0.0.0.0:17178}
2019-03-25 21:40:20.893:INFO:eek:ejs.Server:main: Started @1269ms
Emulated network latency: 100ms
jRDC is running (version = 2.22)
Mär 25, 2019 9:40:34 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
INFORMATION: 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 -> 1hge9saa11enrkqh1o6aolt|445b84c0, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> net.sourceforge.jtds.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge9saa11enrkqh1o6aolt|445b84c0, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:jtds:sqlserver://localhost/TOPTECH, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, max...
Mär 25, 2019 9:40:34 PM com.mchange.v2.c3p0.DriverManagerDataSource
WARNUNG: Could not load driverClass net.sourceforge.jtds.jdbc.Driver
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
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)
Mär 25, 2019 9:40:34 PM com.mchange.v2.c3p0.DriverManagerDataSource
WARNUNG: Could not load driverClass net.sourceforge.jtds.jdbc.Driver
java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver


I am not sure where to place the class driver file and how to set the class path.
Hope you can help!
THANK YOU
GEORG
 

Computersmith64

Well-Known Member
Licensed User
B4J? You've posted in the B4A forum...

Anyway, if it's B4J - try using "com.microsoft.sqlserver.jdbc.SQLServerDriver" for your driver class. That's what I use with the mssql-jdbc-6.2.2.jre8.jar library.

Also - use code tags for posting code & quote tags for your logs. Makes your post much easier to read.

- Colin.
 
Status
Not open for further replies.
Top