-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problems with the <jar-file> element in the persistenc
PostPosted: Wed Jun 27, 2007 9:28 am 
Newbie

Joined: Wed Jun 06, 2007 9:14 am
Posts: 14
- hibernate 3.2.3.GA
- hibernate-annotations 3.2.1.GA
- hibernate-entitymanager 3.2.1.GA
- JBoss 4.2.0GA

Hello, everybody!
I'm having problems with the <jar-file> element of my persistence deployment
descriptor (persistence.xml). I have deployed my EJB jar file to the directory
C:\jboss-4.2.0.GA\server\default\deploy and I have placed a jar file that also
has entity beans to be analysed in the directory
C:\jboss-4.2.0.GA\server\default\lib. This file is referenced in the
persitence.xml file. But the problem is that I keep getting error messages when
I'm deploying my EJB jar file to the directory deploy. The persistence provider
can't find the jar file specified in the <jar-file> element. This was my
persistence.xml file the first time I tested it:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd">
<persistence-unit name="laboratorio-informatica">
<jta-data-source>java:/LaboratorioInformaticaDS</jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<jar-file>urca.jar</jar-file>
</persistence-unit>
</persistence>

and I got this error message when deploying:
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/jboss-4.2.0.GA/bin/urca.jar

So, I kept modifying the <jar-file> element and got these results:

<jar-file>lib/urca.jar</jar-file>
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/jboss-4.2.0.GA/bin/lib/urca.jar

<jar-file>/lib/urca.jar</jar-file>
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/lib/urca.jar

<jar-file>../lib/urca.jar</jar-file>
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/jboss-4.2.0.GA/server/default/deploy/lib/urca.jar

<jar-file>../server/default/lib/urca.jar</jar-file>
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/jboss-4.2.0.GA/server/default/deploy/server/default/lib/urca.jar

So, I couldn't in any way tell the persistence provider to look the file at the
directory C:\jboss-4.2.0.GA\server\default\lib.

Please, what do I have to specify in the <jar-file> element to solve this problem?

Thank you.

Marcos


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 7:34 am 
Newbie

Joined: Wed Jun 06, 2007 9:14 am
Posts: 14
Hello!
Please, I really would like to get an answer to this question. This is crucial to me as I don't want to specify an absolute path in the <jar-file> element and make my application non portable.

Marcos


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.