0 Replies Latest reply on Jun 4, 2006 4:52 PM by John Gilbert

    Should @RunAs work in Embedded alpha8?

    John Gilbert Apprentice

      I am getting some wierd results.

      I have 3 SLSBs with permissions defines, 2 MDBs with RunAs, and 1 junit test which connects with credentials.

      The junit test calls slsb0 successful, which publishes a message to a topic.

      The mdb1 calls slsb1 successfully, with or without @RunAs configured. Wierd!

      The mdb2 calls slsb2 and fails with an authentication exception without @RunAs configured. Good! But gets the following exception at container initialization when @RunAs configured:

      java.lang.NullPointerException
      at org.jboss.ejb3.security.RunAsSecurityInterceptorFactory.createPerClass(RunAsSecurityInterceptorFactory.java:52)
      at org.jboss.aop.advice.AspectFactoryDelegator.createPerClass(AspectFactoryDelegator.java:107)
      at org.jboss.aop.Advisor.addPerClassAspect(Advisor.java:598)
      at org.jboss.aop.advice.ScopedInterceptorFactory.create(ScopedInterceptorFactory.java:72)
      at org.jboss.aop.Advisor.createInterceptorChain(Advisor.java:646)
      at org.jboss.aop.Advisor.pointcutResolved(Advisor.java:916)
      at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:678)
      at org.jboss.aop.ClassContainer.createInterceptorChains(ClassContainer.java:247)
      at org.jboss.aop.ClassContainer.rebuildInterceptors(ClassContainer.java:113)
      at org.jboss.aop.ClassContainer.initializeClassContainer(ClassContainer.java:56)
      at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:516)
      at org.jboss.ejb3.mdb.MDB.start(MDB.java:209)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
      at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:100)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:582)
      at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:175)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
      at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
      at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:73)
      at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:91)
      at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:439)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:486)
      at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:460)
      at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.scanClasspath(EJB3StandaloneBootstrap.java:291)
      at net.taylor.jboss.EJB3Container.startupEmbeddedJboss(EJB3Container.java:63)
      at net.taylor.jboss.EJB3Container.setUp(EJB3Container.java:31)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:124)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:457)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:670)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


      Am I just ahead of the curve?