-
1. Re: EAR packaging and deployment issue HibernateProxy not found
smarlow Nov 12, 2011 8:30 PM (in response to nuki)Try the nightly AS7 build from this link community.jboss.org/thread/167590, that might be of some help.
Also, is the persistence.xml in Persistence.jar/META-INF? In your diagram, it looks like its in the root of the Persistence.jar. I think you want the following instead:
myApp.ear
|_ META-INF
|_ EJB-User-Library.jar (Module created for using in different ears)
|_ EJB-Article-Library.jar (Module created for using in different ears)
|_ EJB-News-Library.jar (Module created for using in different ears)
|_ lib/
|_ Persistence.jar
|_META-INF
|_ persistence.xml
-
2. Re: EAR packaging and deployment issue HibernateProxy not found
nuki Nov 13, 2011 2:32 AM (in response to smarlow)Hi Scott,
thanks for your reploy. Your structure diagramm is correct. The persistence.xml is in the Persistence.jar/META-INF folder. It was late last night here in Germany :-)
Is it possible, that my failure is in the application.xml?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>My Ear Name displayed in the App Server</display-name>
<module>
<web>
<web-uri>struts2-sandbox.war</web-uri>
<context-root>/ear-sandbox</context-root>
</web>
</module>
<module>
<ejb>ejb3-user.jar</ejb>
</module>
<module>
<ejb>ejb3-article.jar</ejb>
</module>
<module>
<ejb>ejb3-news.jar</ejb>
</module>
<library-directory>lib</library-directory>
</application>
PS: I can't download the nightly build from your link, cause of 503 error.
kind regards
-
3. Re: EAR packaging and deployment issue HibernateProxy not found
nuki Nov 13, 2011 3:51 AM (in response to nuki) -
4. Re: EAR packaging and deployment issue HibernateProxy not found
nuki Nov 13, 2011 4:39 AM (in response to nuki)I tried to put the persistence.xml into the META-INF folder of the ear file:
myApp.ear
|_ META-INF
|_ persistence.xml
|_ EJB-User-Library.jar (Module created for using in different ears)
|_ EJB-Article-Library.jar (Module created for using in different ears)
|_ EJB-News-Library.jar (Module created for using in different ears)
Database operations work fine, but JBoss AS7 still give me the error message HHH00142: Javassist Enhancement failed: ejb3.user.User
kind regards
-
5. Re: EAR packaging and deployment issue HibernateProxy not found
smarlow Nov 13, 2011 11:01 PM (in response to nuki)Having several EARs depend on a single persistence deployment isn't something you can do currently on AS7. If this is important, please vote for the jira referenced in the above forum post you just mentioned. It sounds like you are trying to do something a little different than that (since each EAR will have its own persistence.xml). I'd like to see the full exception call stack, if you could attach the as7/standalone/logs/server.log with the error (or just the part with the error). I'll take a look.
Also let me know if you are packaging a copy of any Hibernate jars in the ear.
The nightly builds link should be available now (I just tried accessing the site). I don't think that will make a difference but its worth trying that too.
-
6. Re: EAR packaging and deployment issue HibernateProxy not found
nuki Nov 14, 2011 3:21 AM (in response to smarlow)Good morning Scott,
thanks for your reply.
I don't use any packaged Hibernate jars in my projects, so my applications are able to use the Hibernate 4.0.0 RC2 jars from the Jboss directly.
Yesterday I solved the problem by changing my EAR structure:
myApp.ear
|_ META-INF
|_ EJB-User-Library.jar (Module created for using in different ears, only beans - no entities)
|_ EJB-Article-Library.jar (Module created for using in different ears, only beans - no entities)
|_ EJB-News-Library.jar (Module created for using in different ears, only beans - no entities)
|_ lib/
|_ Entity-User-Library.jar (Module created for using in different ears, only entities)
|_ Entity-Article-Library.jar (Module created for using in different ears,only entities)
|_ Entity-News-Library.jar (Module created for using in different ears, only entities)
|_ Persistence.jar
|_META-INF
|_ persistence.xml
The problem was, that the persistence.jar was not able to find my entities which were in the EJB-*-Library.jars on the root of the EAR.
kind regards!