You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by ivanrc <ir...@indra.es> on 2007/11/07 12:10:05 UTC
Apache Geronimo 2.0.2 and Mysql data base pool
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.getDBDictionaryInstance(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.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:857)
at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(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.createEntityManager(EntityManagerFactoryImpl.java:192)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:145)
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(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.proceed(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.getConnection(TransactionCachingInterceptor.java:88)
at
org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
at
org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
at
org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
at
org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(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.
Re: Apache Geronimo 2.0.2 and Mysql data base pool
Posted by David Jencks <da...@yahoo.com>.
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.
>
Re: Apache Geronimo 2.0.2 and Mysql data base pool
Posted by "Jay D. McHugh" <ja...@joyfulnoisewebdesign.com>.
I use MySQL in a production project in Geronimo.
I haven't had any problems and actually converted it to EJB3 a couple of
months ago.
Jay
Jacek Laskowski wrote:
> On 11/7/07, ivanrc <ir...@indra.es> wrote:
>
>
>> <jta-data-source>plancPool</jta-data-source>
>>
>
> How was the data source deployed to Geronimo - a plan or via web
> console? What were the parameters?
>
>
>> Do you know if Mysql works well with apache geronimo?
>>
>
> Dunno.
>
> Jacek
>
>
Re: Apache Geronimo 2.0.2 and Mysql data base pool
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 11/7/07, ivanrc <ir...@indra.es> wrote:
> <jta-data-source>plancPool</jta-data-source>
How was the data source deployed to Geronimo - a plan or via web
console? What were the parameters?
> Do you know if Mysql works well with apache geronimo?
Dunno.
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Re: Apache Geronimo 2.0.2 and Mysql data base pool
Posted by ivanrc <ir...@indra.es>.
I use EJB3 and the same sample work well with an data source repository with
SQL Server driver, but with mysql no
this is my persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="TeamPU">
<description>Team</description>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>plancPool</jta-data-source>
</persistence-unit>
</persistence>
Do you know if Mysql works well with apache geronimo?
Jacek Laskowski wrote:
>
> On 11/7/07, ivanrc <ir...@indra.es> wrote:
>
>> 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:
> ...
>> Caused by: java.lang.NullPointerException
>> at
>> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionStart(ManagedJDBCConnection.java:81)
>
> Hi,
>
> Is it a EJB 2.1 or EJB 3.0 application? How did you create the pool?
> Do you use any geronimo-*.xml descriptors? What do they look like?
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>
>
--
View this message in context: http://www.nabble.com/Apache-Geronimo-2.0.2-and-Mysql-data-base-pool-tf4763948s134.html#a13629143
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Apache Geronimo 2.0.2 and Mysql data base pool
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 11/7/07, ivanrc <ir...@indra.es> wrote:
> 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:
...
> Caused by: java.lang.NullPointerException
> at
> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionStart(ManagedJDBCConnection.java:81)
Hi,
Is it a EJB 2.1 or EJB 3.0 application? How did you create the pool?
Do you use any geronimo-*.xml descriptors? What do they look like?
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl