geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Forrest Xia (JIRA)" <j...@apache.org>
Subject [jira] Updated: (GERONIMO-4468) <jar-file> elements are interpreted relatively to EAR root instead of persistence unit
Date Tue, 17 Feb 2009 15:53:00 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Forrest Xia updated GERONIMO-4468:
----------------------------------

    Attachment: my-ear-1.0-SNAPSHOT_PUjarfileinEARroot.ear

Tried putting PU jar file(attached "my-ear-1.0-SNAPSHOT_PUjarfileinEARroot.ear") in the EAR
root and then deploy it, an exception happens:
At least one deployment problem:[org.apache.geronimo.common.DeploymentException: No default
PersistenceUnit specified, and none located]
org.apache.geronimo.common.DeploymentException: At least one deployment problem:[org.apache.geronimo.common.DeploymentException:
No default PersistenceUnit specified, and none located]
	at org.apache.geronimo.persistence.builder.PersistenceUnitRefBuilder.buildNaming(PersistenceUnitRefBuilder.java:154)
	at org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
	at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:842)
	at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:347)
	at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:599)
	at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
	at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
	at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
	at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
	at java.lang.Thread.run(Thread.java:735)

So,
Question 1: does Geronimo support put PU jar in the EAR root?

Question 2: Does Geronimo accept persistence.xml in EAR_ROOT/META-INF directory?
I also tried putting persistence.xml in EAR_ROOT/META_INF, it does not work in Geronimo as
well. But I ever tried JBoss 5, it works!

> <jar-file> elements are interpreted relatively to EAR root instead of persistence
unit
> --------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-4468
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4468
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: persistence
>    Affects Versions: 2.1.3
>            Reporter: Janko Heilgeist
>            Assignee: Ivan
>             Fix For: 2.1.4, 2.2
>
>         Attachments: Geronimo-4468-01.patch, Geronimo-4468.patch, geronimo-jarfile.tar.gz,
my-ear-1.0-SNAPSHOT.ear, my-ear-1.0-SNAPSHOT_PUjarfileinEARroot.ear
>
>
> The <jar-file> elements in a persistence.xml are wrongly interpreted as relative
to the EAR's root.
> EJB 3.0 persistence spec, section 6.2:
> {quote}
> [...] A persistence unit is defined by a persistence.xml file. The jar file or directory
whose META-INF directory contains the persistence.xml file is termed the root of the persistence
unit. [...]
> {quote}
> EJB 3.0 persistence spec, section 6.2:
> {quote}
> One or more JAR files may be specified using the jar-file elements [...] Such JAR files
are specified relative to the root of the persistence unit [...].
> {quote}
> The attached EAR is correctly verified by the Glassfish verifier. Deploying it on Geronimo
2.1.3 or 2.2-SNAPSHOT results in a successful deployment, while on the console OpenJPA throws
exceptions because it tries to resolve the jar-file paths relative to the EAR's root:
> {quote}
> <openjpa-1.0.3-r420667:677674 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
$HOME/geronimo-tomcat6-javaee5-2.1.3/repository/com/heilgeist/testcase/geronimo/jarfile/my-ear/1.0-SNAPSHOT/my-ear-1.0-SNAPSHOT.ear/my-entities1-1.0-SNAPSHOT.jar
(No such file or directory)
> <openjpa-1.2.0-r422266:683325 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
$HOME/geronimo-tomcat6-javaee5-2.2-SNAPSHOT/repository/com/heilgeist/testcase/geronimo/jarfile/my-ear/1.0-SNAPSHOT/my-entities2-1.0-SNAPSHOT.jar
(No such file or directory)
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message