I just wanted to provide another data-point on this issue in case anyone has
any ideas.
When I move the JMX jars from Tomcat's common/lib directory and put them
into the server/lib directory, my web-app works fine.  Also, I tried running
the manager and admin web-apps and they seem ok.  I also verified that the
jmxproxy part of the manager web-app also appears to be working.  Assuming
that no other web-apps need JMX, is this an appropriate solution?  

Also, do web-apps located under /server/webapps have access to the libraries
in /server/lib?  This question isn't answered by the Classloader FAQ but I
seem to recall reading somewhere that they do have access to these
libraries.  In that case, will Tomcat function properly with the JMX jars in
server/lib?

Thanks,

Mark

-----Original Message-----
From: Mark Richards [mailto:[EMAIL PROTECTED]
Sent: March 17, 2004 3:42 PM
To: 'Tomcat Users List'
Subject: RE: JMX conflict in Tomcat 5.0


Ok, I tried with Tomcat 5.0.19 and 4.1.29.  It works fine on 4.1.29 but it
fails on 5.0.19 (and .18) with the following error:

2004-03-17 15:35:44,683 [DEBUG] (SystemSelectionAction.java:124) -
com.sun.jdmk.comm.CommunicationException: java.rmi.ServerException:
RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
        java.io.InvalidClassException: javax.management.ObjectName; Local
class not compatible: stream classdesc serialVersionUID=1081892073854801359
local class serialVersionUID=-5467795090068647408
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception
is:
        java.io.InvalidClassException: javax.management.ObjectName; Local
class not compatible: stream classdesc serialVersionUID=1081892073854801359
local class serialVersionUID=-5467795090068647408
java.io.InvalidClassException: javax.management.ObjectName; Local class not
compatible: stream classdesc serialVersionUID=1081892073854801359 local
class serialVersionUID=-5467795090068647408
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:240)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
        at
com.sun.jdmk.comm.RmiConnectorServerObjectImplV2_Stub.getAttribute(RmiConnec
torServerObjectImplV2_Stub.java:316)
        at
com.sun.jdmk.comm.RmiConnectorClient.connect(RmiConnectorClient.java:711)
        [snip]

So, it would appear that Tomcat 5's JMX jar is overriding my web-app's JMX
jar.

Can anyone tell me how Tomcat 5 uses JMX?  Is it possible to move Tomcat's
JMX jar into the server/lib directory?  I understand that Tomcat can use JMX
for the management webapp, but is it required, or optional?  Are there any
other reasons to use JMX?  The tomcat installation will be deployed
stand-alone with only my web app and whatever comes standard with Tomcat 5
(i.e. the management web app, etc).

Thanks,

Mark


-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: March 17, 2004 12:24 PM
To: Tomcat Users List
Subject: RE: JMX conflict in Tomcat 5.0



Hi,

>       The jmx-remote.jar and jmx-remote-tools.jar were in the archive
I
>downloaded from jakarta.apache.com (Tomcat 5.0.18).

Perhaps it's worth trying with 5.0.19?

Back to your original question: there's also commons-modeler
(http://jakarta.apache.org/commons/modeler/) to consider.  Tomcat uses
modeler fairly heavily to build its beans, and modeler had an MX4J
dependency last I checked.

Yoav Shapira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to