For sure that hsqldb is installed --> [ 125] [Active ] [ ] [ ] [ 60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.hsqldb/1.8.0.10_1
I have also added DynamicImport-Package : * into the bundle of openjpa On Tue, Apr 12, 2011 at 2:30 PM, Jamie G. <[email protected]> wrote: > Have you installed the JDBC driver? The exception looks similar to > when one starts a Master/Slave failover configuration of Karaf/SMX > without the driver jar installed for the backend database. > > Cheers, > Jamie > > On Tue, Apr 12, 2011 at 9:50 AM, Charles Moulliard <[email protected]> > wrote: >> Hi, >> >> I have configured OpenJPA to use a JTA/XA Datasource on ServiceMix but >> when I try to insert data in the DB, openJPA generates the following >> error : >> >> Caused by: java.lang.RuntimeException: There were errors initializing >> your configuration: <openjpa-2.1.0-r422266:1071316 fatal user error> >> org.apache.openjpa.util.UserException: A JDBC Driver or DataSource >> class name must be specified in the ConnectionDriverName property. >> at >> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:76) >> at >> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:844) >> at >> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:732) >> 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:597) >> at >> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:295) >> >> >> The property >> <jta-data-source>osgi:service/javax.sql.DataSource/(transactional=true)</jta-datasource> >> in the persistence.xml file point to the XADataSource exposed as an >> osgi service >> >> Persistence >> ************** >> <persistence-unit name="reportincident" transaction-type="JTA"> >> >> >> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> >> >> >> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> >> >> >> <jta-data-source>osgi:service/javax.sql.DataSource/(transactional=true)</jta-data-source> >> <!-- Required by openJPA to update sequence table outside of >> Global Tx Management --> >> >> <non-jta-data-source>osgi:service/javax.sql.DataSource/(transactional=false)</non-jta-data-source> >> >> <class>com.mycompany.persistence.model.Incident</class> >> >> <exclude-unlisted-classes>true</exclude-unlisted-classes> >> >> <!-- openjpa & HSQLDB --> >> <properties> >> <property name="openjpa.jdbc.SynchronizeMappings" >> >> value="buildSchema(SchemaAction='add,deleteTableContents')"/> >> <property name="openjpa.Log" >> value="commons"/> >> <property name="openjpa.jdbc.DBDictionary" >> value="hsql(useSchemaName=true)"/> >> <property name="openjpa.jdbc.Schema" >> value="PUBLIC"/> >> <property name="openjpa.TransactionMode" >> value="managed"/> >> <property name="openjpa.ManagedRuntime" >> >> value="jndi(TransactionManagerName=aries:services/javax.transaction.TransactionManager)"/> >> <property name="openjpa.Multithreaded" >> value="true"/> >> <property name="openjpa.TransactionMode" >> value="managed"/> >> <!--<property name="openjpa.ConnectionFactoryMode" >> value="managed"/>--> >> </properties> >> >> >> >> Blueprint config of the DataSource >> **************************************** >> <service auto-export="interfaces" ref="jta"> >> <service-properties> >> <entry key="transactional" value="true"/> >> </service-properties> >> </service> >> >> <service auto-export="interfaces" ref="jta"> >> <service-properties> >> <entry key="transactional" value="true"/> >> </service-properties> >> </service> >> >> Any idea is welcome. >> >> >> Regards, >> >> Charles Moulliard >> >> Sr. Principal Solution Architect - FuseSource >> Apache Committer >> >> Blog : http://cmoulliard.blogspot.com >> Twitter : http://twitter.com/cmoulliard >> Linkedin : http://www.linkedin.com/in/charlesmoulliard >> Skype: cmoulliard >> >
