Announcement Announcement Module
Collapse
No announcement yet.
Spring JMX and Weblogic 8.1.4 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JMX and Weblogic 8.1.4

    I am testing Spring JMX and weblogic 8.1.4

    I am able to register mbean with the server. I can see my bean via MC4J. However when I am trying to invoke the method I am getting this exception:

    java.lang.reflect.UndeclaredThrowableException at $Proxy10.invoke(Unknown Source) at org.mc4j.console.bean.operation.OperationExecution ResultsVisualPanel$2.run(OperationExecutionResults VisualPanel.java:126) at java.lang.Thread.run(Thread.java:534) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.mc4j.console.connection.proxy.GenericMBeanServ erProxy.invoke(GenericMBeanServerProxy.java:79) ... 3 more Caused by: javax.management.ReflectionException: The target object class class javax.management.modelmbean.ModelMBeanOperationInf o could not be found at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108) at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:137) at weblogic.management.internal.RemoteMBeanServerImpl _814_WLStub.invoke(Unknown Source) ... 8 more java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.mc4j.console.connection.proxy.GenericMBeanServ erProxy.invoke(GenericMBeanServerProxy.java:79) at $Proxy10.invoke(Unknown Source) at org.mc4j.console.bean.operation.OperationExecution ResultsVisualPanel$2.run(OperationExecutionResults VisualPanel.java:126) at java.lang.Thread.run(Thread.java:534) Caused by: javax.management.ReflectionException: The target object class class javax.management.modelmbean.ModelMBeanOperationInf o could not be found at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108) at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:137) at weblogic.management.internal.RemoteMBeanServerImpl _814_WLStub.invoke(Unknown Source) ... 8 more javax.management.ReflectionException: The target object class class javax.management.modelmbean.ModelMBeanOperationInf o could not be found at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108) at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:137) at weblogic.management.internal.RemoteMBeanServerImpl _814_WLStub.invoke(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.mc4j.console.connection.proxy.GenericMBeanServ erProxy.invoke(GenericMBeanServerProxy.java:79) at $Proxy10.invoke(Unknown Source) at org.mc4j.console.bean.operation.OperationExecution ResultsVisualPanel$2.run(OperationExecutionResults VisualPanel.java:126) at java.lang.Thread.run(Thread.java:534)
    Here is a snippet of my configuration:

    Code:
    	<bean id="profilingInterceptor" class="shaw.spectrum.framework.aop.ProfilingInterceptor">
    		<property name="enableProfiling" value="true"/>
    	</bean>
    	
    	<bean id="adapter" class="org.springframework.jmx.export.MBeanExporter">
    		<property name="beans">
    			<map>
    				<entry key="spring:name=profilingInterceptor" value-ref="profilingInterceptor"/>
    			</map>
    		</property>
    		<property name="server" ref="mbeanServer"/>
    	</bean>
    	
    	<bean id="mbeanServer" class="org.springframework.jmx.support.WebLogicJndiMBeanServerFactoryBean">
    	</bean>
    I appreciate any help.

    Thanks,

    Vitaliy

  • #2
    After some digging here is what I discovered.

    I am using Spring 1.2.6 with Weblogic 8.1 SP4 (JDK 1.4.2-05). Trying to connect from MC4J 1.2 beta 9. What interesting is that exception referes to the missing file javax.management.modelmbean.ModelMBeanOperationInf o which is part of JDK 1.5.

    MC4J 1.2 b9 says that 1.4 is supported but 1.5 is recommended. I will try to upgrade to 1.5 but I am curious if anybody else had similar problem.

    Thanks,
    Vitaliy

    Comment


    • #3
      Try using a different jmx console (a servlet base if you want) and see how it behaves. If you don't get any exception then is a problem with the client pretty much.

      Comment


      • #4
        That was my thought exactly but I tried jManage and got exactly same message. I tried both clients against same weblogic instance too.

        Vitaliy

        Comment


        • #5
          Does weblogic runs on jdk 1.5 while your client on an older jdk? The notifications send across the wire might be incompatible.

          Comment


          • #6
            I don't have jdk 1.5 installed on my computer. JAVA_HOME is set to jdk inside of bea installation.

            Vitaliy

            Comment


            • #7
              ModelMBeanOperationInfo comes as part of JMX which is now included as standard on Java 5.0. I use MC4J a lot with Spring JMX and Java 5.0. If it doesn't work with 1.4 then there is a problem somewhere with classpath if MMBOI cannot be found.

              Rob

              Comment


              • #8
                Just to make sure I understood you correctly.

                I am not using jdk1.5. Both, MC4J and Weblogic are running on the same jdk142_05. My classpath is only this: C:\Program Files\Java\j2re1.4.2_05\lib\ext\QTJava.zip which I can clean out.

                I could not find any information if any additional libraries are needed for MC4J or Weblogic to work with JMX under jdk142. Please let me know if I need to add some specific libraries.

                Thanks,
                Vitaliy

                Comment


                • #9
                  This helped me to solve the exception with ModelMBeanOperationInfo:
                  http://opensource.atlassian.com/proj...5#action_15054

                  But now my own MBean class isn't found:
                  javax.management.ReflectionException: The target object class de.dekies.job.mbean.JobManager could not be found
                  at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108)
                  at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:137)
                  at weblogic.management.internal.RemoteMBeanServerImpl _814_WLStub.invoke(Unknown Source)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.mc4j.console.connection.proxy.GenericMBeanServ erProxy.invoke(GenericMBeanServerProxy.java:79)
                  at $Proxy9.invoke(Unknown Source)
                  at org.mc4j.console.bean.operation.OperationExecution ResultsVisualPanel$2.run(OperationExecutionResults VisualPanel.java:126)
                  at java.lang.Thread.run(Thread.java:534)
                  Any ideas? I'm also running Weblogic 8.1.4 with JDK 1.4.2.

                  Comment


                  • #10
                    Wonder if &quot;exposeManagedResourceClassLoader&quot; of MBeanExporter can help?

                    I'm exploring the same problem. I've seen references to this issue in several mailing lists and forums. So far, the only workaround that I've heard works is to place your application classes directly on the system classpath of the appserver, ahead of "weblogic.jar".

                    The problem is related to classloaders, but it's a little hard to grok.

                    After some digging, I happened to notice the "exposeManagedResourceClassLoader" property of the "MBeanExporter" class. This flag defaults to false. If it is set to true, then the model mbean changes the context classloader to the classloader "of the resource" before calling "invoke()", and changes it back after. I wonder if this will fix the problem?

                    Unfortunately, it will be hard for me to take advantage of this, as I'm forced to use Spring 1.2.1 at this time, and the changes to use this property didn't go in until a later release.

                    Comment


                    • #11
                      Posted an entry on how i got around the issue here.

                      Comment

                      Working...
                      X