1 Reply Latest reply on Jun 17, 2009 7:20 AM by Joe Luo

    AccessControlException when deploying SA

    valerie choy Newbie

      Hi,

       

      I have an SA with serviceMix-http-consumer and servicemix-cxf-bc (provider) that worked fine. But after I add a new component servicemix-jms consumer, I have problems deploying.

      (For  my testing, I used weblogic server to create new jms queues).

       

      my jms consumer xbean.xml file looks like:

       

      <jms:consumer service="abws:AbwsQJmsConsumerSvc"

           

      endpoint="AbwsQJmsConsumerSvcPort"

           

      targetService="abws:AbwsQCxfProviderSvc"

           

      targetEndpoint="AbwsQCxfProviderSvcPort"

           

      destinationName="com.mdsi.port.paJms.defaultCIS0.Req1Queue"

           

      replyDestinationName="com.mdsi.port.paJms.defaultCIS0.Resp1Queue"

           

      connectionFactory="#connectionFactory"

           

      destinationResolver="#jmsDestinationResolver" />

       

          <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">

              <property name="jndiName" value="com.mdsi.port.paJms.queueConnectionFactory" />

              <property name="jndiTemplate" ref="webLogicJndiTemplate" />

          </bean>

       

          <bean id="jmsDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver" >

              <property name="jndiTemplate">

                  <ref bean="webLogicJndiTemplate"/>

              </property>

          </bean>

       

          <bean id="webLogicJndiTemplate" class="org.springframework.jndi.JndiTemplate" >

               <property name="environment">

                  <props>

                      <prop key="java.naming.factory.initial"> weblogic.jndi.WLInitialContextFactory</prop>

                      <prop key="java.naming.provider.url"> t3://host-id:port</prop>

                  </props>

              </property>

          </bean>

       

      The exception I got back:

       

      DEBUG - JmsComponent                   - Service unit deployed

      ERROR - AutoDeploymentService          - Failed to update Service Assembly: abwsQSa

      java.security.AccessControlException: access denied (javax.management.MBeanTrustPermission register)

              at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)

              at java.lang.SecurityManager.checkPermission(SecurityManager.java:568)

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanTrustPermission(DefaultMBeanServerInterceptor.java:1824)

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:310)

              at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)

              at org.apache.servicemix.jbi.management.ManagementContext.registerMBean(ManagementContext.java:538)

              at org.apache.servicemix.jbi.management.ManagementContext.registerMBean(ManagementContext.java:520)

              at org.apache.servicemix.jbi.framework.Registry.registerServiceUnit(Registry.java:755)

              at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:530)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:354)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:257)

              at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExternalArchive(AutoDeploymentService.java:205)

              at org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:494)

              at org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:504)

              at org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:209)

              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:597)

              at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)

              at org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:323)

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)

              at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)

              at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)

              at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)

              at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)

              at java.security.AccessController.doPrivileged(Native Method)

              at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)

              at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)

              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:597)

              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)

              at sun.rmi.transport.Transport$1.run(Transport.java:159)

              at java.security.AccessController.doPrivileged(Native Method)

              at sun.rmi.transport.Transport.serviceCall(Transport.java:155)

              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)

              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)

              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)

              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:619)

       

       

      Any suggestion or help would be very much appreciated.

       

      V.