[jboss-jira] [JBoss JIRA] Updated: (EJBTHREE-1751) Can't resole ejb injection in interceptor class
Jacek Palka (JIRA)
jira-events at lists.jboss.org
Wed Apr 15 02:06:29 EDT 2009
[ https://jira.jboss.org/jira/browse/EJBTHREE-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacek Palka updated EJBTHREE-1751:
----------------------------------
Attachment: server.zip
As requested in http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153488 I attach the zipped server.log file.
> Can't resole ejb injection in interceptor class
> -----------------------------------------------
>
> Key: EJBTHREE-1751
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1751
> Project: EJB 3.0
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.0-Beta10
> Environment: Jboss AS 5.0.0.GA, JDK 5.0
> Reporter: Nouredine Goutal
> Assignee: jaikiran pai
> Attachments: server.zip, testInterceptor_EAR.ear
>
>
> problem deploying ear with interceptors classes:
> Code:
> ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to
> Real: name=vfszip:/product/mnfc/jboss/jboss-5.0.0.GA/server/default/deploy/testInterceptor_EAR.ear
> state=PreReal mode=Manual requiredState=Real
> org.jboss.deployers.spi.DeploymentException: Error deploying testInterceptor.jar: null
> at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:203)
> at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:104)
> at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeplo
> yer.java:45)
> at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:5
> 0)
> at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157
> )
> at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210
> )
> at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
> at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:34
> 8)
> at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
> at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
> at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
> at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
> at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
> at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
> at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
> at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadP
> oolExecutor.java:65)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThread
> PoolExecutor.java:142)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExec
> utor.java:166)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
> at org.jboss.ejb3.javaee.JavaEEComponentHelper.createObjectName(JavaEEComponentHelper.java:46)
> at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:170)
> at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:407)
> at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1408)
> at org.jboss.injection.AbstractHandler.addDependency(AbstractHandler.java:50)
> at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandler.java:146)
> at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemoteHandler.java:393)
> at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:160)
> at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:197)
> at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:605)
> at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:415)
> at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:523)
> at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
> ... 28 more
>
> This problem occurs when injects a local ejb in interceptor class :
> Code:
> public class testInterceptor {
> private static final Logger log = Logger.getLogger("TEST_INTERCEPTOR");
>
> @EJB(name="ejb/testSessionLocal", beanInterface=testSessionLocal.class)
> private testSessionLocal test;
>
>
> @AroundInvoke()
> public Object showMessage(InvocationContext ctx) throws Exception {
>
> log.debug("Persist entity from testSessionBeanLocal...");
>
>
> for (Object o :ctx.getParameters()){
>
> log.debug("Interceptor parameter : "+ o);
> if (o instanceof String){
>
> test.persist(o.toString());
> }
>
> }
> Object o = null;
> o=ctx.proceed();
> return o;
>
> }
>
> the method intercepted by this class is as follows:
> Code:
> @Remote(testSessionRemote.class)
> @Stateless(name="testSessionRemote", mappedName="testSessionBeanRemote")
> public class testSessionBeanRemote implements testSessionRemote {
>
> private static final Logger log = Logger.getLogger("TEST_INTERCEPTOR");
> @Interceptors(testInterceptor.class)
> public void persist(String cmdParam) {
>
> log.info("Persist entity from testSessionBeanRemote...");
> }
> }
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list