4 Replies Latest reply: Mar 29, 2012 4:54 AM by Ales Justin RSS

Deployment fails on Glassfish 3.1.2, LifecycleMixin class not found

Roland Olsson Newbie

Hi.

 

I'm trying to deploy an EAR (containing a .war and some .jars) application onto Glassfish 3.1.2. The deployment fails with a couple of exceptions reported in the server.log.

 

FINEST: Retrieving/generating proxy class org.jboss.weldx.transaction.UserTransaction$1460496094$Proxy$_$$_Weld$Proxy$

FINEST: Adding method public java.lang.String java.lang.Object.toString()

FINEST: Adding method public abstract int javax.transaction.UserTransaction.getStatus() throws javax.transaction.SystemException

FINEST: Adding method public abstract void javax.transaction.UserTransaction.begin() throws javax.transaction.NotSupportedException,javax.transaction.SystemException

FINEST: Adding method public abstract void javax.transaction.UserTransaction.rollback() throws java.lang.IllegalStateException,java.lang.SecurityException,javax.transaction.SystemException

FINEST: Adding method public abstract void javax.transaction.UserTransaction.commit() throws javax.transaction.HeuristicMixedException,javax.transaction.HeuristicRollbackException,java.lang.IllegalStateException,javax.transaction.RollbackException,java.lang.SecurityException,javax.transaction.SystemException

FINEST: Adding method public abstract void javax.transaction.UserTransaction.setTransactionTimeout(int) throws javax.transaction.SystemException

FINEST: Adding method public abstract void javax.transaction.UserTransaction.setRollbackOnly() throws java.lang.IllegalStateException,javax.transaction.SystemException

FINEST: Adding method public abstract void org.jboss.weld.interceptor.proxy.LifecycleMixin.lifecycle_mixin_$$_postConstruct()

FINEST: Adding method public abstract void org.jboss.weld.interceptor.proxy.LifecycleMixin.lifecycle_mixin_$$_preDestroy()

SEVERE: Exception while loading the app

SEVERE: Exception while shutting down application container

SEVERE: Exception while shutting down application container : java.lang.NullPointerException

 

 

Starting the app server in debug mode (with breakpoints on org.jboss.weld.* exceptions) and deploying the app, it halts on the following location:

 

"admin-thread-pool-9048(1)"

org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:277)

org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:236)

org.jboss.weld.bean.builtin.ee.AbstractEEBean.(UserTransactionBean.java:52)

org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:190)

org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349)

org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:179)

org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)

org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:277)

com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)

com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)

org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)

com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)

com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)

com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)

com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)

com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)

com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)

com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)

com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)

com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)

com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)

com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)

com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)

com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)

com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)

com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)

com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)

com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

com.sun.grizzly.ContextTask.run(ContextTask.java:71)

com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

java.lang.Thread.run(Thread.java:636)

 

 

The actual exception that breaks the deployment is:

 

java.lang.NoClassDefFoundError: org/jboss/weld/interceptor/proxy/LifecycleMixin

 

 

This looks all very similar to what's been reported in https://community.jboss.org/thread/180009 but I've tried to patch, install and use a patched weld-osgi-bundle.jar and I didn't help. There is also a JIRA (fixed late 2010) https://issues.jboss.org/browse/WELD-807 that seems very much related.

 

How come this class is not found by Weld? There is a LifecycleMixin.class residing inside $GLASSFISH_HOME/modules/weld-osgi-bundle.jar, but somehow it doesn't succeed in picking it up from there.

 

Regards

Roland