Something's a little out of whack with this example... Your call stack is referencing the derby connection pooling (dbcp)... But, I don't see this being referenced in your posted persistence.xml. Are you sure you have your application configured and packaged correctly:
Caused by: java.lang.UnsupportedOperationException: Not supported by BasicDataSource at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:902) Kevin On Tue, Jun 3, 2008 at 6:16 AM, Adam Hardy <[EMAIL PROTECTED]> wrote: > Hi David, > > in case you are still looking for a reply: I use H2 with OpenJPA and I > don't see this problem. It's difficult to say what the problem is because > the exception doesn't mention what operation it is that BasicDataSource > doesn't support. > > Are you sure your connection is good? > > > David Hofmann on 20/05/08 16:57, wrote: > >> I was trying to configure openejb (openjpa as the JPA provider) with >> H2 Database. I get the exception shown here. >> >> H2 Version = 1.0.72 >> OpenJPA/EJB Version = 3.0 >> >> persistence.xml configuration >> <persistence-unit name="crmPU" transaction-type="RESOURCE_LOCAL"> >> <properties> >> <property name="openjpa.jdbc.SynchronizeMappings" >> value="buildSchema(ForeignKeys=true)"/> >> >> <property name="openjpa.jdbc.DBDictionary" >> value="org.apache.openjpa.jdbc.sql.H2Dictionary"/> >> <property name="openjpa.ConnectionURL" value=" jdbc:h2:file:c: >> \dev\db\acercatepy"/> >> <property name="openjpa.ConnectionDriverName" >> value="org.h2.Driver"/> >> <property name="openjpa.ConnectionUserName" value="sa"/> >> <property name="openjpa.ConnectionPassword" value=""/> >> <property name="openjpa.Log" value="DefaultLevel=TRACE, >> Tool=TRACE"/> >> </properties> >> </persistence-unit> >> >> I have done a lot of search but I couldn't find the solution. >> >> I will appreciate a lot if somebody's help to show me whre I am doing >> wrong. Probably I am not understanding how the configuration part of >> openejb is working. >> >> Thank you very much in advance >> >> Greetings, >> >> P.D.: Sorry about my English, I am still learning it >> Exception in thread "main" javax.ejb.EJBException: The bean >> encountered a non-application exception.; nested exception is: >> <openjpa-1.0.1-r420667:592145 nonfatal general error> >> org.apache.openjpa.persistence.PersistenceException: There were errors >> initializing your configuration: <openjpa-1.0.1-r420667:592145 fatal >> store error> org.apache.openjpa.util.StoreException: Not supported by >> BasicDataSource >> at >> >> org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSo >> >> urceFactory.java: >> 234) >> at >> >> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java: >> >> 709) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at >> >> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java: >> >> 289) >> at >> >> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java: >> >> 1463) >> at >> >> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java: >> >> 638) >> 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: >> >> 56) >> at >> >> org.apache.openejb.persistence.JtaEntityManagerRegistry.getEntityManager(JtaEntityManagerRegistry.java: >> >> 105) >> at >> >> org.apache.openejb.persistence.JtaEntityManager.getEntityManager(JtaEntityManager.java: >> >> 61) >> at >> >> org.apache.openejb.persistence.JtaEntityManager.persist(JtaEntityManager.java: >> >> 97) >> at >> >> com.acercatepy.personalsbe.ejb.EJBServerImpl.giveMeResults(EJBServerImpl.java: >> >> 23) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at org.apache.openejb.core.interceptor.ReflectionInvocationContext >> $Invocation.invoke(ReflectionInvocationContext.java:158) >> at >> >> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java: >> >> 141) >> at >> >> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java: >> >> 67) >> at >> >> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java: >> >> 210) >> at >> >> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java: >> >> 188) >> at >> >> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java: >> >> 165) >> at >> >> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: >> >> 217) >> at >> >> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java: >> >> 77) >> at >> >> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java: >> >> 321) >> at >> >> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java: >> >> 49) >> at $Proxy19.giveMeResults(Unknown Source) >> at com.acercatepy.personalsbe.test.TestAll.main(TestAll.java:29) >> Caused by: java.lang.UnsupportedOperationException: Not supported by >> BasicDataSource >> at >> >> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java: >> 902) >> at >> >> org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java: >> >> 113) >> at >> >> org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java: >> >> 93) >> at >> >> org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java: >> >> 226) >> ... 32 more >> >> >> >
