users@glassfish.java.net

Re: deployment trouble: jar in ear's /lib folder invisible to the ejbmodule

From: Sahoo <sanjeeb.sahoo_at_oracle.com>
Date: Thu, 26 May 2011 15:35:13 +0530

I don't see any classloading errors. It seems there is a wrong EJB name
used somewhere. Most likely it is in one of the sun-*.xml file.

Sahoo
On Thursday 26 May 2011 03:11 PM, Matthieu Bertin wrote:
> EAR
> +--------business.jar <---- containing EJB which fails to find a
> class from the domain.jar
> +--------/lib/
> | +---- domain.jar <---- contains the "missing" class
> +--------META-INF/
> +----- application.xml
>
> all the dependencies of the missing class can be resolved: most of it
> comes from javax.persistence and org.jasypt; the jasypt.jar is in the
> glassfish/lib folder.
>
> here is the server.log i get when deploying:
>
> [#|2011-05-26T10:56:19.181+0200|SEVERE|glassfish3.1|global|_ThreadID=23;_ThreadName=Thread-1;|Class
> [ Lcom/mycompany/myapp/domain/dao/MyClassThatCannotBeFound ; ] not
> found. Error while loading [ class
> com.mycompany.myapp.auth.MyEjbThatFailsToDeploy ]|#]
>
> [#|2011-05-26T10:56:19.188+0200|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=87;_ThreadName=Thread-1;|Exception
> lors du déploiement de l’application [myapp]|#]
>
> [#|2011-05-26T10:56:19.189+0200|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=87;_ThreadName=Thread-1;|Erreur
> de référencement : Cet ensemble ne comporte aucun bean nommé
> [MyEjbThatFailsToDeploy]
> java.lang.IllegalArgumentException: Erreur de référencement : Cet
> ensemble ne comporte aucun bean nommé [MyEjbThatFailsToDeploy]
> at
> com.sun.enterprise.deployment.EjbBundleDescriptor.getEjbByName(EjbBundleDescriptor.java:287)
> at
> com.sun.enterprise.deployment.EjbBundleDescriptor.getEjbByName(EjbBundleDescriptor.java:271)
> at
> com.sun.enterprise.deployment.node.runtime.EjbNode.setElementValue(EjbNode.java:125)
> at
> com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:476)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:266)
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2053)
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:927)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1759)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
> at
> com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:309)
> at
> com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:718)
> at
> com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:668)
> at
> com.sun.enterprise.deployment.archivist.ApplicationArchivist.readRuntimeDeploymentDescriptor(ApplicationArchivist.java:728)
> at
> com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:265)
> at
> com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
> at
> org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:170)
> 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.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
> at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
> at
> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
> at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
> at java.lang.Thread.run(Thread.java:679)
> |#]
>
> [#|2011-05-26T10:56:19.191+0200|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=87;_ThreadName=Thread-1;|Exception
> lors du déploiement de l’application [myapp] : Erreur de référencement
> : Cet ensemble ne comporte aucun bean nommé [MyEjbThatFailsToDeploy]|#]
>
>
> On Thu, May 26, 2011 at 11:29 AM, Sahoo <sanjeeb.sahoo_at_oracle.com
> <mailto:sanjeeb.sahoo_at_oracle.com>> wrote:
>
> Send exception stack trace and any relevant info like where is the
> class packaged? Is it in two places? Are all its dependencies
> satisfied?
>
> Sahoo
>
> On Thursday 26 May 2011 02:56 PM, Matthieu Bertin wrote:
>> Hello Sahoo,
>>
>> I've added the jarmodule trying to force glassfish to read it.
>> but it didn't work.
>> I'm getting the very same error with the following application.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <application xmlns="http://java.sun.com/xml/ns/javaee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
>> <application-name>myapp</application-name>
>> <display-name>myapp</display-name>
>> <module>
>> <ejb>business-2.0.3-SNAPSHOT.jar</ejb>
>> </module>
>> <library-directory>lib</library-directory>
>> </application>
>>
>> and of course i've doubled-checked that the domain.jar is in the
>> ear lib folder, and contains the "missing" class.
>
>