WebSphere 8.5 + H2 + Hibernate - getClientInfo returns SQLClientInfoException

191 views
Skip to first unread message

S_D

unread,
Jun 27, 2013, 1:55:52 PM6/27/13
to h2-da...@googlegroups.com
Hi all!

I've created h2-datasource in WebSphere AS. It seems to be created successfully, at least Test connection works well. (Though is says that there was 1 warning that I can't find in any log).

After that I try to use this datasource in my application and get the following exception:

java.sql.SQLClientInfoException: null DSRA0010E: State SQL = null, Code = 0
    at org.h2.jdbc.JdbcConnection.getClientInfo(JdbcConnection.java:1624)
    at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.gatherAndDisplayMetaDataInfo(InternalGenericDataStoreHelper.java:1228)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.postGetConnectionHandling(WSRdbDataSource.java:2297)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnection(WSRdbDataSource.java:2229)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getConnection(WSManagedConnectionFactoryImpl.java:1778)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1546)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1102)
    at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2151)
    at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1830)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3357)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2643)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1545)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1028)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:644)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:611)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getContainerManagedConnection(WSJdbcDataSource.java:958)
    at com.ibm.ws.jpa.management.JPACMDataSource.getConnection(JPACMDataSource.java:44)
    at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70)
    at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:281)
    at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)


I see in H2 Javadoc that getClientInfo method is not supported. What does it mean& How can I tell WebSphere to not use this not supported method?

I tried to set JDBC Connection pool property: JDBC30DataSource = true (read it in some forum), it does not help.

Can anybody advice me anything, please.

Thanks in advance.

Noel Grandin

unread,
Jun 28, 2013, 3:25:01 AM6/28/13
to h2-da...@googlegroups.com, S_D
I've added sufficient getClientInfo support to make Websphere happy.
By tomorrow it will show up in our nightly build here:
http://www.h2database.com/automated/h2-latest.jar

S_D

unread,
Jun 28, 2013, 5:15:13 AM6/28/13
to h2-da...@googlegroups.com, S_D
Noel, thanks a lot for your concern!

But I still can't succeed of getting this work. It's relly hard to make WebSphere be happy(

Did you compile classes for this jar using Java 7? The problem is that WebSphere uses IBM JDK v. 6.0. Could you please point me where I can find sources and what should I fix in them to make this getClientInfo method work. Then I'll build them with IBM java and probably it will help.

p.s. I now see such error:
java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/h2/jdbcx/JdbcDataSource, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:262)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
at java.security.AccessController.doPrivileged(AccessController.java:314)
at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:204)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:665)
at java.lang.ClassLoader.loadClass(ClassLoader.java:644)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at com.ibm.ws.rsadapter.DSConfigHelper.loadClass(DSConfigHelper.java:1504)
at com.ibm.ws.rsadapter.DSConfigHelper.createDataSource(DSConfigHelper.java:723)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.createNewDataSource(WSRdbDataSource.java:2869)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.<init>(WSRdbDataSource.java:1245)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.setDataSourceProperties(WSManagedConnectionFactoryImpl.java:2643)

пятница, 28 июня 2013 г., 9:25:01 UTC+2 пользователь Noel Grandin написал:

Noel Grandin

unread,
Jun 28, 2013, 5:36:18 AM6/28/13
to h2-da...@googlegroups.com, S_D
Hi

We should be building using Java6, but perhaps something has gone wrong,
our auto-builder has been unhappy lately.

See here for checking out from SVN and building from source:
http://h2database.com/html/build.html#using_eclipse

Also, right now, google-code is messing around and won't allow me to
commit to SVN, so you'll need to apply the attached patch to the checked
out code in order to test.

Regards, Noel.
patch.txt

S_D

unread,
Jun 28, 2013, 6:31:37 AM6/28/13
to h2-da...@googlegroups.com, S_D
Hi, 

>Also, right now, google-code is messing around and won't allow me to 
commit to SVN, so you'll need to apply the attached patch to the checked 
out code in order to test. 

Thanks for the link. But Google code doesn't let me to do checkout either(


Svetlana

Noel Grandin

unread,
Jun 28, 2013, 10:51:57 AM6/28/13
to h2-da...@googlegroups.com, S_D
Looks like google-code is back up, so I've committed this fix.

S_D

unread,
Jun 28, 2013, 10:53:35 AM6/28/13
to h2-da...@googlegroups.com, S_D
Great! I'll give it a try! I'll write the results.

Many thanks!

пятница, 28 июня 2013 г., 18:51:57 UTC+4 пользователь Noel Grandin написал:

S_D

unread,
Jun 28, 2013, 5:24:15 PM6/28/13
to h2-da...@googlegroups.com, S_D
Noel,
thanks a lot for your help! It's working!

I've build classes with IBM JDK, replaced classes in original jar. And everything worked.

All the best!
Reply all
Reply to author
Forward
0 new messages