geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Apache Geronimo 2.0.2 and Mysql data base pool
Date Wed, 07 Nov 2007 16:33:28 GMT
This is really a strange error.  The only way I can see it coming  
about is if the mysql datasource.getConnection method returned null.   
However there might be a hidden bug somewhere, so knowing exactly how  
you set up the tranql datasource would be good.

I suggest you try deploying a second, non-transactional, datasource  
just like your first one but with <no-transaction/> instead of <xa- 
transaction/> or <local-transaction/> in the plan, and use this in  
the non-jta-datasource in persistence.xml.  I have not yet succeeded  
in getting openjpa sequences to work without this non-jta-datasource,  
and the errors are frequently mysterious without it.

thanks
david jencks

On Nov 7, 2007, at 3:10 AM, ivanrc wrote:

>
> Hello,
>
>  I´m using pache Geronimo 2.0.2 and I´ve created a MySQL database  
> pool with
> driver mysql-connector-java/3.1.13 and also I´ve tryied with driver
> mysql-connector-java/5.1.5
>
> When I try to use in ejbs, I obtain an exception like this:
>
> <openjpa-1.0.0-r420667:568756 fatal general error>
> org.apache.openjpa.persistence.PersistenceException: null
> 	at
> org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary 
> (DBDictionaryFactory.java:101)
> 	at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInst 
> ance(JDBCConfigurationImpl.java:569)
> 	at
> org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration 
> (MappingRepository.java:1221)
> 	at
> org.apache.openjpa.lib.conf.Configurations.configureInstance 
> (Configurations.java:467)
> 	at
> org.apache.openjpa.lib.conf.Configurations.configureInstance 
> (Configurations.java:392)
> 	at
> org.apache.openjpa.lib.conf.PluginValue.instantiate 
> (PluginValue.java:102)
> 	at org.apache.openjpa.lib.conf.ObjectValue.instantiate 
> (ObjectValue.java:82)
> 	at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepository 
> Instance(OpenJPAConfigurationImpl.java:857)
> 	at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepository 
> Instance(OpenJPAConfigurationImpl.java:852)
> 	at
> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly 
> (AbstractBrokerFactory.java:628)
> 	at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker 
> (AbstractBrokerFactory.java:169)
> 	at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker 
> (DelegatingBrokerFactory.java:142)
> 	at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa 
> nager(EntityManagerFactoryImpl.java:192)
> 	at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa 
> nager(EntityManagerFactoryImpl.java:145)
> 	at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa 
> nager(EntityManagerFactoryImpl.java:56)
> 	at TeamBean.findByPrimaryKey(TeamBean.java:20)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:146)
> 	at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee 
> d(ReflectionInvocationContext.java:129)
> 	at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke 
> (InterceptorStack.java:67)
> 	at
> org.apache.openejb.core.stateless.StatelessContainer._invoke 
> (StatelessContainer.java:203)
> 	at
> org.apache.openejb.core.stateless.StatelessContainer.invoke 
> (StatelessContainer.java:165)
> 	at
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_ 
> METHOD(EjbRequestHandler.java:212)
> 	at
> org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:120)
> 	at
> org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest 
> (EjbDaemon.java:164)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 122)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 84)
> 	at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java: 
> 60)
> 	at org.apache.openejb.server.ServiceLogger.service 
> (ServiceLogger.java:73)
> 	at
> org.apache.openejb.server.ServiceAccessController.service 
> (ServiceAccessController.java:55)
> 	at org.apache.openejb.server.ServiceDaemon$1.run 
> (ServiceDaemon.java:117)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.sql.SQLException
> 	at org.tranql.connector.jdbc.DataSource.getConnection 
> (DataSource.java:61)
> 	at
> org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection 
> (DelegatingDataSource.java:106)
> 	at
> org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection 
> (DecoratingDataSource.java:87)
> 	at
> org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary 
> (DBDictionaryFactory.java:91)
> 	... 34 more
> Caused by: javax.resource.ResourceException: Unknown throwable when  
> trying
> to enlist connection in tx
> 	at
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor 
> .getConnection(TransactionEnlistingInterceptor.java:65)
> 	at
> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.g 
> etConnection(TransactionCachingInterceptor.java:88)
> 	at
> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.get 
> Connection(ConnectionHandleInterceptor.java:43)
> 	at
> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection 
> (TCCLInterceptor.java:39)
> 	at
> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.g 
> etConnection(ConnectionTrackingInterceptor.java:66)
> 	at
> org.apache.geronimo.connector.outbound.AbstractConnectionManager.alloc 
> ateConnection(AbstractConnectionManager.java:87)
> 	at org.tranql.connector.jdbc.DataSource.getConnection 
> (DataSource.java:56)
> 	... 37 more
> Caused by: java.lang.NullPointerException
> 	at
> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionStart( 
> ManagedJDBCConnection.java:81)
> 	at
> org.tranql.connector.AbstractManagedConnection 
> $LocalTransactionImpl.begin(AbstractManagedConnection.java:189)
> 	at
> org.apache.geronimo.connector.outbound.LocalXAResource.start 
> (LocalXAResource.java:107)
> 	at
> org.apache.geronimo.transaction.manager.TransactionImpl.enlistResource 
> (TransactionImpl.java:208)
> 	at
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor 
> .getConnection(TransactionEnlistingInterceptor.java:54)
> 	... 43 more
> 12:06:51,643 INFO  [Transaction] TX Required: setRollbackOnly() on
> transaction  
> org.apache.geronimo.transaction.manager.TransactionImpl@1357096
> 12:06:51,643 INFO  [Transaction] TX Required: Rolling back transaction
> org.apache.geronimo.transaction.manager.TransactionImpl@1357096
>
> Can you help me?
>
>
>
> -- 
> View this message in context: http://www.nabble.com/Apache- 
> Geronimo-2.0.2-and-Mysql-data-base-pool-tf4763948s134.html#a13625028
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message