Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying BatooJPA on JBoss6 fails when BaseAnnotatedClassLocator tries to use JBoss7AnnotatedClassLocator #172

Open
PorkLip opened this issue Mar 11, 2013 · 0 comments

Comments

@PorkLip
Copy link

PorkLip commented Mar 11, 2013

If the persistence.xml does not contain a <jar-file> tag the BaseAnnotadedClassLocator will encounter an "vfs" jar URL protocol in the locateClasses method and try to use JBoss7AnnotatedClassLocator. This will fail since JBoss7AnnotatedClassLocator tries to load org.jboss.as.jpa.spi.PersistenceUnitMetadata that not is available in JBoss 6.

It is almost possible to work around this when working with exploded libraries in Eclipse by specifying an relative path
<jar-file>file:../server/default/deploy/{name-of-ear-directory}/lib/{name-of-jpa-jar.jar}<jar-file> in persistence.xml. This will force the usage of the JarAnnotatedClassLocator that according to the logs will locate the annotated classes but at a later stage the JBoss7AnnotatedClassLocator seems to be invoked anyway and you end up with the same missing classes again. Even if this would work the relative path to the JAR file is not an option since it will fail when deployed to a server where exploded libraries isn't used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant