users@glassfish.java.net

Weird deployment behaviour

From: <forums_at_java.net>
Date: Thu, 22 Sep 2011 07:03:50 -0500 (CDT)

Hi all,

I've ran into a pretty weird behaviour while deploying a WAR file on
GlassFish 3.1.

I have an EAR project that is correctly deployed, containing some EJB
services. The remote interfaces are packaged in a JAR (MyPublics.jar) for any
client application.

Now, I have a Web project referencing these services. The controllers' beans
are annotated with @Resource(mappedName = MyPublics.JNDI_NAME).

When I was developing and deploying using Eclipse, everything went fine, the
WAR would be deployed and worked fine. Comes the time where you build the WAR
using Maven and deploy it on the server. Now I get a nasty:

[quoute]Referencing error: This bundle has no bean of name [MyBean][quote]

After hours of comparing both deploys, I finally found the following
workaround:

In the Maven generated WAR, remove from the WEB-INF/lib folder:
MyPublics/jar. Explode this jar into a folder and put it back inside the
WEB-INF/lib folder from the Maven generated WAR file. Deploy, it works!!!

Now, how come?? How is it possible that having a .jar file throws this
nasting referencing error whereas the exact same exploded archive works
well??

Thanks for your help


--
[Message sent by forum member 'Roinou']
View Post: http://forums.java.net/node/845638