Announcement Announcement Module
Collapse
No announcement yet.
application on tomcat calling some ejb's on weblogic Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • application on tomcat calling some ejb's on weblogic

    Hi,

    I'm having trouble deploying a spring application on tomcat which needs to access a SLSB on a weblogic instance and obtained via a SimpleRemoteStatelessSessionProxyFactoryBean. After deployment, I get the following exception:

    SEVERE: Error registering Catalina:j2eeType=WebModule,name=//localhost/myapp,J2EEApplication=none,J2EEServer=none
    java.lang.SecurityException: access denied (javax.management.MBeanTrustPermission register)
    at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.checkMBeanTrustPermission(DefaultMBeanServerIn terceptor.java:1725)
    at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.registerMBean(DefaultMBeanServerInterceptor.ja va:342)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBe an(JmxMBeanServer.java:505)
    at org.apache.commons.modeler.Registry.registerCompon ent(Registry.java:871)
    at org.apache.catalina.core.StandardContext.registerJ MX(StandardContext.java:5281)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4306)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:866)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:850)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:638)
    at org.apache.catalina.core.StandardHostDeployer.addC hild(StandardHostDeployer.java:839)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    ...

    I think this issue is more related to tomcat but as there are some expert developers hanging around on this forum, I hope to improve my chances to get a satisfying answer :wink:.

  • #2
    OK, I found the answer myself,

    I had to add the following lines in my %JRE_HOME/lib/security/java.policy file:

    grant {
    permission javax.management.MBeanTrustPermission "register";
    };

    Hope this will help other people someday!

    Comment


    • #3
      Originally posted by kalgon View Post
      Hope this will help other people someday!
      It has thanks

      Comment


      • #4
        Thanks a lot! I struggled with this for a long time and your post directed me to the precise place

        It worked for me, too.

        I am using a Mac and in my case the file is here:
        /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/security/java.policy


        In my case I was trying to connect Mule to a JMS queue in weblogic and this was the error I was getting (it might help someone):


        Code:
        org.mule.api.MuleRuntimeException: MBeans Failed to initialise
        	at org.mule.module.management.agent.JmxAgent$MuleContextStartedListener.onNotification(JmxAgent.java:651)
        	at org.mule.context.notification.Sender.dispatch(Sender.java:40)
        	at org.mule.context.notification.Policy.dispatch(Policy.java:128)
        	at org.mule.context.notification.ServerNotificationManager.notifyListeners(ServerNotificationManager.java:214)
        	at org.mule.context.notification.ServerNotificationManager.fireNotification(ServerNotificationManager.java:167)
        	at org.mule.DefaultMuleContext.fireNotification(DefaultMuleContext.java:375)
        	at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:188)
        	at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:421)
        	at junit.framework.TestCase.runBare(TestCase.java:132)
        	at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:283)
        	at junit.framework.TestResult$1.protect(TestResult.java:110)
        	at junit.framework.TestResult.runProtected(TestResult.java:128)
        	at junit.framework.TestResult.run(TestResult.java:113)
        	at junit.framework.TestCase.run(TestCase.java:124)
        	at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:262)
        	at junit.framework.TestSuite.runTest(TestSuite.java:232)
        	at junit.framework.TestSuite.run(TestSuite.java:227)
        	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
        	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
        	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
        Caused by: 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.mule.module.management.agent.JmxAgent.registerStatisticsService(JmxAgent.java:330)
        	at org.mule.module.management.agent.JmxAgent$MuleContextStartedListener.onNotification(JmxAgent.java:641)
        	... 23 more

        Comment


        • #5
          Thank you very much.

          It works for me like a charm...

          +1 for you .

          Comment

          Working...
          X