tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Saint Croix" <saintx.opensou...@gmail.com>
Subject Possible bug? Related to spec reference 6.2.1.6
Date Sun, 23 Dec 2007 01:13:28 GMT
Howdy.

The 3.0 persistence spec, section 6.2.1.6, indicates that <jar-file>
elements in the persistence.xml should be relative to the root of the
persistence unit.  However, I've found that it's digging from the root
of the tomcat installation.  I think the PersistenceUnitInfoImpl.java
file is the location of the bug.

For instance, if I put this in my persistence.xml file:

    <jar-file>../../lib/first.jar</jar-file>
    <jar-file>../../lib/second.jar</jar-file>

It looks for the jars in
/Users/alex/dev/apache-tomcat-6.0.14/bin/../../lib/first.jar
and
/Users/alex/dev/apache-tomcat-6.0.14/bin/../../lib/second.jar

Here's a stack trace to illustrate that:

javax.ejb.EJBException: The bean encountered a non-application
exception.; nested exception is:
	<openjpa-1.0.1-r420667:592145 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException:
/Users/alex/dev/apache-tomcat-6.0.14/bin/../../lib/second.jar (No such
file or directory)
	org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:366)
	org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:323)
	org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
	$Proxy31.persist(Unknown Source)
	ExampleServlet.doGet(ExampleServlet.java:26)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Mime
View raw message