geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim085 <sim...@hotmail.com>
Subject Re: @PersistenceContext not working
Date Fri, 24 Dec 2010 13:35:04 GMT


> Did you remember to add dependencies .. to openejb-jar.xml

Hello, thanks for your reply. After reading your post I created an
openejb-jar.xml file. I tried looking on the net to see how exactly to do
this, but being my first time I really found it hard to understand what I
need to include or not. I also tried to download the Eclipse plugin but this
did not work.

Finally I have managed to arrive to this.

-----
<?xml version="1.0" encoding="UTF-8"?>

<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
    <enterprise-beans>
        <session>
	            <ejb-name>UserEntityManagerBean</ejb-name>
		    <resource-ref>
		        <ref-name>jdbc/My_JPA_JTA_DS</ref-name>
		        <resource-link>My_JPA_JTA_DS</resource-link>
		    </resource-ref>
		</session>
    </enterprise-beans>
</openejb-jar>
-----

When I deploy my ejb module (jar file that is) with the above
openejb-jar.xml descriptor I get no error regarding the file itself. However
I am still getting the same error as before. 

-----
he application was not deployed.
Unable to resolve reference "JtaDataSourceWrapper"
    in gbean
default/myjpa-1.0-SNAPSHOT.jar/1293197470229/car?EJBModule=default/myjpa-1.0-SNAPSHOT.jar/1293197470229/car,J2EEApplication=null,PersistenceUnitModule=ejb.jar,j2eeType=PersistenceUnit,name=My_JPA_PU
    to a gbean matching the pattern
[?name=jdbc/My_JPA_JTA_DS#org.apache.geronimo.naming.ResourceSource]
    due to: No matches for referencePatterns:
[?name=jdbc/My_JPA_JTA_DS#org.apache.geronimo.naming.ResourceSource]
-----


The problem I am having is obviously related with my lack of knowledge on
Geronimo, OpenEJB and the files that these two framework require. As I said
I am following a book to learn this technology and no where was there
written about the need for these additional files. 

Does anyone know about any documentation that shows how I can achieve the
above in terms of Geronimo and OpenEJB? 

How do you people build your geronimo-application.xml and openejb-jar.xml?

-- 
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Re-PersistenceContext-not-working-tp2131727p2141115.html
Sent from the Users mailing list archive at Nabble.com.

Mime
View raw message