Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8955

Injection of a WebServiceContext in an Interceptor fails when deployed.

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: JBossAS-5.1.0.GA
    • Fix Version/s: No Release
    • Component/s: EJB
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Try to deploy a solution where an interceptor has a WebServiceContext injected.

      public class WebserviceLogInterceptor {

      @Resource
      private WebServiceContext wsc;

      @AroundInvoke
      public Object logCall(InvocationContext context) throws Exception {
      try

      { return context.proceed(); }

      catch (Exception e)

      { throw e; }

      }
      }

      Show
      Try to deploy a solution where an interceptor has a WebServiceContext injected. public class WebserviceLogInterceptor { @Resource private WebServiceContext wsc; @AroundInvoke public Object logCall(InvocationContext context) throws Exception { try { return context.proceed(); } catch (Exception e) { throw e; } } }

      Description

      http://community.jboss.org/message/589104

      public class WebserviceLogInterceptor {

      @Resource
      private WebServiceContext wsc;

      @AroundInvoke
      public Object logCall(InvocationContext context) throws Exception {
      try

      { return context.proceed(); }

      catch (Exception e)

      { throw e; }

      }
      }

      org.jboss.deployers.spi.DeploymentException: Error deploying Project-1.0-SNAPSHOT.jar: Exception while processing container metadata for EJB: DemoService in unit: Project-1.0-SNAPSHOT.jar
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
      at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      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:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      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:702)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.Exception: Exception while processing container metadata for EJB: DemoService in unit: Project-1.0-SNAPSHOT.jar
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:549)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
      ... 29 more
      Caused by: java.lang.ArrayStoreException: org.jboss.injection.WebServiceContextPropertyInjector
      at java.util.AbstractCollection.toArray(AbstractCollection.java:171)
      at org.jboss.ejb3.interceptor.InterceptorInjector.(InterceptorInjector.java:42)
      at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:610)
      at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:418)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:527)
      ... 30 more
      18:01:38,527 WARN Re: Bug: injecting WebServiceContext at AroundInvoke Failed to process changes

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bech Peer Bech Hansen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: