Hi Matt,

The error message you're seeing is from OpenJPA. It produces the same error message whether there's no datasource defined or the datasource is defined but can't be looked up.

However, in this case I notice you only have a jta datsource defined. It couldn't hurt to also define a <non-jta-datasource>. Whether it's required depends on the JPA implementation (some optimise reads), but better safe than sorry.

I also notice your version numbers are pretty high. Which version of WAS are you using? Is it the Liberty profile? If it is, you'll need to add resource references for your datasource and then look it up using a java:comp/ namespace.

Holly

--
Want to read more?
www.manning.com/cummins Enterprise OSGi in Action



On 21 Nov 2011, at 21:00, Matt Madhavan <mattmadha...@gmail.com> wrote:

Hello,
I'm using Apache Aries 0.4 (from IBM WAS) and OpenJPA 2.1.1-SNAPSHOT also from IBM.

I have a data source defined in WAS: Jndi Name : jdbc/dupcheckcts

I have my persistence.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd ">
        <persistence-unit name="DuCk_jpa" transaction-type="JTA">
                
                <description>Persistence xxxxxxxxx</description>            
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</ provider>

            <jta-data-source>jdbc/dupcheckcts</jta-data-source>
                
                <class>com.xxxx.entity.Clx</class>
                <class>com.xxxx.entity.Clxxxxxl</class>
                <class>com.xxxx.entity.Clxxxxxt</class>
                <class>com.xxxx.entity.Clxxxxxx</class>

..........
                <properties>
<property name="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=TRACE, SQL=TRACE" /> <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported" /> <property name="openjpa.Compatibility" value="StrictIdentityValues=false" />
        </properties>

When I deploy the EBA and start the app I'm getting the following error:

Caused by: <openjpa-2.1.1-SNAPSHOT-r422266:1141200 fatal user error> org.apache.openjpa.persistence.ArgumentException: 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.getDBDictionaryInstance( JDBCConfigurationImpl.java:602) at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration (MappingRepository.java:1510)


Any ideas please?

Thanks in advance!

Thanks
Matt

Reply via email to