request TOMCAT use the weblogic.management.remote package from wljmxclient.jar instead as illustrated here:
Djmx.remote.protocol.provider.pkgs=weblogic.management.remote and Djava.class.path="D:\jdk1.5.0_16\lib\jconsole.jar;D:\jdk1.5.0_16\lib\tools.jar;%WL_HOME%\server\lib\wljmxclient.jar" http://e-docs.bea.com/wls/docs81/jms/thin_client.html Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Tue, 16 Jun 2009 07:39:17 -0700 > From: pankajtan...@gmail.com > To: users@tomcat.apache.org > Subject: Using JMX with Tomcat: classloading issues > > > Hi all, > I am writing a webapp that uses JMX to manage weblogic and websphere servers > and hosting it on Tomcat 6.0.18. The app also uses Jython to manipulate > MBeans within the app servers. > > Here's the issue that I'm facing: > To get a JMX connection using JMXConnectionFactory using below: > JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h); > I have to rely on classes in weblogic.jar > That is because the implementation of JMXConnector is in weblogic.jar. > However, the interface/abstract class for JMXConnectionFactory lives in > rt.jar that comes with JDK1.5 or JDK1.6 > > Because rt.jar is (probably) used by the bootstrap classloader, I HAVE to > include weblogic.jar in the CATALINA_HOME/common/lib directory. If I do so, > I can get the JMX part of the solution to work because both, rt.jar and > weblogic.jar are loaded by the same (system) classloader. > > But then my Jython classes do not work because jython.jar is tucked away in > the webapp's WEB-INF/lib dir of the webapp and my Jython solution needs > classes from weblogic.jar which is loaded by the system classloader and > hence in a different namespace. > I tried placing jython.jar in common/lib too, but that did not work because > Jython needs classes from my webapp and I go down a slippery slope of > chasing classes across classlaoders. > > So the ideal solution would be to get weblogic.jar loaded from the webapp > classloader. And not place anything in the CATALINA_HOME/common/lib > directory. > > How can I place weblogic.jar in the webapp classlaoder and have my JMX > solution work, given that javax.management.remote.JMXConnectorFactory > resides in rt.jar which is in the System classpath? > > Any pointers will be appreciated! > > Thanks a lot! > > Pankaj > > > > > -- > View this message in context: > http://www.nabble.com/Using-JMX-with-Tomcat%3A-classloading-issues-tp24055767p24055767.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Microsoft brings you a new way to search the web. Try Bing™ now http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1