Android Question jRDC2 Error in RDCConnector - ClassCastException

Bernard Harris

Member
Licensed User
When trying to run a query in jRDC2 I am getting an error on line 36 in RDCConnector (Return pool.GetConnection). I've changed my test client code according to the documentation and setup the jdbc driver in the Additional directory. Unfortunately I can't see what's causing this.
Sample of error:
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 -> 2sa4lq9snp641n12w8fwa|574caa3f, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.ibm.jtopenlite.database.jdbc.JDBCDriver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 2sa4lq9snp641n12w8fwa|574caa3f, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:jtopenlite://10.110.25.146, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTime...
Error occurred on line: 36 (RDCConnector)
java.lang.ClassCastException: java.lang.StackOverflowError cannot be cast to java.lang.Exception
at anywheresoftware.b4a.BA.setLastException(BA.java:359)
etc.

Also, on the client side I get this error:
Error: java.net.SocketTimeoutException
 
Last edited:

Bernard Harris

Member
Licensed User
All I had to change in the jRDC2 code was the AdditionalJar for the jdbc driver. Then I set the config.properties file to the correct jdbc info.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Have you tried it with the other jdbc driver (the non-open source one - jt400.jar)?
 
Upvote 0

Bernard Harris

Member
Licensed User
I've now tried it with the jt400.jar and it works fine within RDC and updates the date/time but using the strings of 12/18/2017 and 12:00:00. But I did not try this within jRDC2 yet. I will try that next.
 
Upvote 0

Bernard Harris

Member
Licensed User
I believe that worked, by switching to the jt400.jar in jRDC2. I did get a test transaction to update. Now to implement in the application and test.
 
Upvote 0

Bernard Harris

Member
Licensed User
Since I have to use B4J in order to build the java program, and I haven't really used this before, what is the best way to build this and then run it as a job on the server, so it starts each time the server reboots?
 
Upvote 0
Top