Go Back   The UNIX and Linux Forums > Top Forums > Programming


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-18-2012
Registered User
 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
JMX Client MalformedURLException

Hi

I am writing a JMX client to fetch the MBeans and its attributes. i am able to display weblogic MBeans using the following code snippet. But my requirement is it should run on Unix box. I copied same client onto unix, then i am getting the following error.


Code:
<b>MalformedURLExceptionjava.net.MalformedURLException: Unsupported protocol: t3</b>

Code Snippet:


Code:
try { String protocol = "t3"; Integer portInteger = Integer.valueOf(portString); int port = portInteger.intValue(); String jndiroot = "/jndi/"; String mserver = "weblogic.management.mbeanservers.runtime"; JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,jndiroot + mserver); Hashtable h = new Hashtable(); h.put(Context.SECURITY_PRINCIPAL, username); h.put(Context.SECURITY_CREDENTIALS, password); h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote"); connector = JMXConnectorFactory.connect(serviceURL, h); connection = connector.getMBeanServerConnection(); }catch(MalformedURLException me){ System.out.println("MalformedURLException"+me); } catch(IOException ie){ System.out.println("IOException"+ie); } catch(Exception e){ System.out.println("Exception"+e);
}

Thanks
tripleM

Moderator's Comments:
Video tutorial on how to use code tags in The UNIX and Linux Forums.

Last edited by radoulov; 05-18-2012 at 05:35 AM.. Reason: Code tags, moved to programming.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
JMX Client -MalformedURLException tripleM UNIX and Linux Applications 1 05-18-2012 06:27 AM
NIM : remove nim client info from the client stephnane AIX 2 03-15-2012 07:16 AM
Client/Server Socket Application - Preventing Client from quitting on server crash varun.nagpaal Programming 2 08-27-2009 10:57 PM
SSH client zylwyz UNIX for Dummies Questions & Answers 2 06-30-2005 04:36 AM



All times are GMT -4. The time now is 05:29 AM.