Hi,
I get this error message "error trying to scan <jar-file>" when using the <jar-file> element in my persistence.xml file.
Hibernate version:
Hibernate 3.2.0.GA
EntityManager 3.2.0.GA
Annotations 3.2.0.GA
I have an ear file I deploy to Jboss AS 4.0.5 and in the <jboss>/server/default/deploy directory. The ear contains two jar files commands-ejb.jar and additional-ejb.jar and an application.xml. The commands-ejb.jar contains the persistence.xml and the persistence.xml uses the <jar-file> element to get the additional-ejb.jar file inspected and loaded by the provider.
The error below indicates that the scanForClasses method is looking in the wrong place as the directory is wrong. The directory is where Jboss was started. Is this a bug or should I do something else?
Code:
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Programmer/jboss-4.0.5.GA-EJB3/bin/additional-ejb.jar
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:597)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:338)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
...
Everything works fine if I remove the line <jar-file>additional-ejb.jar</jar-file> from persistence.xml (except my jar file additional-ejb.jar is not loaded).
Thanks!
Best regards,
Skipper