Hello all,
we have a problem. We have an ear that deploys and works on jboss. however, deployment of the ear is not possible on Glassfish.
The ear file contains :
- META-INF
- application.xml
- MANIFEST.MF
- framework.jar
- session.jar
- tribalnets.war
The application.xml for jboss was
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "
http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>tribalnets</display-name>
<description>tribalnets</description>
<module>
<ejb>framework.jar</ejb>
</module>
<module>
<ejb>session.jar</ejb>
</module>
<module>
<web>
<web-uri>tribalnets.war</web-uri>
<context-root>tribalnets</context-root>
</web>
</module>
</application>
Here session.jat contains EJB's and Framework.jar is our simple framework library without EJB.
The first problem was that framework.jar didn't contained any EJB's. That's correct.
So I changed it to
<module>
<java>framework.jar</java>
</module>
however, now I do get a NullPointerException
[#|2010-06-15T11:00:40.656+0700|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=25;_ThreadName=Thread-1;|Module type not recognized|#]
[#|2010-06-15T11:00:40.656+0700|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=25;_ThreadName=Thread-1;|Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method
org.glassfish.deployment.common.DeploymentException
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:148)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:638)
at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:269)
at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:79)
at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131)
at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:129)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:197)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:206)
at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:235)
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:129)
... 29 more
|#]
So, for some reason the <java> tag is not recognized (or the jar is wrong).
If I remove the framework.jar from the application.xml, I do get an exception
Caused by: java.lang.ClassNotFoundException: com.tribalnets.framework.security.SecurityToken
at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:736)
at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:626)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 53 more
|#]
So, now he doesn't see the framework.jar anymore.
I really don't want to place the jar in the Glassfish distribution but keep it in my ear.
How can I solve this ?
many regards,
Rudi Welter
[Message sent by forum member 'ruwe']
http://forums.java.net/jive/thread.jspa?messageID=474330