Android Question Remote Database Conn (RDC)"Problem with checked-in Statement, discarding."

frankinator

Member
Licensed User
Longtime User
Hi folks,
Thanks for sharing all of the great info! First post here, so I hope I'm doing it correctly.
I'm a vb guy so i'm pretty lost in the java scene and can use some help. I'm actually surprised I got as far as i did.

I'm getting this error on the RDC server command window. Has anyone else experienced this? I would expect it to crush a server pretty quickly if left alone.

"INFO: Problem with checked-in Statement, discarding." plus about 20+ lines of exception data to follow.

I am running as simple select command. (Select * from table)
It seems to execute fine, returns correct data to log in IDE.
I also set debugging = False so, i'm assuming it's a nasty error.

Win 2008 svr
Mariadb 5.5/ table with 3 rows.
Java 7 update 45
Java se dev kit 7 update 45

I can post the whole exception, but didn't want to muddy the thread until needed.

Side note: task scheduler doesn't like to start the batch file, anyone get RDC to auto-start on boot?

thx in advance

-F
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please post the full error message.

I also set debugging = False so, i'm assuming it's a nasty error.
The only effect of the Debug parameter in RDC is whether the config file is read again on each query. This is useful during development as it allows you to modify the queries without restarting the RDC server.

About the batch file. It is a single line script. You can set the task to start Java.exe with the correct arguments (as done in the batch file).
 
Upvote 0

frankinator

Member
Licensed User
Longtime User
Thank you for taking the time to look at this.
Understood, on the debugger and the start up tip. I wasn't sure if disabling the debugger was going to suppress additional logging. I appreciate you clarifying those for me.
Here is the full error. I included the initialization data from a fresh RDC start-up. The portion after "Command: query: select_test" is consistent on every request.

*****************
Nov 10, 2013 9:41:07 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
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,
dataSourceName -> 1hge14i8yifu13c1yynli|18d9ab8,
debugUnreturnedConnectionStackTraces -> false,
description -> null,
driverClass -> org.mariadb.jdbc.Driver,
factoryClassLocation -> null,
forceIgnoreUnresolvedTransactions -> false,
identityToken -> 1hge14i8yifu13c1yynli|18d9ab8,
idleConnectionTestPeriod -> 600,
initialPoolSize ->3,
jdbcUrl -> jdbc:mysql://localhost/nametest,
maxAdministrativeTaskTime ->0,
maxConnectionAge -> 0,
maxIdleTime -> 1800,
maxIdleTimeExcessConnections -> 0,
maxPoolSize -> 15,
maxStatements -> 150,
maxStatementsPerConnection -> 0,
minPoolSize -> 3,
numHelperThreads -> 3,
preferredTestQuery -> null,
properties -> {user=******, password=******},
propertyCycle -> 0,
statementCacheNumDeferredCloseThreads -> 0,
testConnectionOnCheckin -> false,
testConnectionOnCheckout -> false,
unreturnedConnectionTimeout -> 0,
userOverrides -> {},
usesTraditionalReflectiveProxies -> false ]
Command: query: select_test, took 323ms, client=192.168.1.1
Nov 10, 2013 9:41:07 AM com.mchange.v2.c3p0.stmt.GooGooStatementCache checkinStatement
INFO: Problem with checked-in Statement, discarding.
java.lang.NullPointerException at org.mariadb.jdbc.MySQLPreparedStatement.clearBatch(MySQLPreparedStatement.java:206)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.refreshStatement(GooGooStatementCache.java:627)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(GooGooStatementCache.java:272)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinAll(GooGooStatementCache.java:324)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkinAllCachedStatements(NewPooledConnection.java:759)
at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:389)
at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1225)
at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:86)
at anywheresoftware.b4a.remotedatabase.Servlet.doPost(Servlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
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(ContextHandler.java:937)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java: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.content(HttpConnection.java:1065)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:744)
 
Upvote 0

frankinator

Member
Licensed User
Longtime User
And the plot thickens...

I created a simple insert statement. ** sql.select_test=INSERT INTO `namedata` (`name`) VALUES ('ironman')** and that got a little ugly. However, it still completed the command successfully and inserted the record into the table.

This time I got an exception twice as big and B4A also responded with some feedback.


The B4A log is first, the RDC exception is second. This is from executing the insert statement above.


I may spin up another VM tonight with mysql and see if the result is similar. It would be a unfortunate if it's MariaDB being temperamental. I wonder if anyone else has tested it with MariaDB?


***B4A log***


startService: class anywheresoftware.b4a.samples.httputils2.httputils2service

** Service (httputils2service) Create **
** Service (httputils2service) Start **
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 STREAM</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /. Reason:
<pre> STREAM</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
Error: STREAM



***RDC response from insert statement***


INFO: Problem with checked-in Statement, discarding.

java.lang.NullPointerException

at org.mariadb.jdbc.MySQLPreparedStatement.clearBatch(MySQLPreparedStatement.java:206)

at com.mchange.v2.c3p0.stmt.GooGooStatementCache.refreshStatement(GooGooStatementCache.java:627)

at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(GooGooStatementCache.java:272)

at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinAll(GooGooStatementCache.java:324)

at com.mchange.v2.c3p0.impl.NewPooledConnection.checkinAllCachedStatements(NewPooledConnection.java:759)

at com.mchange.v2.c3p0.impl.NewPooledConnection.markClosedProxyConnection(NewPooledConnection.java:389)

at com.mchange.v2.c3p0.impl.NewProxyConnection.close(NewProxyConnection.java:1225)

at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:86)

at anywheresoftware.b4a.remotedatabase.Servlet.doPost(Servlet.java:52)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

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(ContextHandler.java:937)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java: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.content(HttpConnection.java:1065)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)


at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)

at java.lang.Thread.run(Thread.java:744)java.lang.NullPointerException

at org.mariadb.jdbc.MySQLResultSet.getMetaData(MySQLResultSet.java:402)

at com.mchange.v2.c3p0.impl.NewProxyResultSet.getMetaData(NewProxyResultSet.java:56)

at anywheresoftware.b4a.remotedatabase.Servlet.executeQuery(Servlet.java:145)

at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:78)

at anywheresoftware.b4a.remotedatabase.Servlet.doPost(Servlet.java:52)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

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(ContextHandler.java:937)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java: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.content(HttpConnection.java:1065)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)

at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)

at java.lang.Thread.run(Thread.java:744)

2013-11-10 11:35:28.822:WARN::/

java.lang.IllegalStateException: STREAM

at org.eclipse.jetty.server.Response.getWriter(Response.java:635)

at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:95)

at anywheresoftware.b4a.remotedatabase.Servlet.doPost(Servlet.java:52)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

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(ContextHandler.java:937)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java: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.content(HttpConnection.java:1065)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)


at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)

at java.lang.Thread.run(Thread.java:744)
 
Upvote 0

frankinator

Member
Licensed User
Longtime User
I spun up a clone of my server, removed Mariadb, removed jdbc jar.
Then installed mysql, driver and changed appropriate config lines and no exceptions at all. I was hoping I butchered something obvious(may still have), but i had mysql up and tested in less than 10 min.. so that rules out several items. :(

I really appreciate the connector, it's pretty awesome. (Thanks)
It would be great to hear if anyone has tried and successfully got Mariadb to hook in without the exceptions.
 
Upvote 0

frankinator

Member
Licensed User
Longtime User
I just wanted to give an update. I got mariadb to work. So far no problems, but I'm going to hammer on it in the next week or so.

The resolution at the time of this entry that worked for me:
Do not use the mariadb jdbc connecter driver. At the time of this entry, I tried the latest version (MariaDB Java Client 1.1.5) and it threw the above posted exceptions.

Use the "mysql-connector-java-5.1.27-bin.jar" instead and treat it like mysql with your driver class and jdbc url strings in the config.properties file included with RDC.

So far so good

-F
 
Upvote 0
Top