3 Replies Latest reply on Jan 21, 2010 11:28 AM by Bodo Pfelzer

    Unable to make WAR file depend on MBean in EAR on JBoss-4.2.3

    Bodo Pfelzer Newbie

      I try to deploy an ear that contains several MBeans and a web application. The web application is configured in application.xml the MBeans are configured in jboss-app.xml. One MBean should be started (without an excpetion in start()) before all other components are activated. I succeeded to add a dependency for the other MBeans by adding a <depends> to the xyz-service.xml. When I add the same dependency to the jboss-web.xml I get the following exception:

       

      2010-01-21 10:51:46,204 WARN  [org.jboss.system.ServiceController] Problem starting service jboss.web.deployment:war=abc.war,id=-502390852

      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.security.jacc.PolicyContextException: Operation not allowed)

      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:384)

      at org.jboss.web.WebModule.startModule(WebModule.java:83)

      at org.jboss.web.WebModule.startService(WebModule.java:61)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

      at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

      at $Proxy0.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:417)

      at org.jboss.system.ServiceController.start(ServiceController.java:435)

      at org.jboss.system.ServiceController.start(ServiceController.java:435)

      at org.jboss.system.ServiceController.start(ServiceController.java:435)

      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy25.start(Unknown Source)

      at org.jboss.deployment.EARDeployer.start(EARDeployer.java:362)

      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

      at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy9.deploy(Unknown Source)

      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)

      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

      at $Proxy0.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:417)

      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy4.start(Unknown Source)

      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)

      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy5.deploy(Unknown Source)

      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)

      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)

      at org.jboss.Main.boot(Main.java:200)

      at org.jboss.Main$1.run(Main.java:508)

      at java.lang.Thread.run(Thread.java:595)

      Caused by: javax.security.jacc.PolicyContextException: Operation not allowed

      at org.jboss.security.jacc.JBossPolicyConfiguration.validateState(JBossPolicyConfiguration.java:216)

      at org.jboss.security.jacc.JBossPolicyConfiguration.linkConfiguration(JBossPolicyConfiguration.java:175)

      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:365)

      ... 97 more

      Caused by: org.jboss.util.state.IllegalTransitionException: No transition for action: linkConfiguration from state:inService

      at org.jboss.util.state.StateMachine.nextState(StateMachine.java:126)

      at org.jboss.security.jacc.JBossPolicyConfiguration.validateState(JBossPolicyConfiguration.java:211)

      ... 99 more

       

      What is my mistake?