users@glassfish.java.net

Re: Glassfish-v2ur2 persistence unit deployment problem

From: <glassfish_at_javadesktop.org>
Date: Mon, 28 Jul 2008 17:41:45 PDT

ok, I will try to explain.

I have a EJB module called EJBModule1 and my persistence.xml like this:
<?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/persistence_1_0.xsd">
  <persistence-unit name="Medical" transaction-type="JTA">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <jta-data-source>jdbc/MedicalDS</jta-data-source>
    <jar-file>entity-all-in-one.jar</jar-file>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    </properties>
  </persistence-unit>
</persistence>

the file entity-all-in-one.jar this in the root of my file EJBModule1.jar
E:\desenv\exemplos\EJBModule1
build
   jar
     entity-all-in-one.jar
     META-INF
        persistence.xml
  
the log is:
[#|2008-07-28T20:33:47.531-0300|WARNING|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=16;_ThreadName=httpWorkerThread-4848-0;
_RequestID=408daa4b-413d-42fa-8eea-6abdff3b4af7;|PersistenceUnitInfoImpl:
For pu-root [E:\desenv\exemplos\EJBModule1\build\jar], a jar-file [entity-all-in-one.jar] specified in persistence.xml is not found.
The server also looked for a file called [E:\desenv\exemplos\EJBModule1\build\entity-all-in-one_jar]. Please verify your application.|#]

my jar this in:
E:\desenv\exemplos\EJBModule1\build\jar\entity-all-in-one.jar

if I put this way, it doesn't also find the file:
    <jar-file>../entity-all-in-one.jar</jar-file>

[#|2008-07-28T20:52:00.500-0300|WARNING|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=14;_ThreadName=httpWorkerThread-4848-0;
_RequestID=4531eb35-de55-495c-ab72-b64f7b7707b8;|PersistenceUnitInfoImpl: For pu-root [E:\desenv\exemplos\EJBModule1\build\jar], a jar-file
[../entity-all-in-one.jar] specified in persistence.xml is not found. The server also looked for a file called
[E:\desenv\exemplos\EJBModule1\build\..\entity-all-in-one_jar]. Please verify your application.|#]

the only way that I made to work went making the deploy my EJBModule1.jar on Admin Console and declaring the jar this way:
    <jar-file>EJBModule1/entity-all-in-one.jar</jar-file>

but this way it doesn't work making the deploy on Netbeans:
[#|2008-07-28T20:31:40.140-0300|WARNING|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=22;_ThreadName=httpWorkerThread-4848-0;
_RequestID=21b6db0f-04a6-4891-a682-e32ea5e610de;|PersistenceUnitInfoImpl:
For pu-root [E:\desenv\exemplos\EJBModule1\build\jar], a jar-file [EJBModule1/entity-all-in-one.jar] specified in persistence.xml is not found.
The server also looked for a file called [E:\desenv\exemplos\EJBModule1\build\EJBModule1_entity-all-in-one_jar]. Please verify your application.|#]

to work in Netbeans, I'm declaring the jar this way:
    <jar-file>jar/entity-all-in-one.jar</jar-file>

Tanks,
Sandro
[Message sent by forum member 'sandrogiacom' (sandrogiacom)]

http://forums.java.net/jive/thread.jspa?messageID=289961