You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by my_forum <my...@ukr.net> on 2008/10/16 15:44:13 UTC
Unable to resolve reference "JtaDataSourceWrapper"
Guys,
I searched through the forum and amoung the sumilar posts I have not found
the precise solution.
When I deploy connection pool through Geronimo Console everything is OK the
only thing I need is to specify the dependency:
<dep:dependency>
<dep:groupId>console.dbpool</dep:groupId>
<dep:artifactId>puma2DS</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>rar</dep:type>
</dep:dependency>
, but when I deploy the Oracle Pool as a EAR connection module (I use alt-dd
reference to deployment plan), I get the following exception:
Unable to resolve reference "JtaDataSourceWrapper"
in gbean
default/puma2/1.0/car?EJBModule=puma2.persistence.jar,J2EEApplication=default/puma2/1.0/car,PersistenceUnitModule=puma2.persistence.jar,j2eeType=PersistenceUnit,name=puma2.persistence
to a gbean matching the pattern
[?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
due to: No matches for referencePatterns:
[?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
org.apache.geronimo.common.DeploymentException: Unable to resolve reference
"JtaDataSourceWrapper"
in gbean
default/puma2/1.0/car?EJBModule=puma2.persistence.jar,J2EEApplication=default/puma2/1.0/car,PersistenceUnitModule=puma2.persistence.jar,j2eeType=PersistenceUnit,name=puma2.persistence
to a gbean matching the pattern
[?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
due to: No matches for referencePatterns:
[?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
at
org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:516)
my persistence.xml file looks as follows:
<?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="puma2.persistence">
<description>Oracle Data Source</description>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>jdbc/puma2DS</jta-data-source>
</persistence-unit>
</persistence>
Could anybody help me with this?
Thanks in advance!
--
View this message in context: http://www.nabble.com/Unable-to-resolve-reference-%22JtaDataSourceWrapper%22-tp20013967s134p20013967.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Unable to resolve reference "JtaDataSourceWrapper"
Posted by my_forum <my...@ukr.net>.
my_forum wrote:
>
> Guys,
> I searched through the forum and amoung the sumilar posts I have not found
> the precise solution.
>
> When I deploy connection pool through Geronimo Console everything is OK
> the only thing I need is to specify the dependency:
>
>
> <dep:dependency>
> <dep:groupId>console.dbpool</dep:groupId>
> <dep:artifactId>puma2DS</dep:artifactId>
> <dep:version>1.0</dep:version>
> <dep:type>rar</dep:type>
> </dep:dependency>
>
>
> , but when I deploy the Oracle Pool as a EAR connection module (I use
> alt-dd reference to deployment plan), I get the following exception:
>
> Unable to resolve reference "JtaDataSourceWrapper"
> in gbean
> default/puma2/1.0/car?EJBModule=puma2.persistence.jar,J2EEApplication=default/puma2/1.0/car,PersistenceUnitModule=puma2.persistence.jar,j2eeType=PersistenceUnit,name=puma2.persistence
> to a gbean matching the pattern
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> org.apache.geronimo.common.DeploymentException: Unable to resolve
> reference "JtaDataSourceWrapper"
> in gbean
> default/puma2/1.0/car?EJBModule=puma2.persistence.jar,J2EEApplication=default/puma2/1.0/car,PersistenceUnitModule=puma2.persistence.jar,j2eeType=PersistenceUnit,name=puma2.persistence
> to a gbean matching the pattern
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> at
> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:516)
>
>
> my persistence.xml file looks as follows:
>
> <?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="puma2.persistence">
> <description>Oracle Data Source</description>
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
> <jta-data-source>jdbc/puma2DS</jta-data-source>
> </persistence-unit>
> </persistence>
>
> Could anybody help me with this?
> Thanks in advance!
>
I have the same exception when I configure my pool in console and make
invalid reference to the pool in my persistence.xml file
<persistence-unit name="puma2.persistence">
<description>Oracle Data Source</description>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>unexistingDS</jta-data-source>
</persistence-unit>
looks like I need just to specify another(correct) JNDI name to my pool.
So what is a correct JNDI name to my pool when it's deployed as application
connector module?
Any reply will be helpful for me
--
View this message in context: http://www.nabble.com/Unable-to-resolve-reference-%22JtaDataSourceWrapper%22-tp20013967s134p20090654.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Unable to resolve reference "JtaDataSourceWrapper"
Posted by Lin Sun <li...@gmail.com>.
Hi, I am not too familar with openjpa but I'll give a try :-)
I think the jta-data-source in persistence.xml should refer to the
datasource name configured in database pool. For example, for our
sample-datasource in our 2.1.2 sample
(http://geronimo.apache.org/2008/10/03/geronimo-samples-v212-released.html),
the names are SampleTxDatasource and SampleNoTxDatasource, based on
the database pool plan:
...
<name>SampleTxDatasource</name>
...
<name>SampleNoTxDatasource</name>
...
Also, from all examples I looked at, it always uses 2 datasource names
(one is the TxDataSource, the other one is NoTxDatasource).
Unfortunately, there isn't an easy way to set up such a pool with
admin console, see JIRA
https://issues.apache.org/jira/browse/GERONIMO-4331
And these two datasources can be referred as below in persistence.xml
(you can check out the bank example):
<jta-data-source>SampleTxDatasource</jta-data-source>
<non-jta-data-source>SampleNoTxDatasource</non-jta-data-source>
I think, if you create your pool from console, the default datasource
name is puma2DS instead of jdbc/puma2DS, and you can double check that
before you deploy your pool (there is a show plan button to allow you
to view the plan).
P.S. I found some reply from David Jencks a while back ago on the same prob:
http://markmail.org/message/rlhorr23z7akikbo#query:JtaDataSourceWrapper+page:1+mid:6x3ou4tzrk7zfeci+state:results
Lin
On Thu, Oct 16, 2008 at 9:44 AM, my_forum <my...@ukr.net> wrote:
>
> Guys,
> I searched through the forum and amoung the sumilar posts I have not found
> the precise solution.
>
> When I deploy connection pool through Geronimo Console everything is OK the
> only thing I need is to specify the dependency:
>
>
> <dep:dependency>
> <dep:groupId>console.dbpool</dep:groupId>
> <dep:artifactId>puma2DS</dep:artifactId>
> <dep:version>1.0</dep:version>
> <dep:type>rar</dep:type>
> </dep:dependency>
>
>
> , but when I deploy the Oracle Pool as a EAR connection module (I use alt-dd
> reference to deployment plan), I get the following exception:
>
> Unable to resolve reference "JtaDataSourceWrapper"
> in gbean
> default/puma2/1.0/car?EJBModule=puma2.persistence.jar,J2EEApplication=default/puma2/1.0/car,PersistenceUnitModule=puma2.persistence.jar,j2eeType=PersistenceUnit,name=puma2.persistence
> to a gbean matching the pattern
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> org.apache.geronimo.common.DeploymentException: Unable to resolve reference
> "JtaDataSourceWrapper"
> in gbean
> default/puma2/1.0/car?EJBModule=puma2.persistence.jar,J2EEApplication=default/puma2/1.0/car,PersistenceUnitModule=puma2.persistence.jar,j2eeType=PersistenceUnit,name=puma2.persistence
> to a gbean matching the pattern
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/puma2DS#org.apache.geronimo.naming.ResourceSource]
> at
> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:516)
>
>
> my persistence.xml file looks as follows:
>
> <?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="puma2.persistence">
> <description>Oracle Data Source</description>
>
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
> <jta-data-source>jdbc/puma2DS</jta-data-source>
> </persistence-unit>
> </persistence>
>
> Could anybody help me with this?
> Thanks in advance!
> --
> View this message in context: http://www.nabble.com/Unable-to-resolve-reference-%22JtaDataSourceWrapper%22-tp20013967s134p20013967.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>