Re: [Ikvm-developers] JMX connector using Web Service
Brought to you by:
jfrijters
|
From: Antoine P. <ant...@gm...> - 2008-06-03 16:44:20
|
More info, when i manually make the connection i get the following exception : System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour 'com.sun.jmx.remote.ws.client.JMXW SConnector'. ---> System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour 'javax.xml.ws.wsaddressing.W3CEndpoint Reference'. ---> java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from ikvmres://com.ullink.jmx,%20Ve rsion=0.0.0.0,%20Culture=neutral,%20PublicKeyToken=null/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory m echanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) --- Fin de la trace de la pile d'exception interne --- à System.Runtime.CompilerServices.RuntimeHelpers._RunClassConstructor(IntPtr type) à System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type) à IKVM.Internal.TypeWrapper.RunClassInit() à IKVM.NativeCode.java.lang.Class.forName0(String name, Boolean initialize, Object loader) à java.lang.Class.forName0(String , Boolean , ClassLoader ) à java.lang.Class.forName(String className) à com.sun.jmx.remote.ws.DependencyChecker.checkClass(String , String , String ) à com.sun.jmx.remote.ws.DependencyChecker.checkDependencies() à com.sun.jmx.remote.ws.client.JMXWSConnector..cctor() --- Fin de la trace de la pile d'exception interne --- à com.sun.jmx.remote.ws.client.JMXWSConnector..ctor(JMXServiceURL url, Map map) à JMXConsole.Program.Main(String[] args) dans C:\visualWorkspace\JMXConsole\JMXConsole\Program.cs:ligne 35 It seems that i'm looking for a 2.1 version of JAXB, and ikvm is using 2.0, am i wrong ? Thanks, Antoine. 2008/6/3 Antoine Perridy <ant...@gm...>: > Hi Jeroen! > > I wanna connect to a JMX connector in web service . I'm using external > library which implements that connector (JSR 262, Web Services Connector for > Java Management Extensions (JMX) Agents). > > Here is my client in C#: > > // Update with your agent port > > int port = 9998; > > // Update with your agent host > > String host = "localhost"; > > // Update with your agent url path > > String urlPath = "/jmxws"; > > > // Create JMX Agent URL > > JMXServiceURL url = new JMXServiceURL("ws", host, port, urlPath); > > // Connect the JMXConnector > > JMXConnector connector = JMXConnectorFactory.connect(url, null); > // Exception raised > > > > // Get the MBeanServerConnection > > MBeanServerConnection connection = > connector.getMBeanServerConnection(); > > > > //SimpleClient.printProperties(connection); > > > > // getAttribute > > ObjectName mbeanName = new ObjectName("punki:type=User"); > > String value = (String) connection.getAttribute(mbeanName, "Name" > ); > > System.Console.WriteLine("Received : " + value); > > // close connection > > connector.close(); > > System.Console.WriteLine("Connection closed."); > > > > I get the following error message : "java.net.MalformedURLException: > Unsupported protocol: ws " > > The same client in java is working. > > Do you have any idea, do i miss something ? > > Thanks a lot :) > > Antoine. > > > |