You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by MarWestermann <Ma...@gmx.de> on 2008/10/04 16:49:15 UTC

Problems with the "Bean Managed Persistence with JPA" tut

Hi,
I have the following question / problem. First here are my environment
things:
Geronimo:
Version  	2.1.2
Build 	2008.07.30-14:23:01.771-0400
Java Version  	1.6.0_07
Java Vendor 	Sun Microsystems Inc.

Dev:
eclipse 3.3 + geronimo 2.1 Server Adapter

I followed the tutorial at:
http://cwiki.apache.org/GMOxDOC21/bean-managed-persistence-with-jpa.html

When I came to the step where to deploy the ear-file, I got the following
error-message:
D:\geronimo-tomcat6-javaee5-2.1.2\bin>deploy.bat --user system --password
manage
r deploy C:\Temp\BeanManagedJPA-EAR.ear
Using GERONIMO_BASE:   D:\geronimo-tomcat6-javaee5-2.1.2
Using GERONIMO_HOME:   D:\geronimo-tomcat6-javaee5-2.1.2
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME:        C:\Programme\Java\jdk1.6.0_07\jre
    Error: Unable to distribute BeanManagedJPA-EAR.ear: At least one
    deployment problem:[org.apache.geronimo.common.DeploymentException:
    Could not resolve reference at deploy time for query
   
?name=persistence/AccountUnit#org.apache.geronimo.persistence.PersistenceUni
tGBean.
    No GBean references found.]

Does anybody know, what this means?

Thanks for any help,
Marco
-- 
View this message in context: http://www.nabble.com/Problems-with-the-%22Bean-Managed-Persistence-with-JPA%22-tut-tp19812693s134p19812693.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Problems with the "Bean Managed Persistence with JPA" tut

Posted by MarWestermann <Ma...@gmx.de>.
Hi,

ohhh I'm such a DAU (in germany its the abbreviation for "most stupid user
one can imagine"
It's so embarrassing!

I renamed persistance.xml --> persistence.xml and now it works :wistle:

but I really didn't see it. I'm so sorry having anoyed you with this.

Marco
-- 
View this message in context: http://www.nabble.com/Problems-with-the-%22Bean-Managed-Persistence-with-JPA%22-tut-tp19812693s134p19824569.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Problems with the "Bean Managed Persistence with JPA" tut

Posted by MarWestermann <Ma...@gmx.de>.
Another hint I found out:
the error-log of geronimo says each time I try to deploy the application:

6576:  18:56:48,109 WARN [EARConfigBuilder] Unable to delete 2 files while
recursively deleting directory
D:\geronimo-tomcat6-javaee5-2.1.2\repository\default\BeanManagedJPA-EAR\1.0\BeanManagedJPA-EAR-1.0.car
The first file that could not be deleted was:
 
D:\geronimo-tomcat6-javaee5-2.1.2\repository\default\BeanManagedJPA-EAR\1.0\BeanManagedJPA-EAR-1.0.car\BeanManagedJPA-EJB.jar

-- 
View this message in context: http://www.nabble.com/Problems-with-the-%22Bean-Managed-Persistence-with-JPA%22-tut-tp19812693s134p19814358.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Problems with the "Bean Managed Persistence with JPA" tut

Posted by MarWestermann <Ma...@gmx.de>.


José Arcángel Salazar Delgado wrote:
> 
> El Saturday 04 October 2008 09:49:15 MarWestermann escribió:
>> Hi,
>> I have the following question / problem. First here are my environment
>> things:
>> Geronimo:
>> Version  	2.1.2
>> Build 	2008.07.30-14:23:01.771-0400
>> Java Version  	1.6.0_07
>> Java Vendor 	Sun Microsystems Inc.
>>
>> Dev:
>> eclipse 3.3 + geronimo 2.1 Server Adapter
>>
>> I followed the tutorial at:
>> http://cwiki.apache.org/GMOxDOC21/bean-managed-persistence-with-jpa.html
>>
>> When I came to the step where to deploy the ear-file, I got the following
>> error-message:
>> D:\geronimo-tomcat6-javaee5-2.1.2\bin>deploy.bat --user system --password
>> manage
>> r deploy C:\Temp\BeanManagedJPA-EAR.ear
>> Using GERONIMO_BASE:   D:\geronimo-tomcat6-javaee5-2.1.2
>> Using GERONIMO_HOME:   D:\geronimo-tomcat6-javaee5-2.1.2
>> Using GERONIMO_TMPDIR: var\temp
>> Using JRE_HOME:        C:\Programme\Java\jdk1.6.0_07\jre
>>     Error: Unable to distribute BeanManagedJPA-EAR.ear: At least one
>>     deployment problem:[org.apache.geronimo.common.DeploymentException:
>>     Could not resolve reference at deploy time for query
>>
>> ?name=persistence/AccountUnit#org.apache.geronimo.persistence.PersistenceUn
>>i tGBean.
>>     No GBean references found.]
>>
>> Does anybody know, what this means?
>>
> Hello.
> That's sound like geronimo didn't create the  AccountUnit Gbean that its 
> created in the persistence.xml. Check that file. Specifically this part:
> 
> <persistence-unit name="AccountUnit" transaction-type="JTA">
>   <description>ContainerManagedJPA</description>
>  
> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>   <jta-data-source>AccountDS</jta-data-source>
>   <class>sample.jpa.Account</class>
>   <class>sample.jpa.Person</class>
>  </persistence-unit>
> </persistence>
> 
>> Thanks for any help,
>> Marco
> 

Hi, thank you for your fast help.

In between I did the following:

I downloaded the newest eclipse ganimede Distribution and did the steps in
the tutorial again. (Eclipse Version: 3.4.1) Thereby I copied the code from
the tutorial into my project-files 1to1. I checked the openejb-jar.xml twice
and it is exactly as in the tutorial descriped.

But when I try to deploy the new ear-file I get the same error again.
The only step I did wich is not descriped in the tutorial is to export the
ear-file. Therefor I rigth-clicked on the project: BeanManagedJPA-EAR and in
the context-menu I choose Export --> EAR file. Then I choose the location:
C:\Temp\BeanManagedJPA-EAR.ear in the destination step. Has that been wrong?

Thanks,

Marco

-- 
View this message in context: http://www.nabble.com/Problems-with-the-%22Bean-Managed-Persistence-with-JPA%22-tut-tp19812693s134p19814119.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Problems with the "Bean Managed Persistence with JPA" tut

Posted by José Arcángel Salazar Delgado <ar...@linuxsoluciones.com>.
El Saturday 04 October 2008 09:49:15 MarWestermann escribió:
> Hi,
> I have the following question / problem. First here are my environment
> things:
> Geronimo:
> Version  	2.1.2
> Build 	2008.07.30-14:23:01.771-0400
> Java Version  	1.6.0_07
> Java Vendor 	Sun Microsystems Inc.
>
> Dev:
> eclipse 3.3 + geronimo 2.1 Server Adapter
>
> I followed the tutorial at:
> http://cwiki.apache.org/GMOxDOC21/bean-managed-persistence-with-jpa.html
>
> When I came to the step where to deploy the ear-file, I got the following
> error-message:
> D:\geronimo-tomcat6-javaee5-2.1.2\bin>deploy.bat --user system --password
> manage
> r deploy C:\Temp\BeanManagedJPA-EAR.ear
> Using GERONIMO_BASE:   D:\geronimo-tomcat6-javaee5-2.1.2
> Using GERONIMO_HOME:   D:\geronimo-tomcat6-javaee5-2.1.2
> Using GERONIMO_TMPDIR: var\temp
> Using JRE_HOME:        C:\Programme\Java\jdk1.6.0_07\jre
>     Error: Unable to distribute BeanManagedJPA-EAR.ear: At least one
>     deployment problem:[org.apache.geronimo.common.DeploymentException:
>     Could not resolve reference at deploy time for query
>
> ?name=persistence/AccountUnit#org.apache.geronimo.persistence.PersistenceUn
>i tGBean.
>     No GBean references found.]
>
> Does anybody know, what this means?
>
Hello.
That's sound like geronimo didn't create the  AccountUnit Gbean that its 
created in the persistence.xml. Check that file. Specifically this part:

<persistence-unit name="AccountUnit" transaction-type="JTA">
  <description>ContainerManagedJPA</description>
  <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
  <jta-data-source>AccountDS</jta-data-source>
  <class>sample.jpa.Account</class>
  <class>sample.jpa.Person</class>
 </persistence-unit>
</persistence>

> Thanks for any help,
> Marco