users@glassfish.java.net

Re: How to remove osgi war version from the JNDI Lookup?

From: <forums_at_java.net>
Date: Sun, 8 Apr 2012 09:05:01 -0500 (CDT)

Hi, The class level @EJB annotation works fine when there's only 1 ejb
implementing the interface. However, when more than 1 ejbs implement it, I
get the following error: Caused by: java.lang.IllegalArgumentException:
Cannot resolve reference Remote ejb-ref
name=java:global/mywar/MyBean!com.MyInterface,Remote 3.x interface
=com.MyInterface,ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session
because there are 5 ejbs in the application with interface com.MyInterface.
Some of the possible causes: 1. The EJB bean class was packaged in an ear lib
library (or through any other library mechanism which makes the library
visible to all component modules), this makes all the component modules
include this bean class indirectly. 2. The EJB bean class was packaged in a
component module which references the EJB, either directly or indirectly
through Manifest, WEB-INF/lib. The EJB bean class should only be packaged in
the declaring ejb module and not the referencing modules. The referencing
modules should only include EJB interfaces. at
com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:568)
at com.sun.enterprise.deployment.EjbDescriptor.visit(EjbDescriptor.java:2589)
at
com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:734)
at com.sun.enterprise.deployment.Application.visit(Application.java:1768) at
com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:195)
at
org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:180)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:826)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:768)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.osgijavaeebase.OSGiDeploymentRequest.deploy(OSGiDeploymentRequest.java:183)
... 12 more My deployement is not an ear. It's a wab (which contains the
beans in jars under WEB-INF/lib). Any idea what's the problem here? Thanks

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