-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Failure when using <jar-file> element
PostPosted: Wed Nov 29, 2006 8:54 am 
Newbie

Joined: Mon Nov 27, 2006 7:38 am
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 3:50 am 
Senior
Senior

Joined: Tue Jul 25, 2006 9:05 am
Posts: 163
Location: Stuttgart/Karlsruhe, Germany
Hi,

I think this is a bug with the <jar-file> element in JBoss. I also experienced the same problem, as it tries to scan the given jar file in the bin directory of the JBoss install (C:/Programmer/jboss-4.0.5.GA-EJB3/bin/ in your case) and not the deploy directory where it is located.

The only workaround i know for this issue is to use the <class> tag in the persistence.xml instead, you will need a seperate tag per class.


Andy

_________________
Rules are only there to be broken


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 05, 2006 6:17 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can you guys open an issue to JBoss JIRA ?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 4:40 am 
Senior
Senior

Joined: Tue Jul 25, 2006 9:05 am
Posts: 163
Location: Stuttgart/Karlsruhe, Germany
It seems there is already a bug in for it, here:

http://jira.jboss.com/jira/browse/EJBTHREE-560

It is still open, and unassigned :-(


Cheers,

Andy

_________________
Rules are only there to be broken


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 4:52 am 
Senior
Senior

Joined: Tue Jul 25, 2006 9:05 am
Posts: 163
Location: Stuttgart/Karlsruhe, Germany
It seems there is already a bug in for it, here:

http://jira.jboss.com/jira/browse/EJBTHREE-560

It is still open, and unassigned :-(


Cheers,

Andy

_________________
Rules are only there to be broken


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 4:54 am 
Senior
Senior

Joined: Tue Jul 25, 2006 9:05 am
Posts: 163
Location: Stuttgart/Karlsruhe, Germany
It seems there is already a bug in for it, here:

http://jira.jboss.com/jira/browse/EJBTHREE-560

It is still open, and unassigned :-(


Cheers,

Andy

_________________
Rules are only there to be broken


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 4:59 am 
Senior
Senior

Joined: Tue Jul 25, 2006 9:05 am
Posts: 163
Location: Stuttgart/Karlsruhe, Germany
Sorry about the repeat posts, the network at work is playing up at the moment


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.