Results 1 to 5 of 5

Thread: application on tomcat calling some ejb's on weblogic

  1. #1
    Join Date
    Oct 2004
    Posts
    14

    Default 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:.
    Xavier.

  2. #2
    Join Date
    Oct 2004
    Posts
    14

    Default

    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!
    Xavier.

  3. #3
    Join Date
    Oct 2007
    Posts
    1

    Default

    Quote Originally Posted by kalgon View Post
    Hope this will help other people someday!
    It has thanks

  4. #4
    Join Date
    Sep 2007
    Posts
    3

    Thumbs up

    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

  5. #5
    Join Date
    Sep 2007
    Posts
    12

    Default Thank you very much.

    It works for me like a charm...

    +1 for you .

Similar Threads

  1. Replies: 1
    Last Post: Jun 30th, 2005, 12:56 AM
  2. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  3. Questioning the core component
    By Martin Kersten in forum Swing
    Replies: 6
    Last Post: Feb 21st, 2005, 03:45 AM
  4. Replies: 3
    Last Post: Oct 28th, 2004, 05:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •