|
Home > Archive > WebSphere Application Server > April 2006 > Jmxc.jar and Jboss-jmx.jar not working together
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Jmxc.jar and Jboss-jmx.jar not working together
|
|
|
| hi
i am working on application server runtime monitoring module and in which i have a seperate agent for Jboss and WebSphere.
Now, at runtime i have to add both application server's Vendor specific jars into Classpath like,
jmxc.jar and jboss-jmx.jar.
then only i can get the parameter info through JMX Agent.
Now, in this case which one load first that jar's application server i can monitor like if in my classpath i put 'jboss-jmx.jar' first and 'jmxc.jar' second then i can monitor Jboss but when i try to monitor WebSphere it will give me following exception:
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.queryNames(Unknown Source)
at com.ibm.ws.management.AdminClientImpl.queryNames(AdminClientImpl.java:87)
at WebSphereMonitorMain.testMBeanDetail(WebSphereMonitorMain.java:103)
at WebSphereMonitorMain.main(WebSphereMonitorMain.java:657)
Caused by: [SOAPException: faultCode=SOAP-ENV:Server.Exception; msg=ADMC0011E: SOAP RPC call can not be unmarshalled; targetException=java.lang.IllegalArgumentException: javax.management.ObjectName; local class incompatible: stream classdesc serialVersion
UID = 1081892073854801359, local class serialVersionUID = -5467795090068647408]
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.handleAdminFault(SOAPConnectorClient.java:610)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplate(SOAPConnectorClient.java:579)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.queryNames(SOAPConnectorClient.java:381)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invoke(SOAPConnectorClient.java:321)
... 4 more
Exception in thread "main"
See here both can work independently but not together , can any body help me out how can set this both the jar togetehr into classpath.
because my requirement is at runtime from Web UI User can see the WebSphere as well Jboss Parameter and for this i require this both jar files into my runtime classpath.
i need urgent reply, pls help me i am new for WebSphere.
thanks in advance
lbrd.
| |
| Paul Ilechko 2006-04-27, 8:08 am |
| arvind.maadam@realsoftinc.com wrote:
> hi
>
> i am working on application server runtime monitoring module and in
> which i have a seperate agent for Jboss and WebSphere.
>
> Now, at runtime i have to add both application server's Vendor
> specific jars into Classpath like,
>
> jmxc.jar and jboss-jmx.jar.
Have you thought about checking those jars for classname conflicts ?
| |
| Ken Hygh 2006-04-27, 8:08 am |
| Do the versions of JBoss and WebSphere that you're using both support
the same version of JMX? You could be fighting API changes between JMX
versions.
Ken
arvind.maadam@realsoftinc.com wrote:
> hi
>
> i am working on application server runtime monitoring module and in which i have a seperate agent for Jboss and WebSphere.
>
> Now, at runtime i have to add both application server's Vendor specific jars into Classpath like,
>
> jmxc.jar and jboss-jmx.jar.
>
> then only i can get the parameter info through JMX Agent.
>
> Now, in this case which one load first that jar's application server i can monitor like if in my classpath i put 'jboss-jmx.jar' first and 'jmxc.jar' second then i can monitor Jboss but when i try to monitor WebSphere it will give me following exception
:
>
> java.lang.reflect.UndeclaredThrowableException
> at $Proxy0.queryNames(Unknown Source)
> at com.ibm.ws.management.AdminClientImpl.queryNames(AdminClientImpl.java:87)
> at WebSphereMonitorMain.testMBeanDetail(WebSphereMonitorMain.java:103)
> at WebSphereMonitorMain.main(WebSphereMonitorMain.java:657)
> Caused by: [SOAPException: faultCode=SOAP-ENV:Server.Exception; msg=ADMC0011E: SOAP RPC call can not be unmarshalled; targetException=java.lang.IllegalArgumentException: javax.management.ObjectName; local class incompatible: stream classdesc serialVersi
onUID = 1081892073854801359, local class serialVersionUID = -5467795090068647408]
> at com.ibm.ws.management.connector.soap.SOAPConnectorClient.handleAdminFault(SOAPConnectorClient.java:610)
> at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplate(SOAPConnectorClient.java:579)
> at com.ibm.ws.management.connector.soap.SOAPConnectorClient.queryNames(SOAPConnectorClient.java:381)
> at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invoke(SOAPConnectorClient.java:321)
> ... 4 more
> Exception in thread "main"
>
> See here both can work independently but not together , can any body help me out how can set this both the jar togetehr into classpath.
>
> because my requirement is at runtime from Web UI User can see the WebSphere as well Jboss Parameter and for this i require this both jar files into my runtime classpath.
>
> i need urgent reply, pls help me i am new for WebSphere.
> thanks in advance
>
> lbrd.
| |
|
| hi paul,
thanks for giving me reply,
see i am not sure but i think it is giving me package conflicts. because both this jars using same package of JMX only difference is implementation and may be JMX version as well we can think like both compiled into different version of jdk.
but see this all are my assumptions but i am also not able to understand the exact problem that what is going wrong.
thanks,
alir1
| |
| Paul Ilechko 2006-04-27, 8:08 am |
| arvind.maadam@realsoftinc.com wrote:
> hi paul,
>
> thanks for giving me reply,
>
> see i am not sure but i think it is giving me package conflicts.
> because both this jars using same package of JMX only difference is
> implementation and may be JMX version as well we can think like both
> compiled into different version of jdk.
>
> but see this all are my assumptions but i am also not able to
> understand the exact problem that what is going wrong.
I think you need to find an experienced Java programmer to help you.
| |
|
| hi ken
after long time i am back again with the same query,
ya u r true. i want to monitor WebSphere 5.1 which is using JMX 1.1 while Jboss 4.0.0 which is using JMX 1.2.
Now, here i am fighting with the API. can u tell me any solution.
becuaw at runtime which version's jar set first in classpath that JMX jar will work and other one giving me SerialVersion error stack trace as follow.
2006-04-29 11:49:08,953 WARN org.jnp.interfaces.NamingContext[main] - Failed to connect to localhost:1099
javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: conne
ct]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:212)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1185)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:515)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.realsoftinc.admincentral.appserver.jboss4.JbossMonitorMain.<init>(JbossMonitorMain.java:220)
at com.realsoftinc.admincentral.appserver.jboss4.JbossMonitorMain.getInstance(JbossMonitorMain.java:325)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.monitorJboss4(MonitorMain.java:213)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.doMonitor(MonitorMain.java:90)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.main(MonitorMain.java:76)
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:186)
... 9 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:182)
... 9 more
java.lang.IllegalStateException: Failed to find method for hash:-884175917852741154
at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:367)
at org.jboss.ha.framework.server.HARMIServerImpl.invoke(HARMIServerImpl.java:210)
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:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)
at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:127)
at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:196)
at $Proxy0.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:529)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.realsoftinc.admincentral.appserver.jboss4.JbossMonitorMain.<init>(JbossMonitorMain.java:220)
at com.realsoftinc.admincentral.appserver.jboss4.JbossMonitorMain.getInstance(JbossMonitorMain.java:325)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.monitorJboss4(MonitorMain.java:213)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.doMonitor(MonitorMain.java:90)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.main(MonitorMain.java:76)
java.lang.NullPointerException
at com.realsoftinc.admincentral.appserver.test.MonitorMain.monitorJboss4(MonitorMain.java:218)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.doMonitor(MonitorMain.java:90)
at com.realsoftinc.admincentral.appserver.test.MonitorMain.main(MonitorMain.java:76)
do u have any idea about this.
thanks
lbrd
| |
| Paul Ilechko 2006-04-29, 7:21 am |
| lirin_oza@hotmail.com wrote:
> hi ken
>
> after long time i am back again with the same query,
>
> ya u r true. i want to monitor WebSphere 5.1 which is using JMX 1.1
> while Jboss 4.0.0 which is using JMX 1.2.
>
> Now, here i am fighting with the API. can u tell me any solution.
>
> becuaw at runtime which version's jar set first in classpath that JMX
> jar will work and other one giving me SerialVersion error stack trace
> as follow.
> do u have any idea about this.
Maybe you can do something clever with custom classloaders ?
|
|
|
|
|