[
https://issues.jboss.org/browse/JBAS-8817?page=com.atlassian.jira.plugin....
]
Vlastimil Menčík commented on JBAS-8817:
----------------------------------------
This problem is caused by combining service POJOs and CDI in the same deployment archive.
The deployer is unable to deploy any service POJO contained in a CDI-enabled archive (with
beans.xml).
I will attach a simple Arquillian test that you can use to reproduce this issue.
The exception from the test looks like this:
16:30:35,593 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error
installing to Create:
name=jboss.j2ee:jar=c74825ba-4a24-4c38-a516-4351cfa623aa.war,name=FooBean,service=EJB3
state=Configured: java.lang.NullPointerException
at
org.jboss.weld.integration.instantiator.Jsr299BeanInstantiator.create(Jsr299BeanInstantiator.java:74)
[:6.0.0.Final]
at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:1048) [:1.7.17]
at org.jboss.ejb3.service.ServiceContainer.create(ServiceContainer.java:207) [:1.7.17]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[:1.6.0_20]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
[jboss-reflect.jar:2.2.0.GA]
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
[jboss-reflect.jar:2.2.0.GA]
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
[jboss-reflect.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257)
[jboss-kernel.jar:2.2.0.GA]
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)
[jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)
[jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)
[jboss-dependency.jar:2.2.0.GA]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)
[jboss-dependency.jar:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)
[:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)
[:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
[:2.2.0.GA]
at
org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)
[:6.0.0.Final]
at
org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143)
[:0.2.2]
at
org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:98)
[:0.2.2]
at
org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:101)
[:0.2.2]
at
org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)
[:0.2.2]
at
org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)
[:0.2.2]
at
org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168)
[:0.2.2]
at
org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74)
[:6.0.0.Final]
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156)
[:6.0.0.Final]
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) [:6.0.0.Final]
at
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
[:6.0.0.Final]
at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
[:6.0.0.Final]
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
[:6.0.0.Final]
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
[:6.0.0.Final]
Service POJO deployment throws NullPointerException
---------------------------------------------------
Key: JBAS-8817
URL:
https://issues.jboss.org/browse/JBAS-8817
Project: Legacy JBoss Application Server 6
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Deployers, Weld/CDI
Affects Versions: 6.0.0.CR1
Environment: RedHat Linux 5.5
Reporter: Devinder Singh
Assignee: Marius Bogoevici
Labels: jbas
Fix For: No Release
Attachments: CoolSystemInitService.java, ICoolSystemInit.java
I have a very simple test service POJO that I'm trying to deploy to JBoss AS 6 on
Linux. But it's failing with below exception:
Java code for the test can be obtained from the forum link:
http://community.jboss.org/message/581413
14:42:21,599 ERROR [AbstractKernelController] Error installing to Create:
name=jboss.j2ee:ear=foliage.ear,jar=foliageEJB.jar,name=CoolSystemInitService,service=EJB3
state=Configured: java.lang.NullPointerException
at
org.jboss.weld.integration.instantiator.Jsr299BeanInstantiator.locateWeldManager(Jsr299BeanInstantiator.java:102)
[:6.0.0.20101110-CR1]
at
org.jboss.weld.integration.instantiator.Jsr299BeanInstantiator.getWeldManager(Jsr299BeanInstantiator.java:93)
[:6.0.0.20101110-CR1]
at
org.jboss.weld.integration.instantiator.Jsr299BeanInstantiator.create(Jsr299BeanInstantiator.java:72)
[:6.0.0.20101110-CR1]
at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:997) [:1.6.3]
at org.jboss.ejb3.service.ServiceContainer.create(ServiceContainer.java:205)
[:1.6.3]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[:1.6.0_21]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
[jboss-reflect.jar:2.2.0.Alpha9]
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
[jboss-reflect.jar:2.2.0.Alpha9]
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira