- 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