users@glassfish.java.net

Re: [Glassfish embedded] Problem with JPA2 entities in jar in a war

From: <glassfish_at_javadesktop.org>
Date: Thu, 28 Oct 2010 06:23:35 PDT

> This works:
>
> File[] ejbModules = new File[2];
> ejbModules[0] = new
> ew File("target/simple-0.1-SNAPSHOT-LOCAL.war");
> properties.put(EJBContainer.MODULES, ejbModules);
>


In my project, I'm using "[i]properties.put(EJBContainer.MODULES, new File("target/MyEntities-0.0.1-snapshot.jar"));[/i]", but this results in the following warning: "org.glassfish.deployment.common.GenericAnnotationDetector scanArchive
WARNING: Failed to scan archive for annotations26".
The referenced JAR file exists in the classpath, but Glassfish has problems in finding it. That's what I suppose, because the warning message does not give enough details.

Could you verify that when you use the JAR that contains the jpa2 entities and not the WAR that contains this JAR, the system continues to work correctly ?

Regards, Stefan Lecho.
[Message sent by forum member 'stlecho']

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