users@glassfish.java.net

Re: Weird deployment behaviour

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Thu, 22 Sep 2011 14:46:51 -0400

>
> 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!!!
>
This is strange! When you say "MyPublics/jar", you meant "MyPublics.jar"
which is a direct child of WEB-INF/lib right? What's inside this jar?
Is the Maven generated WAR in an exploded folder format or jar format?
If you could send us the test case for us to reproduce from our side, we
could take a further look..

Thanks,

- Hong
> 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
>
>