<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: External JMX client cannot connect to MBeanServer in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956295#M356522</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the same problems too! - Can you email me your code to my e-mail-adress: ralf.steffens@t-systems.com  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Mar 2006 15:21:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-12T15:21:31Z</dc:date>
    <item>
      <title>External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaq-p/956288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm trying to get an external JMX client to connect to a SAP Web AS ABAP+Java 640 (Unicode, SP 9).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first problem was that I couldn't find the file &lt;/P&gt;&lt;P&gt;client.jar as written in "Compile and Run your Client" of &lt;/P&gt;&lt;P&gt;the JMX Service Interface documentation. I could solve the&lt;/P&gt;&lt;P&gt;"class not found" problems by using sapj2eeclient.jar, so &lt;/P&gt;&lt;P&gt;I think the file has just been renamed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then tried to run the following code, which has been &lt;/P&gt;&lt;P&gt;taken more or less from the "Connecting to an MBeanServer"&lt;/P&gt;&lt;P&gt;example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
import java.util.Properties;
 
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.naming.Context;
 
import com.sap.jmx.ObjectNameFactory;
import com.sap.jmx.remote.JmxConnectionFactory;
 
 
public class Client {
    
  public Client(
  ) { 
  }
  
  private void run(
  ) {
    try {
      Properties props = new Properties();
      
      props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
      props.setProperty(Context.SECURITY_PRINCIPAL, "J2EE_ADMIN");
      props.setProperty(Context.SECURITY_CREDENTIALS, "password");
      props.setProperty(Context.PROVIDER_URL, "my-server:50004");
      
      MBeanServerConnection mbsc = null;
      
      mbsc = JmxConnectionFactory.getMBeanServerConnection(
                JmxConnectionFactory.PROTOCOL_ENGINE_P4, props);
      
      String path = "Root/Services/Memory/AllocatedMemory";
      
      ObjectName name = null;
      
      name = ObjectNameFactory.getNameForMonitorPerNode(
                ObjectName.quote(path), null, null);
      System.out.println("ObjectName: " + name.getCanonicalName());
      
      Integer value = (Integer)mbsc.invoke(name, "getValue", null, null);    
      System.out.println("Value: " + value);
    }
    catch(Exception ex) {
      ex.printStackTrace();
    }
  }
  
  public static void main(
    String[] args
  ) {
        new Client().run();
  }
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
com.sap.engine.services.jmx.exception.JmxConnectorException: Unable to connect to connector server.
	at com.sap.engine.services.jmx.connector.p4.P4ConnectorClient.&amp;lt;init&amp;gt;(P4ConnectorClient.java:96)
	at com.sap.engine.services.jmx.connector.p4.ConnectorFactory.getJmxConnector(ConnectorFactory.java:31)
	at com.sap.jmx.remote.JmxConnectionFactory.getConnector(JmxConnectionFactory.java:191)
	at com.sap.jmx.remote.JmxConnectionFactory.getMBeanServerConnection(JmxConnectionFactory.java:92)
	at Client.run(Client.java:29)
	at Client.main(Client.java:51)
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception while trying to get InitialContext. [Root exception is com.sap.engine.services.security.exceptions.BaseLoginException: Cannot create new RemoteLoginContext instance.]
	at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:538)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
	at javax.naming.InitialContext.init(InitialContext.java:219)
	at javax.naming.InitialContext.&amp;lt;init&amp;gt;(InitialContext.java:195)
	at com.sap.engine.services.jmx.connector.p4.P4ConnectorClient.&amp;lt;init&amp;gt;(P4ConnectorClient.java:69)
	... 5 more
Caused by: com.sap.engine.services.security.exceptions.BaseLoginException: Cannot create new RemoteLoginContext instance.
	at com.sap.engine.services.security.remote.login.RemoteLoginContext.&amp;lt;init&amp;gt;(RemoteLoginContext.java:98)
	at com.sap.engine.services.jndi.implclient.LoginHelper.clientSideLogin(LoginHelper.java:78)
	at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:402)
	... 10 more
Caused by: java.lang.NullPointerException
	at com.sap.engine.services.security.remote.RemoteSecurity_Stub.getRemoteLoginContext(RemoteSecurity_Stub.java:678)
	at com.sap.engine.services.security.remote.login.RemoteLoginContext.&amp;lt;init&amp;gt;(RemoteLoginContext.java:93)
	... 12 more
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I doing something wrong? Any help or hint would be &lt;/P&gt;&lt;P&gt;greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Bernd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2005 15:50:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaq-p/956288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-27T15:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956289#M356516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bernd,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, you have figured it out about the sapj2eeclient.jar - congratulations &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; The reason for the current problem could be that your Web AS Java is not running. Please check that you have specified the correct connection parameters (my-server:50004) and that the server there is up and running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2005 16:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956289#M356516</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2005-06-27T16:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956290#M356517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vladimir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;The real server name is called sap-640-sapdb and I called with the correct server name&lt;/P&gt;&lt;P&gt;(I have just changed password and server in the example code).&lt;/P&gt;&lt;P&gt;It was up and running, of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could make it work, but only if my Client class is running localy on sap-640-sapdb.&lt;/P&gt;&lt;P&gt;I could not make it work to run remotely from my PC. I get the exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Caused by: java.rmi.ServerException: The server, that the client is connected with, isn't working.
The object is not redirectable!
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile I have installed a complete SAP NetWeaver Dev. Environment on my PC.&lt;/P&gt;&lt;P&gt;I get exactly the same error message, when I want to connect with Visual Administrator installed with the J2EE instance on my Windows PC to the J2EE instance running on the Linux box sap-640-sapdb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isn't it possible to use P4 protocol remotely?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Bernd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2005 14:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956290#M356517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-28T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956291#M356518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bernd&lt;/P&gt;&lt;P&gt;I am successful in using a JMX client remotely for logging the HTTP session data from SAP WebAS 710 release. I have done this in the context of monitoring the number of HTTP sessions to correlate with Memory utilized on WebAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The piece of code that I wrote is more or less similar to what you posted in the thread here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you would like to have a look at it, just let me know so that I can mail it to your id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2005 14:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956291#M356518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-21T14:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956292#M356519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu:&lt;/P&gt;&lt;P&gt;I find the same problem. Can you mail your code to me? &lt;/P&gt;&lt;P&gt;My email is : dhl_garf@hotmail.com&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;Garf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2005 07:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956292#M356519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-27T07:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956293#M356520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu, Garf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have same problem, can you mail it also to me ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My email is : postbus111@gmail.com&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2005 10:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956293#M356520</guid>
      <dc:creator>hans_harder</dc:creator>
      <dc:date>2005-11-15T10:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956294#M356521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I am using SAP WAS 6.4. I am having problems in connecting from a remote JMX client to obtain the metrics.  Can you please email me your code?&lt;/P&gt;&lt;P&gt;     My email-id is sridhar1975@gmail.com.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sridhar Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2005 08:44:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956294#M356521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-26T08:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956295#M356522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the same problems too! - Can you email me your code to my e-mail-adress: ralf.steffens@t-systems.com  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Mar 2006 15:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956295#M356522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-12T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956296#M356523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the same problems too! - Can you email me your code to my e-mail-adress: ralf.steffens@t-systems.com  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Mar 2006 15:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956296#M356523</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-12T15:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956297#M356524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You guys have wrong key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should change the key to "/Services/Memory/AllocatedMemory".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a fun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2009 03:53:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956297#M356524</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-09T03:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956298#M356525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am working on a similar JMX External Client to pull data from the monitoring service.  I am running into a similar error.  Am I perhaps missing an import?  If any of you could share your work on how to get a valid p4 connection/MBeanServerConnection that would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import java.util.*;&lt;/P&gt;&lt;P&gt;import javax.naming.Context;&lt;/P&gt;&lt;P&gt;import javax.management.MBeanServerConnection;&lt;/P&gt;&lt;P&gt;import javax.management.ObjectName;&lt;/P&gt;&lt;P&gt;import com.sap.jmx.ObjectNameFactory;&lt;/P&gt;&lt;P&gt;import com.sap.jmx.remote.JmxConnectionFactory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class JMXProgram {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	public static void main(String[] args) {&lt;/P&gt;&lt;P&gt;		System.out.println(" Class execution started");&lt;/P&gt;&lt;P&gt;		try {&lt;/P&gt;&lt;P&gt;		 	Properties connectionProperties = new Properties();&lt;/P&gt;&lt;P&gt;			connectionProperties.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");&lt;/P&gt;&lt;P&gt;			connectionProperties.setProperty(Context.PROVIDER_URL, "&amp;lt;hostname&amp;gt;:&amp;lt;p4_port&amp;gt;");&lt;/P&gt;&lt;P&gt;			connectionProperties.setProperty(Context.SECURITY_PRINCIPAL, "&amp;lt;username&amp;gt;");&lt;/P&gt;&lt;P&gt;			connectionProperties.setProperty(Context.SECURITY_CREDENTIALS, "&amp;lt;password&amp;gt;");&lt;/P&gt;&lt;P&gt;			System.out.println(JmxConnectionFactory.PROTOCOL_ENGINE_P4);&lt;/P&gt;&lt;P&gt;			MBeanServerConnection mbsc = JmxConnectionFactory.getMBeanServerConnection(JmxConnectionFactory.PROTOCOL_ENGINE_P4, connectionProperties);&lt;/P&gt;&lt;P&gt;			System.out.println("Made it this far");&lt;/P&gt;&lt;P&gt;			String path = "/Root/Services/Memory/AllocatedMemory";&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;      		ObjectName name = null;&lt;/P&gt;&lt;P&gt;			&lt;/P&gt;&lt;P&gt;      		name = ObjectNameFactory.getNameForMonitorPerNode(ObjectName.quote(path), null, null);&lt;/P&gt;&lt;P&gt;			System.out.println("ObjectName: " + name.getCanonicalName());&lt;/P&gt;&lt;P&gt;			Integer value = (Integer)mbsc.invoke(name, "getValue", null, null);    &lt;/P&gt;&lt;P&gt;			System.out.println("Value: " + value);&lt;/P&gt;&lt;P&gt;		}&lt;/P&gt;&lt;P&gt;		catch (Exception e) {&lt;/P&gt;&lt;P&gt;			System.out.println("Exception caught!");&lt;/P&gt;&lt;P&gt;			//System.out.println(e.getMessage());&lt;/P&gt;&lt;P&gt;			System.out.println(e.toString());&lt;/P&gt;&lt;P&gt;		}&lt;/P&gt;&lt;P&gt;		System.out.println(" Class execution complete");&lt;/P&gt;&lt;P&gt;	}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the output of the program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Class execution started&lt;/P&gt;&lt;P&gt;service:jmx:com.sap.engine.services.jmx.connector.p4:&lt;/P&gt;&lt;P&gt;Exception caught!&lt;/P&gt;&lt;P&gt;com.sap.engine.services.jmx.exception.JmxConnectorException: Unable to connect to connector server.&lt;/P&gt;&lt;P&gt; Class execution complete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Apr 2009 00:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956298#M356525</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-19T00:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956299#M356526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this might help full to u &lt;/P&gt;&lt;P&gt;&lt;A href="http://nanobitinc.com/education/training/SAP/NetWeaver/Monitoring%20and%20Management.pdf" target="test_blank"&gt;http://nanobitinc.com/education/training/SAP/NetWeaver/Monitoring%20and%20Management.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_webas630/helpdata/en/64/617cfb94845d468b0498b4b2c53d74/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_webas630/helpdata/en/64/617cfb94845d468b0498b4b2c53d74/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="413256"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know am i reached ur destiny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bvr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: bvr on Apr 20, 2009 7:50 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 05:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956299#M356526</guid>
      <dc:creator>ravindra_bollapalli2</dc:creator>
      <dc:date>2009-04-20T05:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956300#M356527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I reviewed the links you posted and they do provide the best information SAP has available.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The link to the the forum post is somewhat relevant - though it appears for an internal JMX Client to register an MBean.  There is no code posted, only the error message and some xml config for a local J2EE application.  What isn't disucssed in the post is how to monitor or query that bean. Again, I am working on an external JMX Client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAP Help Documentation for 630 almost worked!  I got the same error message however and was given warnings by NetWeaver Developer Studio the methods were deprecated.  I am using 700 NW04S.  Here is where the 630 documentation differed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MBeanServerConnection  mbsc =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  JmxClientFactory.getJmxClient().getMBeanServerConnection&lt;/P&gt;&lt;P&gt;(P4ConnectorClient.ADDRESS_PREFIX, connectionProperties);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PDF link is a copy of the SAP Help Documentation for version 700.  An excerpt from the article:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import java.util.Properties;&lt;/P&gt;&lt;P&gt;import javax.naming.Context;&lt;/P&gt;&lt;P&gt;import com.sap.jmx.remote.JmxConnectionFactory;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;// set the connection properties for the RMI-P4 connection&lt;/P&gt;&lt;P&gt;Properties connectionProperties = new Properties();&lt;/P&gt;&lt;P&gt;connectionProperties.setProperty(Context.INITIAL_CONTEXT_FACTORY,&lt;/P&gt;&lt;P&gt;"com.sap.engine.services.jndi.InitialContextFactoryImpl");&lt;/P&gt;&lt;P&gt;connectionProperties.setProperty(Context.PROVIDER_URL, "&amp;lt;hostname&amp;gt;:&amp;lt;&lt;/P&gt;&lt;P&gt;p4-port&amp;gt;");&lt;/P&gt;&lt;P&gt;connectionProperties.setProperty(Context.SECURITY_PRINCIPAL, "&amp;lt;username&amp;gt;");&lt;/P&gt;&lt;P&gt;connectionProperties.setProperty(Context.SECURITY_CREDENTIALS,&lt;/P&gt;&lt;P&gt;"&amp;lt;password&amp;gt;");&lt;/P&gt;&lt;P&gt;// create the MBeanServerConnection&lt;/P&gt;&lt;P&gt;MBeanServerConnection mbsc =&lt;/P&gt;&lt;P&gt;JmxConnectionFactory.getMBeanServerConnection(JmxConnectionFactory.&lt;/P&gt;&lt;P&gt;PROTOCOL_ENGINE_P4, connectionProperties);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what  based my above code on.  The documentation states this is what is needed to create a connection to the MBean Server.  There is a final note:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are either accessing a local MBeanServer from an application, or using&lt;/P&gt;&lt;P&gt;the RMI-P4 JMX Connector, you have to be logged in with a user in the default&lt;/P&gt;&lt;P&gt;administrator role.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following this article exactly, as I have used the Admin user for the Java AS.   This user is in the Administrators group, has the Administrator role - as well Content Admin, System Admin and User admin.  Becuase of this, I don't think this is a permission issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried this from a Portal Abstract Component, (internal JMX Client) and get similar results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;java.rmi.RemoteException: unable to create connector; nested exception is: java.lang.ClassCastException&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 01:27:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956300#M356527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-21T01:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: External JMX client cannot connect to MBeanServer</title>
      <link>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956301#M356528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try port number 50104 instead of 50004&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 13:10:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/external-jmx-client-cannot-connect-to-mbeanserver/qaa-p/956301#M356528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T13:10:14Z</dc:date>
    </item>
  </channel>
</rss>

