Hi All,
I have an ear which contains a war file. The jar files required by my
application are in the lib directory of the ear. The WEB-INF/lib
directory is empty. I am using hibernate version 3.6.0.Final and I want
my application to use the jpa 2.0 of hibernate (hibernate-jpa-2.0-api),
so I have added a hidden-classes element with a filter on
javax.persistence.
However when I have this construction, hibernate doesn't recognize my
annotated classes anymore (it gives an mapping exception Unknown
Entity). But when I move the libraries from the ear lib directory to the
WEB-INF/lib directory I no longer have this exception.
I am running on Geronimo 2.2.1 and my deployment plan is:
<?xml version="1.0" encoding="utf-8"?>
<application application-name="Sample"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
<sys:environment>
<sys:moduleId>
<sys:groupId>com.sample</sys:groupId>
<sys:artifactId>sample</sys:artifactId>
<sys:version>0.1-SNAPSHOT</sys:version>
<sys:type>car</sys:type>
</sys:moduleId>
<sys:hidden-classes>
<filter>javax.persistence</filter>
</sys:hidden-classes>
</sys:environment>
</application>
Am I doing something incorrect in my setup or deployment plan or should
this construction work ?
Best regards,
Marco
|