users@glassfish.java.net

Re: _at_WebService / _at_Stateless and EJB deployment issue

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Wed, 15 Mar 2006 09:44:34 -0800

Looks like my reply yesterday morning has not made it to the mailing
list as yet.

This is a bug - can you please file an issue in the issue tracker ?

Thanks a lot

Vijay

On Tue, 2006-03-14 at 04:37, mark_at_javector.com wrote:
> I'm having trouble deploying the following (but without the @WebService.name
> attribute it deploys OK). It seems that when I use the @WebService.name
> attribute, I am required to include an ejb-jar.xml in my EJB-JAR. As far as I
> can tell, the problem is that when I do not include the ejb-jar.xml, Glassfish
> generates one, but instead of picking up the @WebService.name for the ejb-name,
> it generates an ejb-jar.xml with the default value of "Hello" for the ejb-name.
> Then, during deployment, there is a mismatch between the annotation and the
> descriptor, causing the server.log error shown below. This is my best guess
> about what is going on - I'm still a little confused about how @Stateless
> deployment works.
>
> Is this a bug - or is the ejb-jar.xml only optional when I do not use the
> @WebService.name?
>
>
> @WebService(serviceName="ServiceNameXXX", name="NameXXX")
> @Stateless
> public class Hello {
>
> public String sayHello(String s) {
> return "Hello: " + s;
>
> }
>
> }
>
> Here is the ejb-jar.xml that I need to use when deploying the above:
>
> <enterprise-beans>
> <session>
> <display-name>MyDisplayName</display-name>
> <ejb-name>NameXXX</ejb-name>
> <ejb-class>samples.Hello</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Container</transaction-type>
> <security-identity>
> <use-caller-identity/>
> </security-identity>
> </session>
> </enterprise-beans>
> </ejb-jar>
>
> The server log gives this:
>
> [#|2006-03-14T07:05:38.564-0500|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=80;_ThreadName=Thread-108;_RequestID=e6e89578-8a37-4428-8291-82413ee7cd7c;|Exception
> occured in J2EEC Phase
> com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading
> deployment descriptors for module [deploy-ssb-hello-1.0] -- Referencing error:
> This bundle has no bean of name [NameXXX]at
> com.sun.enterprise.deployment.annotation.AnnotationInfo_at_ce69fc
> at
> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:362)
> at
> com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:394)
> at
> com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:134)
> at
> com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
> at
> com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
> at
> com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
> at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:848)
> at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:260)
> at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:716)
> at
> com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:165)
> at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:194)
> Caused by: java.lang.IllegalStateException: Referencing error: This bundle has
> no bean of name [NameXXX]at
> com.sun.enterprise.deployment.annotation.AnnotationInfo_at_ce69fc
> at
> com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:340)
> at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:200)
> at
> com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:746)
> at
> com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:727)
> at
> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:327)
> ... 10 more
> Caused by: Referencing error: This bundle has no bean of name [NameXXX]at
> com.sun.enterprise.deployment.annotation.AnnotationInfo_at_ce69fc
> at
> com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:334)
> at
> com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:342)
> at
> com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:256)
> at
> com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:162)
> at
> com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:116)
> at
> com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:429)
> at
> com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:322)
> ... 14 more
> Caused by: java.lang.IllegalArgumentException: Referencing error: This bundle
> has no bean of name [NameXXX]
> at
> com.sun.enterprise.deployment.EjbBundleDescriptor.getEjbByName(EjbBundleDescriptor.java:258)
> at
> com.sun.enterprise.deployment.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:347)
> at
> com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:311)
> ... 20 more
> |#]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>