Hi there,
I am using WASCE 2.0 with OpenJPA and the build-in connection pool. I can
sucessfully use one of the connection pools database via:
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/MyDataSource");
But I just can't get OpenJPA to run. Everytime i deploy ma application, i
get the following error:
[...]
Unable to resolve reference "JtaDataSourceWrapper" in gbean
default/MegaTestWAR/5.7/car?J2EEApplication=null,PersistenceUnitModule=WEB-INF/classes/,WebModule=default/MegaTestWAR/5.7/car,j2eeType=PersistenceUnit,name=MegaTestWAR
to a gbean matching the pattern
[?name=jdbc/MyDataSource#org.apache.geronimo.connector.outbound.ConnectionFactorySource]due
to: No matches for referencePatterns:
[?name=jdbc/MyDataSource#org.apache.geronimo.connector.outbound.ConnectionFactorySource]
org.apache.geronimo.common.DeploymentException: Unable to resolve
reference "JtaDataSourceWrapper" in gbean
default/MegaTestWAR/5.7/car?J2EEApplication=null,PersistenceUnitModule=WEB-INF/classes/,WebModule=default/MegaTestWAR/5.7/car,j2eeType=PersistenceUnit,name=MegaTestWAR
to a gbean matching the pattern
[?name=jdbc/MyDataSource#org.apache.geronimo.connector.outbound.ConnectionFactorySource]due
to: No matches for referencePatterns:
[?name=jdbc/MyDataSource#org.apache.geronimo.connector.outbound.ConnectionFactorySource]
[...]
persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
<persistence-unit name="MegaTestWAR">
<description>DataSource zum testen</description>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>jdbc/MyDataSource</jta-data-source>
</persistence-unit>
</persistence>
web.xml:
[...]
<resource-ref>
<res-ref-name>jdbc/MyDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
[...]
geronimo-web.xml:
[...]
<sys:dependencies>
<sys:dependency>
<sys:groupId>org.apache.geronimo.configs</sys:groupId>
<sys:artifactId>openjpa</sys:artifactId>
<sys:version>2.0.1</sys:version>
<sys:type>car</sys:type>
</sys:dependency>
<sys:dependency>
<sys:groupId>console.dbpool</sys:groupId>
<sys:artifactId>hbPriceSpy</sys:artifactId>
<sys:version>1.0</sys:version>
<sys:type>rar</sys:type>
</sys:dependency>
</sys:dependencies>
</sys:environment>
<context-root>/Test</context-root>
<sys:resource-ref>
<sys:ref-name>jdbc/MyDataSource</sys:ref-name>
<sys:resource-link>hbPriceSpy</sys:resource-link>
</sys:resource-ref>
[...]
Thanks a lot in advance. I am currently doing research on this problem since
a week, and I just can not figure it out.
Best regards,
BenLeino
--
View this message in context:
http://www.nabble.com/OpenJPA-with-Connection-Pool-Connection-tf4621682s134.html#a13198856
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.