openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Halbert <j...@su3analytics.com>
Subject Issues with dhcp connection pooling?
Date Sun, 06 Feb 2011 20:06:43 GMT
Hi,

I'm getting the  exception at the bottom of the mail.

Could the error
"com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Connection.close() has already been called. Invalid operation in this
state." be a consequence of using dhcp connection pooling?

My persistence.xml properties file looks like this:

        <properties>
            <property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema"/>
			<property name="openjpa.ConnectionDriverName"
value="org.apache.commons.dbcp.BasicDataSource"/>
			<property name="openjpa.ConnectionProperties"
value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost:3306/sitedelta,Username=sitedelta,Password=sitedelta"/>
                   
			<property name="openjpa.DataCache" value="true"/>
			<property name="openjpa.DataCacheTimeout" value="3000"/>
			<property name="openjpa.RemoteCommitProvider" value="sjvm"/>
        </properties>


If this were an issue with dhcp does anyone have an example
persistence.xml using c3p0?

Thanks
Joel




Exception in thread "PageProcessingQueue" java.lang.ExceptionInInitializerError
        at org.apache.openjpa.lib.util.ConcreteClassGenerator.newInstance(ConcreteClassGenerator.java:132)
        at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:107)
        at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:118)
        at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:107)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:978)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:963)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getConnection(JDBCStoreManager.java:266)
        at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:198)
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1003)
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:861)
        at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792)
        at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
        at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:288)
        at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302)
        at com.su3analytics.sitedelta.dao.PageDeltaSummaryDao$4.get(PageDeltaSummaryDao.java:80)
        at com.su3analytics.sitedelta.dao.PageDeltaSummaryDao$4.get(PageDeltaSummaryDao.java:72)
        at com.su3analytics.jpa.BaseDao.get(BaseDao.java:21)
        at com.su3analytics.sitedelta.dao.PageDeltaSummaryDao.getLastByClientCrawl(PageDeltaSummaryDao.java:72)
        at com.su3analytics.crawler.processor.PageDeltaProcessor.process(PageDeltaProcessor.java:77)
        at com.su3analytics.crawler.PageProcessingQueueImpl$ProcessingTask.run(PageProcessingQueueImpl.java:94)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedConstructorAccessor21.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.openjpa.lib.util.ConcreteClassGenerator.newInstance(ConcreteClassGenerator.java:130)
        ... 22 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection.close()
has already been called. Invalid operation in this state.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message