JMX Parameters

Hi
can anyone please tell me that where should i place jmx paramters for jconsole in catalina.sh
i have placed them at the start of catalina.sh file and it works fine. but when i try to shutdown tomcat i get exception that port is already in use. exception is below.
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8008; nested exception is:
java.net.BindException: Address already in use
i am unable to understand that y it is throwing this exception coz port is really in use and it should stop this port.
when i change parameters position in catalina and start tomcat then i get some other exceptions in catalina.out of tomcat and tomcat doesn't start properly.
tomcat server is hosted on a linux machine and i am using remote jconsole to access it.
and i am using following parameters:
JAVA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=8008 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=true \
-Dcom.sun.management.jmxremote.password.file=/u/bin/apache-tomcat-6.0.18/conf/jmxremote.password"
Thanks in advance.
Regards,
Kashif

I recommend following the steps outlined in [Monitoring and Managing Tomcat 5.5|http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html], including setting CATALINA_OPTS as described on that page.

Similar Messages

  • JMX params in jnlp file?

    I tried the following entry in jnlp to expose jmx inmy app.
    <resources>
    <j2se version="1.6.0_12" java-vm-args="-Xverify:none -Xmx1024m -XX:MaxPermSize=128m" href="http://hostname:11931/LB/jre"/>
    <property name="com.sun.management.jmxremote.port" value="5432"/>
    <property name="com.sun.management.jmxremote.authenticate" value="false"/>
    <property name="com.sun.management.jmxremote.ssl" value="false"/>
    </resources>  It doesnt seem to work. Can anybody please tell me how to do this in jnlp file.

    You probably do hate java, cause it's a really strict language, everything has to be valid (type-safety, catching exceptions, and so on), and this should give some perspective about validation issues. I dont hate java. Just my id.
    A forum usually has 3 ways:
    a) somebody already managed your same issue through the forum, you just need searching
    b) somebody already managed your same issue on his own and happens to be a forum user (this is just luck, and luck is a rare thing!)
    c) people with proper knowledge help you out, in this case (looks like your case) you'd better try what you're told, 'cause it may be just a step in a process you don't figure out because of some lack about the whole (otherwise you wouldn't be here in the first place).zzzzzzzzzzzzzzzzzzzzzz
    This provided, does your code work as a standalone app (without JWS)? Yea it works. I could connect to it using JConsole
    What's the output (with JWS) for System.out.println(System.getProperty(+anyOfYourProperties+))?Yea that works. Just the JMX parameters are eaten away
    I don't know much about JMX but I know for sure setting system properties didn't work for me for initial context, even thought the properties where there, I had to pass them explicitly through the proper constructor.Well I know that now. Thanks

  • ResourceBundles    entry in jnlp file

    Hi,
    To use this Language.properties file is their any entry to be specified in jnlp file , so that it takes lang file from the outside of the jar file.
    Thanks,
    LeoSun.

    You probably do hate java, cause it's a really strict language, everything has to be valid (type-safety, catching exceptions, and so on), and this should give some perspective about validation issues. I dont hate java. Just my id.
    A forum usually has 3 ways:
    a) somebody already managed your same issue through the forum, you just need searching
    b) somebody already managed your same issue on his own and happens to be a forum user (this is just luck, and luck is a rare thing!)
    c) people with proper knowledge help you out, in this case (looks like your case) you'd better try what you're told, 'cause it may be just a step in a process you don't figure out because of some lack about the whole (otherwise you wouldn't be here in the first place).zzzzzzzzzzzzzzzzzzzzzz
    This provided, does your code work as a standalone app (without JWS)? Yea it works. I could connect to it using JConsole
    What's the output (with JWS) for System.out.println(System.getProperty(+anyOfYourProperties+))?Yea that works. Just the JMX parameters are eaten away
    I don't know much about JMX but I know for sure setting system properties didn't work for me for initial context, even thought the properties where there, I had to pass them explicitly through the proper constructor.Well I know that now. Thanks

  • How to connect to remote server with jmx from jvisualvm

    I have a WL 10.3.2 domain running on a single box. The adminserver and managed server are running on the same box, on different ports (7001 and 8001, respectively).
    I have a Spring application deployed to the managed server and I've configured it to register a Spring bean as a JMX mbean.
    When I run this entire configuration on my laptop, I can run jvisualvm and connect to my server and see and manipulate my registered mbean.
    I'm having trouble figuring out how to get a remote connection working, however. I want to run jvisualvm on my laptop and connect to the remote server.
    I first did "Add Remote Host", where I specified the IP address. It appears that this was created successfully, and it apparently was able to determine the DNS name for it.
    I then tried to add a JMX connection. In the "Connection" field, I just entered the IP address followed by a colon and 8001 (managed server port number).
    In the "Use security credentials" section, I entered the weblogic admin principal and credentials.
    When I click OK, it chugs for a while and eventually gives up, saying:
    Cannot connect to [email protected]:8001 using
    service:jmx:rmi:///jndi/rmi://nn.nn.nn.nn:8001/jmxrmi
    What might I be missing?

    I've resolved this. At least I was able to configure an authenticated connection. It doesn't use SSL yet, but I'm ok with that for a while.
    Resolving this only required changing the command line parameters for the managed server, and being aware of the "jmxremote.access" and jmxremote.password" files. The following blog article helped a lot: [http://www.dzone.com/links/r/monitoring_your_java_application_with_jmx_part_2.html] .
    I'm now passing the following command-line parameters:
    -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true
    The default "role" configured in "jmxremote.access" is "controlRole", and the "jmxremote.password" file specifies the credentials for that principal. I simply used that principal and credential in JVisualVM, and the connection succeeded.
    And I just used the "host:port" form, not the protocol form.
    Edited by: david.karr on Feb 4, 2011 12:47 PM

  • Problem using SSL with JMX

    Hi ,
    I am trying to implement SSL with JMX. I took the example of Luis Miguel Alventosa to see how it works. I imported all the classes, password a access properties file. When I am able to start the MyApp server in the example. But when I am trying to run MyClient, it is giving me the following exception
    Initialize the environment map
    Create an RMI connector client and connect it to the RMI connector server
    Exception in thread "main" java.rmi.ConnectIOException: Exception creating connection to: <IP>; nested exception is:
         java.net.SocketException: Default SSL context init failed: null
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
         at sun.rmi.server.UnicastRef.newCall(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at com.example.MyClient.main(MyClient.java:30)
    Caused by: java.net.SocketException: Default SSL context init failed: null
         at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source)
         at javax.rmi.ssl.SslRMIClientSocketFactory.createSocket(Unknown Source)
         ... 6 moreHere is the MyApp code I used
    package com.example;
    import java.lang.management.*;
    import java.rmi.registry.*;
    import java.util.*;
    import javax.management.*;
    import javax.management.remote.*;
    import javax.management.remote.rmi.*;
    import javax.rmi.ssl.*;
    public class MyApp {
        public static void main(String[] args) throws Exception {
            // Ensure cryptographically strong random number generator used
            // to choose the object number - see java.rmi.server.ObjID
            System.setProperty("java.rmi.server.randomIDs", "true");
            // Start a secure RMI registry on port 3000.
            System.out.println("Create a secure RMI registry on port 3000");
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            SslRMIServerSocketFactory ssf = new SslRMIServerSocketFactory(null, null, true);
            Registry registry = LocateRegistry.createRegistry(3000, csf, ssf);
            // Retrieve the PlatformMBeanServer.
            System.out.println("Get the platform's MBean server");
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            // Environment map.
            System.out.println("Initialize the environment map");
            Map<String,Object> env = new HashMap<String,Object>();
            // Provide the password file used by the connector server to
            // perform user authentication. The password file is a properties
            // based text file specifying username/password pairs.
            env.put("jmx.remote.x.password.file", "password.properties");
            // Provide the access level file used by the connector server to
            // perform user authorization. The access level file is a properties
            // based text file specifying username/access level pairs where
            // access level is either "readonly" or "readwrite" access to the
            // MBeanServer operations.
            env.put("jmx.remote.x.access.file", "access.properties");
            // Create and start an RMI connector server.
            // As specified in the JMXServiceURL the RMIServer stub will be
            // registered in the RMI registry running in the local host on
            // port 3000 with the name "jmxrmi". This is the same name the
            // out-of-the-box management agent uses to register the RMIServer
            // stub too.
            // JMXServiceURL = "service:jmx:rmi:///jndi/rmi://:3000/jmxrmi"
            System.out.println("Create and start an RMI connector server");
            JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://");
            RMIJRMPServerImpl server = new RMIJRMPServerImpl(3000, csf, ssf, env);
            RMIConnectorServer cs = new RMIConnectorServer(url, env, server, mbs);
            cs.start();
            registry.bind("jmxrmi", server);
            System.out.println("Waiting for incoming connections...");
    }Here is the MyClient
    package com.example;
    import java.rmi.registry.*;
    import java.util.*;
    import javax.management.*;
    import javax.management.remote.rmi.*;
    import javax.rmi.ssl.SslRMIClientSocketFactory;
    public class MyClient {
        public static void main(String[] args) throws Exception {
            // Environment map
            System.out.println("\nInitialize the environment map");
            Map<String,Object> env = new HashMap<String,Object>();
            // Provide the credentials required by the server to successfully
            // perform user authentication
            String[] credentials = new String[] { "username" , "password" };
            env.put("jmx.remote.credentials", credentials);
            // Create an RMI connector client and
            // connect it to the RMI connector server
            System.out.println("\nCreate an RMI connector client and " +
                    "connect it to the RMI connector server");
            SslRMIClientSocketFactory csf = new SslRMIClientSocketFactory();
            Registry registry = LocateRegistry.getRegistry(null, 3000, csf);
            RMIServer stub = (RMIServer) registry.lookup("jmxrmi");
            RMIConnector jmxc = new RMIConnector(stub, env);
            jmxc.connect(env);
            // Get an MBeanServerConnection
            System.out.println("\nGet an MBeanServerConnection");
            MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
            // Get domains from MBeanServer
            System.out.println("\nDomains:");
            String domains[] = mbsc.getDomains();
            for (int i = 0; i < domains.length; i++) {
                System.out.println("\tDomain[" + i + "] = " + domains);
    // Get MBean count
    System.out.println("\nMBean count = " + mbsc.getMBeanCount());
    // Close MBeanServer connection
    System.out.println("\nClose the connection to the server");
    jmxc.close();
    System.out.println("\nBye! Bye!");
    Here is the password.properties
    monitorRole mrpasswd
    controlRole crpasswdand access.properties
    monitorRole readonly
    controlRole readwriteI used the following jvm parameters to run the apps
    -Djavax.net.ssl.keyStore=.keystore -Djavax.net.ssl.keyStorePassword=keypass -Djavax.net.ssl.trustStore=proxytruststore -Djavax.net.ssl.trustStorePassword=trustpassI really don't know where I am doing the mistake. Can anyone please give any idea ? For security I didnt disclosed the IP of my mechine in the error, insted I replace it with <IP>

    Hi,
    I assume you did create a keystore and trustore, right?
    Could you verify that the paths to these files you give in your java options
    are correct?
    You could also try to activate debug traces - in particular security traces - see
    at the end of this blog:
    http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
    This may help you diagnose what is going wrong.
    Hope this helps,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/jmxetc

  • JMX question: how to retrieve system properties, DataSource attributes ?

    Hi,
    I need to retrieve some parameters from my JEE application (*.ear) my collegues will deploy soon on Netweaver 7.2
    I found documentation about how to connect to the server with JMX, that works fine:
    http://help.sap.com/saphelp_nw04/helpdata/en/64/617cfb94845d468b0498b4b2c53d74/content.htm
    But how can I come to the system properties for example? Which ObjectName do I have to use and what methods should be called? Are there some more examples for common operations based on the default (monitoring) MBeans?
    Thanx a lot,
    Bob

    http://www.dagira.com/2007/08/22/dynamic-dates-part-i-yesterday-and-today/
    That blog post includes functions to get "today" for:
    DB2     current date
    Oracle     sysdate
    Informix     TODAY
    MySQL     CURDATE()
    SQL Server     getdate()
    Sybase     getdate()
    Teradata     DATE or CURRENT_DATE
    It is also the first in a series of posts that show you how to create other creative time objects for use in your universe. Hope this helps.

  • How do I get a servlet configured with init parameters

    When I try to add a set of <init-param> parameters to a servlet it seems
              like the weblogic server is trying to load it as a bean, which since its not
              a bean it can't do. I get the following error trace when I start the
              server:
              C:\bea\wlserver6.0sp1>set
              PATH=.\bin;C:\orant\bin;C:\WINNT\system32;C:\WINNT;C:\
              WINNT\System32\Wbem;C:\MSSQL7\BINN;C:\Program Files\Microsoft Visual
              Studio\Comm
              on\Tools\WinNT;C:\Program Files\Microsoft Visual
              Studio\Common\MSDev98\Bin;C:\Pr
              ogram Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft
              Visu
              al Studio\VC98\bin;"C:\Program
              Files\Mts";C:\PROGRA~1\NETWOR~1\PGP;C:\MSSQL7\BIN
              N;C:\jdk1.2.2\bin;
              weblogic.xml.dom.ChildCountException
              at weblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
              at weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
              at
              weblogic.servlet.internal.dd.ParameterDescriptor.<init>(ParameterDesc
              riptor.java:45)
              at
              weblogic.servlet.internal.dd.ServletDescriptor.<init>(ServletDescript
              or.java:79)
              at
              weblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
              .java:171)
              at
              weblogic.servlet.internal.dd.DescriptorLoader.initialize(DescriptorLo
              ader.java:288)
              at
              weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
              .java:230)
              at
              weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:4
              73)
              at
              weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
              at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
              at weblogic.j2ee.Application.addComponent(Application.java:126)
              at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
              oymentTarget.java:283)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
              oymentTarget.java:109)
              at
              weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
              r.java:76)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
              eanImpl.java:562)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
              .java:548)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
              ionMBeanImpl.java:285)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              55)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              23)
              at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              at $Proxy27.addWebDeployment(Unknown Source)
              at
              weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
              ployment(WebServerMBean_CachingStub.java:985)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
              oymentTarget.java:269)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
              loymentTarget.java:233)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
              ments(DeploymentTarget.java:194)
              at
              weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
              DeploymentTarget.java:158)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
              eanImpl.java:562)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
              .java:548)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
              ionMBeanImpl.java:285)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              55)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              23)
              at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              at $Proxy26.updateDeployments(Unknown Source)
              at
              weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
              yments(ServerMBean_CachingStub.java:2299)
              at
              weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
              er(ApplicationManager.java:240)
              at
              weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
              nManager.java:122)
              at java.lang.reflect.Method.invoke(Native Method)
              at
              weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
              eanImpl.java:562)
              at
              weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
              .java:548)
              at
              weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
              ionMBeanImpl.java:285)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              55)
              at
              com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              23)
              at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              at
              weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              at $Proxy19.start(Unknown Source)
              at
              weblogic.management.configuration.ApplicationManagerMBean_CachingStub
              .start(ApplicationManagerMBean_CachingStub.java:435)
              at
              weblogic.management.Admin.startApplicationManager(Admin.java:1030)
              at weblogic.management.Admin.finish(Admin.java:491)
              at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
              at weblogic.Server.main(Server.java:35)
              >
              <Apr 3, 2001 3:42:32 PM EDT> <Notice> <WebLogicServer> <WebLogic Server
              started>
              <Apr 3, 2001 3:42:32 PM EDT> <Notice> <WebLogicServer> <ListenThread
              listening o
              n port 7001>
              <Apr 3, 2001 3:42:32 PM EDT> <Notice> <WebLogicServer> <SSLListenThread
              listenin
              g on port 7002>
              <Apr 3, 2001 3:42:38 PM EDT> <Error> <HTTP> <HttpServer(1112581,null default
              ctx
              ,ajrserver) found no context for "GET /CommonOpinionAdmin2?verifyinstall=
              HTTP/1
              .1". This should not happen unless the default context failed to deploy.>
              The distribution file is not a WAR file, but a JAR file. I need to to just
              do what it does if I don't specify any init-param's which is to pass them
              when the servlet does get loaded, or load it as a servlet from a jar file
              instead of a bean.
              How do I configure weblogics to run my servlet with init parameters.
              Thank You,
              Anthony Rizzolo
              

    I'll answer my own problem. It turns out that you can't put multiple
              <param-name> and <param-value> pairs within a single <init-param>. I
              assumed that you could since none of the examples had more than one
              parameter I didn't realize that you had to specify multiple <init-param>
              tags if you had multiple parameters.
              Anthony Rizzolo
              "Anthony Rizzolo" <[email protected]> wrote in message
              news:[email protected]...
              > When I try to add a set of <init-param> parameters to a servlet it seems
              > like the weblogic server is trying to load it as a bean, which since its
              not
              > a bean it can't do. I get the following error trace when I start the
              > server:
              >
              > C:\bea\wlserver6.0sp1>set
              > PATH=.\bin;C:\orant\bin;C:\WINNT\system32;C:\WINNT;C:\
              > WINNT\System32\Wbem;C:\MSSQL7\BINN;C:\Program Files\Microsoft Visual
              > Studio\Comm
              > on\Tools\WinNT;C:\Program Files\Microsoft Visual
              > Studio\Common\MSDev98\Bin;C:\Pr
              > ogram Files\Microsoft Visual Studio\Common\Tools;C:\Program
              Files\Microsoft
              > Visu
              > al Studio\VC98\bin;"C:\Program
              > Files\Mts";C:\PROGRA~1\NETWOR~1\PGP;C:\MSSQL7\BIN
              > N;C:\jdk1.2.2\bin;
              >
              > weblogic.xml.dom.ChildCountException
              > at
              weblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
              > at weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
              > at
              > weblogic.servlet.internal.dd.ParameterDescriptor.<init>(ParameterDesc
              > riptor.java:45)
              > at
              > weblogic.servlet.internal.dd.ServletDescriptor.<init>(ServletDescript
              > or.java:79)
              > at
              > weblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
              > .java:171)
              > at
              > weblogic.servlet.internal.dd.DescriptorLoader.initialize(DescriptorLo
              > ader.java:288)
              > at
              > weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
              > .java:230)
              > at
              > weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:4
              > 73)
              > at
              > weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
              > at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
              > at weblogic.j2ee.Application.addComponent(Application.java:126)
              > at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
              > at
              > weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
              > oymentTarget.java:283)
              > at
              > weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
              > oymentTarget.java:109)
              > at
              > weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
              > r.java:76)
              > at java.lang.reflect.Method.invoke(Native Method)
              > at
              > weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
              > eanImpl.java:562)
              > at
              > weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
              > .java:548)
              > at
              > weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
              > ionMBeanImpl.java:285)
              > at
              > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              > 55)
              > at
              > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              > 23)
              > at
              > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              > at
              > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              > at $Proxy27.addWebDeployment(Unknown Source)
              > at
              > weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
              > ployment(WebServerMBean_CachingStub.java:985)
              > at
              > weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
              > oymentTarget.java:269)
              > at
              > weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
              > loymentTarget.java:233)
              > at
              > weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
              > ments(DeploymentTarget.java:194)
              > at
              > weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
              > DeploymentTarget.java:158)
              > at java.lang.reflect.Method.invoke(Native Method)
              > at
              > weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
              > eanImpl.java:562)
              > at
              > weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
              > .java:548)
              > at
              > weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
              > ionMBeanImpl.java:285)
              > at
              > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              > 55)
              > at
              > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              > 23)
              > at
              > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              > at
              > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              > at $Proxy26.updateDeployments(Unknown Source)
              > at
              > weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
              > yments(ServerMBean_CachingStub.java:2299)
              > at
              > weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
              > er(ApplicationManager.java:240)
              > at
              > weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
              > nManager.java:122)
              > at java.lang.reflect.Method.invoke(Native Method)
              > at
              > weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
              > eanImpl.java:562)
              > at
              > weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
              > .java:548)
              > at
              > weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
              > ionMBeanImpl.java:285)
              > at
              > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              > 55)
              > at
              > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
              > 23)
              > at
              > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
              > at
              > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
              > at $Proxy19.start(Unknown Source)
              > at
              > weblogic.management.configuration.ApplicationManagerMBean_CachingStub
              > .start(ApplicationManagerMBean_CachingStub.java:435)
              > at
              > weblogic.management.Admin.startApplicationManager(Admin.java:1030)
              > at weblogic.management.Admin.finish(Admin.java:491)
              > at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
              > at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
              > at weblogic.Server.main(Server.java:35)
              > >
              > <Apr 3, 2001 3:42:32 PM EDT> <Notice> <WebLogicServer> <WebLogic Server
              > started>
              >
              > <Apr 3, 2001 3:42:32 PM EDT> <Notice> <WebLogicServer> <ListenThread
              > listening o
              > n port 7001>
              > <Apr 3, 2001 3:42:32 PM EDT> <Notice> <WebLogicServer> <SSLListenThread
              > listenin
              > g on port 7002>
              > <Apr 3, 2001 3:42:38 PM EDT> <Error> <HTTP> <HttpServer(1112581,null
              default
              > ctx
              > ,ajrserver) found no context for "GET /CommonOpinionAdmin2?verifyinstall=
              > HTTP/1
              > .1". This should not happen unless the default context failed to deploy.>
              >
              > The distribution file is not a WAR file, but a JAR file. I need to to
              just
              > do what it does if I don't specify any init-param's which is to pass them
              > when the servlet does get loaded, or load it as a servlet from a jar file
              > instead of a bean.
              >
              > How do I configure weblogics to run my servlet with init parameters.
              >
              > Thank You,
              > Anthony Rizzolo
              >
              >
              

  • JMX wit h JDK1.4

    Can anyone please tell me how can i retrieve remote machine's JVM parameters using JMX with JDK1.4?
    I have tried adding the JMX 1.2 implementation jars into the classpath of my program, and i m trying to run a standalone java program from my local machine.
    The below is the snippet of my program :
         RuntimeMXBean bean= (RuntimeMXBean)tBean;
         int port=9324;
         final ConnectionArgs cArgs = new ConnectionArgs(args);
    // Get target's URL
         final JMXServiceURL target = cArgs.getJMXServiceURL();
         LocateRegistry.createRegistry(port);
         // Connect to target (assuming no security)
         MBeanServer mbs = MBeanServerFactory.createMBeanServer("server1");
         ObjectName name;
         name= new ObjectName("UserDomain:Name=jc");
         mbs.registerMBean(tBean, name); // tbean is a bean of JMX compliant           
         How can i get MxBeans(RuntimeMXBean) with the available MBeanServer object(mbs)?
         I know there is way to get MXBeans through ManagementFactory in jdk1.5,but how can i do the same in jdk1.4, is there any alternative for ManagementFactory in 1.4?
              Please let me know if any body already tried implementing the same?
    This is a bit urgent.
    Thanks,
    Sachin

    Of course you can use JMX 1.2 and JMX Remote API 1.0 with JDK 1.4. You can download the jars from the JCP website (JSRs 3 and 160, respectively).
    What you will not be able to do is to interact with the JMX MXBeans that instrument the JVM because they only exist since JDK 5.0 but you still can write your own MBeans for instrumenting your application.
    If you want to know more about JMX have a look at:
    http://java.sun.com/jmx
    If you want to know more about the Management and Monitoring features of the Java platform J2SE 5.0 and onwards have a look at:
    http://java.sun.com/javase/6/docs/technotes/guides/management/index.html
    Regards,
    Luis

  • Webservices and JMX

    Hi,
    I am using JMX which supports HTTP, RMI, CORBA, TL1 and SNMP protocols. Now I am planning to include SOAP as well. Looking at this scenario, I have the following questions:
    1. Do I really need to support SOAP in JMX? The logic here is SOAP is already platform independent, so why not directly use webservices.
    2. Which version of Axis can be used with any SOAP implementation in JMX (Axis/Axis2)?
    3. Is there any commercially free connector available? If yes, how is the performance of this connector?
    4. What will be the deployment scenario (since there is not much documentation available)?
    Any inputs will be valuable.
    -Sandeep

    Pradeep,
    I have already tried this solution. Only this isn't a table for export, but for import. Normally thies shouldn't be a difference, but still no correct table in the RFC.
    My solution at this moment is to create a string from this table with delimiters and recreate the table in the RFC. I know this isn't the correct way, but better something than nothing.
    Just dragging the table from dataview isn't correct, the result is only the last row in the RFC function. I also tried the table as an import parameters with type tabletype, but this isn't the solution either.
    Maybe you or somebody else have an other approach?
    -Bart-

  • Dynamic cache instantiation parameters

    I need to offer "customers" of my cloud/cache services the ability to specify some of the properties they want in caches they create.
    I am operating with the restriction that we cannot restart cluster members just for the purpose of rereading the cache-config.xml
    files. I am using Coherence Grid 3.5.2 and java.
    By way of example, let me refer to the coherence examples provided at
    [http://wiki.tangosol.com/display/COH35UG/Examples|http://wiki.tangosol.com/display/COH35UG/Examples]
    In 'examples-cache-config.xml' from that set of examples is the following scheme:
    <distributed-scheme>
    <scheme-name>ExamplesPartitionedPofScheme</scheme-name>
    <service-name>PartitionedPofCache</service-name>
    <serializer>
    <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
    <init-params>
    <init-param>
    <param-type>String</param-type>
    <param-value>examples-pof-config.xml</param-value>
    </init-param>
    </init-params>
    </serializer>
    <backing-map-scheme>
    <local-scheme>
    <high-units>250M</high-units>
    <unit-calculator>binary</unit-calculator>
    </local-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    What I want to do is create, at runtime, a relatively arbitrary set of caches
    that will have differing values for <high-units> and related parameters.
    Presumably I need to code my own calls to the LocalCache() constructor.
    That would also let me dynamically select eviction policies and unit calculators
    (via the LocalCache's implementation of ConfigurableCacheMap's setEvictionPolicy() and setUnitCalculator() methods).
    Can someone show me how to do this with the Coherence examples?
    Ultimately I need to be able to specify, for all maps on all distributed caches I support for my "customers",
    the low and high water marks, eviction policies, and perhaps some other properties, and ensure that all cluster members
    participate in identical handling of the resulting named cache to the extent that they're servicing keys for that cache.
    I tried taking my own application <distributed-scheme> definitions and constructing various
    frontMap, backMap, NearCache, NamedCache, and related goodies to assemble the cache on the fly,
    and I'm in /way/ over my head. I haven't found any online documentation on how to assemble
    things like ObserveableSplittingBackingMap objects into a hierarchy of Coherence objects.
    The logical hierarchy of Cluster->Member->Service->NamedCache elements doesn't seem to map
    well to code for assembling each of those pieces.
    Also note: the Coherence 3.5.2 docs state that <lh-file-manager> maps to com.tangosol.io.lh.LHBinaryStoreManager class,
    but there is no such class documented in the javadocs (though I see that class in the coherence.jar file).
    Thanks.

    So all I can really tweak are the high-units, low-units, and any other RW-flagged attributes of the CacheMBean types.Yes, this is correct in general.
    When I call these MBean interfaces, it has to be after the cache is created, and will affect the named cache wherever it lives
    on the cluster w.r.t. partition presence, LocalCache frontmaps, etc?These high/low unit modifications must be performed on each individual MBean representing the backing map in each storage node. The same goes for any nodes that are using near caches.
    No way to make cache eviction policy dynamic except to perhaps implement my own custom eviction class and have that
    observe some attribute I bind somewhere that's specific to a cache instance?I believe you can change the eviction policy at runtime (LRU vs LFU, etc) - if you need more control over what gets evicted then you should consider a custom eviction policy.
    I'm not very familiar with JMX. To do the high-unit low-unit tweaking must I now enable JMX where I didn't before?
    I noticed that for my testing I needed to specify -Dcom.sun.management.jmxremote and one or both of -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true.
    Is there a way to set high/low unit values if I'm not enabling JMX? Do I suffer any performance penalties if I enable JMX?Most of our customers in production run with JMX as it allows for statistics gathering and diagnostics of the cluster at runtime. There is no overhead in gathering the stats as this happens in the background anyway, and there is little overhead in enabling the gathering of these statistics and viewing via an MBeanServer.
    JMX is the simplest way (and the supported method) of modifying high units. If you have to do it using code, you can execute the following in the storage node to grab the backing map and modify high units. Note that this technique may not work with future versions of Coherence:
    String sCacheService = "DistributedCache";
    String sCacheName    = "test-cache";
    // ensures that the cache service is running
    CacheFactory.getCache(sCacheName);
    // grab the backing map
    CacheService service  = (CacheService) CacheFactory.getCluster().getService(sCacheService);
    LocalCache backingMap = (LocalCache)((DefaultConfigurableCacheFactory.Manager)
            service.getBackingMapManager()).getBackingMap(sCacheName);
    // modify high units
    backingMap.setHighUnits(1000);Thanks,
    Patrick

  • JMX - -Dcom.sun.management.jmxremote

    Hello,
    what make i wrong?
    When i start the Oracle Application Server 10.1.3.3.0 with cmd
    -> java -Dcom.sun.management.jmxremote=true -jar oc4j.jar
    i can connect via jconsole to this instance. Also i can connect via java:
    JMXServiceURL serviceUrl = new JMXServiceURL("service:jmx:rmi://127.0.0.1:23791/");
    All is perfect !!!
    But when i start the oas over opmn -> opmctl startall i can´t connect via jconsole or via java-remote Client, although i set the parameter:
    <ias-component id="default_group">
    <process-type id="home" module-id="OC4J" status="enabled">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" value="-server -mx1024M -ms512M -Xrs -XX:MaxPermSize=128M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Dcom.sun.management.jmxremote "/>
    </category>
    <category id="stop-parameters">
    <data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
    </category>
    </module-data>
    <start timeout="600" retry="2"/>
    <stop timeout="120"/>
    <restart timeout="720" retry="2"/>
    <port id="default-web-site" range="8888" protocol="ajp"/>
    <port id="rmi" range="12401"/>
    <port id="rmis" range="12701-12800"/>
    <port id="jms" range="12601-12700"/>
    <process-set id="default_group" numprocs="1"/>
    </process-type>
    </ias-component>
    it doesn´t work. What is the problem ???
    Thanks in advance for your help.
    Best Regards,
    Ralf

    Hello,
    can nobody help me?
    Best Regards,
    Ralf

  • JMX/RMI and Automatic Code Downloading

    There is a brief discussion of automatic code downloading in the JMX Best Practices document (http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/best-practices.jsp#mozTocId348704), but not enough to actually implement it.
    Would someone be kind enough to point me to some documentation on the subject, and/or maybe provide a few pointers?
    Thanks!
    Steve

    Hi Steve,
    If you want to know more about RMI dynamic code downloading have a look at the following link:
    http://download.java.net/jdk6/docs/technotes/guides/rmi/codebase.html
    You should also know that you can supply a ClassLoader to both the JMXConnectorServer and JMXConnector at instantiation time in the environment map. This ClassLoader will be used by the JMX connectors to serialize/deserialize the method parameters and return values when getting and setting attributes, or invoking operations on a given MBean.
    If you want to know more about how classloading works within the JMX connectors have a look at Chapter 13 "Connectors" in the JMX 1.4 specification:
    http://download.java.net/jdk6/docs/technotes/guides/jmx/JMX_1_4_specification.pdf
    Regards,
    Luis-Miguel Alventosa
    JMX Java SE development team
    Sun Microsystems, Inc.

  • JMX Exception.Need guidance

    Hello All,
    Am configuring SAP Solution Manager with portal. I get an exception related to JMX. Need your guidance.
    Exception:
    JMX connector exception occurred while processing external JMX request [ JMX request (java) v1.0 len: 316 |  src: cluster target-node: 323613400 req: invoke params-number: 4 params-bytes: 0 | :name=com.sap.portal.prt.bridge.service.mbeans.PRTMBeanRuntime,j2eeType=PRTBridge_JMX_SECTION,SAP_J2EEClusterNode=323613400,SAP_J2EECluster="" null null null ]
    [EXCEPTION]
    com.sap.engine.services.jmx.exception.JmxConnectorException: Unable to de-serialize request parameters, message [ JMX request (java) v1.0 len: 316 |  src: cluster target-node: 323613400 req: invoke params-number: 4 params-bytes: 0 | :name=com.sap.portal.prt.bridge.service.mbeans.PRTMBeanRuntime,j2eeType=PRTBridge_JMX_SECTION,SAP_J2EEClusterNode=323613400,SAP_J2EECluster="" null null null ]
                at com.sap.engine.services.jmx.RequestMessage.readParams(RequestMessage.java:537)
                at com.sap.engine.services.jmx.RequestMessage.getParams(RequestMessage.java:586)
                at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:90)
                at com.sap.engine.services.jmx.JmxServiceConnectorServer.receiveWait(JmxServiceConnectorServer.java:172)
                at com.sap.engine.core.service630.context.cluster.message.MessageListenerWrapper.process(MessageListenerWrapper.java:81)
                at com.sap.engine.core.cluster.impl6.ms.MSListenerThread.run(MSListenerThread.java:47)
                at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
                at com.sap.engine.core.thread.impl6.SingleThread.execute(SingleThread.java:78)
                at com.sap.engine.core.thread.impl6.SingleThread.run(SingleThread.java:148)
    Caused by: javax.management.InstanceNotFoundException: MBean with name com.sap.default:name=com.sap.portal.prt.bridge.service.mbeans.PRTMBeanRuntime,j2eeType=PRTBridge_JMX_SECTION,SAP_J2EEClusterNode=323613400,SAP_J2EECluster=EP1 not found in repository
                at com.sap.pj.jmx.server.MBeanServerImpl.getClassLoaderFor(MBeanServerImpl.java:1408)
                at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.getClassLoaderFor(MBeanServerWrapperInterceptor.java:455)
                at com.sap.engine.services.jmx.CompletionInterceptor.getClassLoaderFor(CompletionInterceptor.java:576)
                at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.getClassLoaderFor(BasicMBeanServerInterceptor.java:438)
                at com.sap.jmx.provider.ProviderInterceptor.getClassLoaderFor(ProviderInterceptor.java:330)
                at com.sap.engine.services.jmx.RedirectInterceptor.getClassLoaderFor(RedirectInterceptor.java:501)
                at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.getClassLoaderFor(MBeanServerInterceptorChain.java:443)
                at com.sap.engine.services.jmx.RequestMessage.readParams(RequestMessage.java:531)
                ... 8 more
    Secondly, I checked JMX Adapater and Notification service in Configtool and Visual Admin and they do not seem to be in start mode. Could you please let me know about this as well.
    Awaiting Reply.
    Thanks,
    PRanjan

    Vamshi,
    I am unable to start or stop the JMX service.
    In Visual Admin, the context menu is deactivated and hence I cannot do anything.
    In Config tool the startup mode is set to always but is deactivated as well. I cannot make any change there too, so am suspecting the service to be deactivated.
    If possible could you please let me know the SAP Note.
    Awaiting Reply.
    Thanks,
    PRanjan

  • RMI and JMX

    Hello,
    we are having problems trying to stop an RMI Server.
    We activate the options for JMX in the startup of Tomcat for JDK 1.5.0_04.
    all of this works fine, we can access remote with the JConsole without any problem. But when we stop the tomcat, it stops well, but a process of the RMI server remains in the system and the only way to stop is with a killall command.
    Somebody knows what its happend?? We have tried in windows and there it works fine, no RMI process or similar remains, it only happens in Linux.
    Thanks in advance

    Hi Steve,
    If you want to know more about RMI dynamic code downloading have a look at the following link:
    http://download.java.net/jdk6/docs/technotes/guides/rmi/codebase.html
    You should also know that you can supply a ClassLoader to both the JMXConnectorServer and JMXConnector at instantiation time in the environment map. This ClassLoader will be used by the JMX connectors to serialize/deserialize the method parameters and return values when getting and setting attributes, or invoking operations on a given MBean.
    If you want to know more about how classloading works within the JMX connectors have a look at Chapter 13 "Connectors" in the JMX 1.4 specification:
    http://download.java.net/jdk6/docs/technotes/guides/jmx/JMX_1_4_specification.pdf
    Regards,
    Luis-Miguel Alventosa
    JMX Java SE development team
    Sun Microsystems, Inc.

  • Unable to connect to remote JMX

    Hi guys,
    In our development environment in linux, we are using resin + jdk1.5.
    i started my resin server with these options:
    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=8004
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
    It returns "Connection failed" when i tried to connect to it from local.
    If i use those options and start it locally, i am able to connect.
    Anyone has any ideas what am i missing?
    Thanks.
    Message was edited by:
    jinchuriki

    I'm also running into this issue on a Linux machine running JDK 1.6.0_12:
    java -version
    java version "1.6.0_12"
    Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)I'm running with the following VM parameters:
    -Dcom.sun.management.jmxremote.port=9958 -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=falseFrom a windows machine I run jconsole:
    JConsole version "1.6.0_10-rc2-b32"
    Java(TM) SE Runtime Environment (build 1.6.0_10-rc2-b32)
    Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)jconsole 192.168.10.143:9958
    It appears to begin to connect (I see the JMX monitoring tabs and a progress bar) then it says:
    Connection Failed: Retry?
    The connection to 192.168.10.143:9958 did not succeed. Would you like to try again?It seems like the JConsole is able to partial connect to the remote JMX service but then fails somewhere in the process.
    If I try to connect to a non-JMX listening port on 192.168.10.143 I receive a message in the connection selection dialogue:
    Connection failed: non-JRMP server at remote endpointIf I connect to a port that the remote server isn't listening to I do not get the Connection Failed error, it ends up timing out then I sending me back to the New Connection window.

Maybe you are looking for