JConsole.main(s);
hey,
i tried to start the jconsole from my program, that works without problems and the jconsole appears.
now i want to secure the connection with ssl, but it doesn't work.
String[] s = new String[5];
s[0] = "xxx.xxx.xxx.xxx:7000"
s[1] = "-J-Djavax.net.ssl.keyStore=res/clientkeystore.jks";
s[2] = "-J-Djavax.net.ssl.keyStorePassword=XXX";
s[3] = "-J-Djavax.net.ssl.trustStore=res/clienttruststore";
s[4] = "-J-Djavax.net.ssl.trustStorePassword=XXX";
JConsole.main(s);the default help text occur:
Usage: jconsole [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]
-interval Set the update interval to n seconds (default is 4 seconds)
-notile Do not tile windows initially (for two or more connections)
-pluginpath Specify the path that jconsole uses to look up the plugins
-version Print program version
connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)
pid The process id of a target process
host A remote host name or IP address
port The port number for the remote connection
-J Specify the input arguments to the Java virtual machine
on which jconsole is runningdoes somebody know, how i must pass the params?
greets and thanks
kaffeemann
i solved the problem with System.setProperty:
System.setProperty("javax.net.ssl.keyStore", serverConfiguration
.getKeyStore());
System.setProperty("javax.net.ssl.keyStorePassword",
serverConfiguration.getEncKeyStorePassword());
System.setProperty("javax.net.ssl.trustStore", serverConfiguration
.getTrustStore());
System.setProperty("javax.net.ssl.trustStorePassword",
serverConfiguration.getEncTrustStorePassword());Edited by: kaffeemann on Jul 27, 2009 2:57 AM
Similar Messages
-
hi,
i am running a jar using
java -Dcom.sun.management.jmxremote -jar start.jar
i then run Jconsole and it doesnt recognize this process. I also tried
to run jconsole with the pid and this is the error i got
Exception in thread "main" java.lang.Exception: Could not open
PerfMemory
at sun.misc.Perf.attach(Native Method)
at sun.misc.Perf.attachImpl(Perf.java:253)
at sun.misc.Perf.attach(Perf.java:183)
at sun.management.ConnectorAddressLink.importFrom(ConnectorAddressLink.java:66)
at sun.tools.jconsole.JConsole.main(JConsole.java:779)
Could anyone help me with this and let me know what i can do run
jconsole properly.
Thanks,
AnirudhHi Bomasamudram,
And you'll only see this check box for Summary Resource Assignemtns if you choose the account each time you start project pro...
Ben Howard [MVP] | web |
blog |
book | P2O -
Priblem with jmap in 1.4.2_09-b05
Hi,
I'm using 1.4.2_09-b05 on
SunOS host 5.8 Generic_108528-29 sun4u sparc SUNW,UltraAX-i2
and get the following errror using the new jmap tool:
jmap -heap 13336
Attaching to process ID 13336, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.4.2_09-b05
Exception in thread "main" java.lang.ClassCastException
at sun.jvm.hotspot.tools.HeapSummary.run(HeapSummary.java:24)
at sun.jvm.hotspot.tools.JMap.run(JMap.java:85)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:204)
at sun.jvm.hotspot.tools.JMap.main(JMap.java:126)
what can I do to get the jmap running ...
thanks for help
mfg
Andreas OttoHi,
using jconsole from jdk1.5.0_04 to attach to a java process running
with 1.4.2_09 I get the following error:
jconsole 6616
Exception in thread "main" sun.management.counter.perf.InstrumentationException: Unsupported version: 1.0
at sun.management.counter.perf.Prologue.<init>(Prologue.java:80)
at sun.management.counter.perf.PerfInstrumentation.<init>(PerfInstrumentation.java:24)
at sun.management.ConnectorAddressLink.importFrom(ConnectorAddressLink.java:70)
at sun.tools.jconsole.JConsole.main(JConsole.java:779)
but by the way, I don't understand why sun announces the 1.4.2_09 with
Changes in 1.4.2_09
The official version number for this update release is 1.4.2_09-b05.
Notes
Serviceability Improvements - Update release 1.4.2_09 includes the following serviceability improvement backports from JDK 5.0:
When a fatal error occurs, an error log is created in the file hs_err_pid<pid>.log (where <pid> is the process id of the process). Where possible, the file is created in the working directory of the process. In the event that the file cannot be created in the working directory (insufficient space, permission problem, or other issue) then the file is created in the temporary directory for the operating system. On Solaris and Linux, the temporary directory is /tmp. On Windows, the temporary directory is specified by the value of the TMP environment variable, or if that is not defined, the value of the TEMP environment variable. The error log contains a lot of information obtained at the time of the fatal error. Where possible it includes:
the operating exception or signal that provoked the fatal error
version and configuration information
details on the thread that provoked the fatal error and its stack trace
the list of running threads and their state
summary information about the heap
the list of native libraries loaded
command line arguments
environment variables
details about the operating system and cpu
For more details, see Section 2.2.1 of the JDK 5.0 Troubleshooting Guide ).
For Solaris OS only, the experimental jmap utility from JDK5.0 has been backported to 1.4.2_09. See jmap utility.
mfg
Andreas Otto -
Hi All,
Ebs r12.1.3
rdbms 11.2.0.2
I would like to know if there is a way to monitor oacore memory usage and if there is a way to alert us when the memory is close to the maximum memory available (-Xmx parameter)?
I also would like to know, our oacore seems to fill during the week and at one point, doesn't have enough memory and they froze/crash. We have to bounce them to fix the issue.
Does any of you do on a regular basic a bounce of OC4J components (adopmnctl.sh stop / start) ?
Thank you,
FelixHi,
Oh, I forgot I already asked the same question :S
I am trying to use jconsole but in the local tab, I do not have any oacore process, only GSM.
I am getting the PID from $INST_TOP/admin/scripts/adopmnctl.sh status.
When I try to do jconsole PID, I am getting:
[server.domain.com]:> $INST_TOP/admin/scripts/adopmnctl.sh status
You are running adopmnctl.sh version 120.6.12010000.5
Checking status of OPMN managed processes...
Processes in Instance: SID_server.server.domain.com
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
OC4JGroup:default_group | OC4J:oafm | 2891892 | Alive
OC4JGroup:default_group | OC4J:oacore | 104695~ | Alive
HTTP_Server | HTTP_Server | 101213~ | Alive
[server.domain.com]:> which jconsole
$IAS_ORACLE_HOME/10.1.3/appsutil/jdk/bin/jconsole
[server.domain.com]:> jconsole 10469588
com.ibm.tools.attach.AttachNotSupportedException: target not found
at com.ibm.tools.attach.javaSE.VirtualMachineImpl.tryAttachTarget(VirtualMachineImpl.java:303)
at com.ibm.tools.attach.javaSE.VirtualMachineImpl.attachTarget(VirtualMachineImpl.java:86)
at com.ibm.tools.attach.javaSE.AttachProviderImpl.attachVirtualMachine(AttachProviderImpl.java:37)
at ibm.tools.attach.J9AttachProvider.attachVirtualMachine(J9AttachProvider.java:60)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:221)
at sun.tools.jconsole.LocalVirtualMachine.getLocalVirtualMachine(LocalVirtualMachine.java:205)
at sun.tools.jconsole.JConsole.main(JConsole.java:924)
Invalid process id:10469588But:
[server.domain.com]:> ps -ef | grep 104695
applmgr 9469982 10244248 0 15:23:29 pts/2 0:00 grep 104695
applmgr 10469588 1806434 0 14:18:34 - 0:13 $IAS_ORACLE_HOME/10.1.3/appsutil/jdk/bin/java -DCLIENT_PROCESSID=10469588 -verbose:gc -Xmx512M -Xms128M -Dcom.sun.management.jmxremote -Djava.security.policy=$IAS_ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=$IAS_ORACLE_HOME/j2ee/oacore/config/jazn.xml -Dhttp.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies -Doracle.ons.oraclehome=$IAS_ORACLE_HOME -Doracle.home=$ISA_ORACLE_HOME -Doracle.ons.oracleconfighome=$INST_TOP/ora/10.1.3 -Doracle.ons.clustername=default -Doracle.ons.instancename=SID_server.server.domain.com -Dopmn.compatible=904 -Doracle.ons.indexid=oacore.default_group.1 -Doracle.ons.numprocs=1 -Doracle.ons.uid=745050216 -Doracle.oc4j.groupname=default_group -Doracle.oc4j.instancename=oacore -Doracle.oc4j.islandname=default_group -Doracle.opmn.routingid=g_rt_id -DOPMN=true -jar oc4j.jar -config $INST_TOP/ora/10.1.3/j2ee/oacore/config/server.xml -properties -out $INST_TOP/logs/ora/10.1.3/opmn/oacorestd.out -err $INST_TOP/logs/ora/10.1.3/opmn/oacorestd.err -ports default-web-site:ajp:21575,rmi:20075,jms:23075I do not understand why it says invalid process id.
If I simply start jconsole without providing PID, I can see the local JVM. All I see is the FNDOPP / FNDCPGSC processes, nothing else.
Any idea?
Thank you,
Felix -
Jconsole no longer works with Java 6.0, it did with 5.0
Hello,
We are having a very important issue. We have reproduced the situation in 10 out of 10 computers, all with the same result, even in fresh installations.
Using jconsole, we are connecting to the following service (BEA weblogic 10): service:jmx:rmi:///jndi/iiop://host:7001/weblogic.management.mbeanservers.runtime
In the jconsole provided in any revision of Java 5.0 (1.5) it works, that is to say, it is able to connect to the service.
On the other hand, there is no way to accomplish this using Java 6.0. The connection fails with the following error:
Nov 6, 2007 10:27:56 AM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
WARNING: "IOP01210228: (BAD_OPERATION) This ORB instance has been destroyed, so no operations can be performed on it"
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 228 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:586)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:608)
at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(ORBImpl.java:1289)
at com.sun.corba.se.impl.orb.ORBImpl.create_any(ORBImpl.java:1078)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.writeAny(Util.java:296)
at javax.rmi.CORBA.Util.writeAny(Util.java:80)
at org.omg.stub.javax.management.remote.rmi._RMIServer_Stub.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2309)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:277)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:361)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:297)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:279)
We have also create our own application to do this and although the same piece of code compiles under both JDKs, it fails to run with exactly the same error under Java 6.0.
Does anyone know why this is happening and if there is a way to work around it?
TIA.Hi, I faced similar problems access MBeans to Weblogic Server 10 from client under JDK(JRE) 6.0
, but my way of workaround may be helpful:
Do not use jmx support jar files from Weblogic Server10, use that from 9 instead. Here I use
weblogic.jar & webservices.jar
and it works fine.
the following is my test program (looks ugly, but only for test)
public class MyConnection {
private static MBeanServerConnection connection;
private static JMXConnector connector;
public static void initConnection(String hostname, String portString,
String username, String password) throws IOException,
MalformedURLException {
String protocol = "t3";
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String jndiroot = "/jndi/";
String mserver = "weblogic.management.mbeanservers.domainruntime";
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();
public static void getComplidatedObject() throws Exception {
//String name = "com.bea:Location=examplesServer,Name=examplesServer,ServerRuntime=examplesServer,Type=JDBCServiceRuntime";\
String name = "com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean";
String attribute = "ServerRuntimes";
ObjectName on = new ObjectName(name);
Object obj = connection.getAttribute(on, attribute);
//Method m = obj.getClass().getMethod("getState", new Class[] {});
//Object result = m.invoke(obj, null);
//System.out.println(result);
System.out.println(obj.getClass().isArray());
System.out.println(obj);
public static void discovery() throws Exception {
String mbeanType = "*:*";
ObjectName patialObjectName = new ObjectName(mbeanType);
Set mbeans = connection.queryNames(patialObjectName, null);
long overallTime = System.currentTimeMillis();
for (Iterator itr = mbeans.iterator(); itr.hasNext();) {
ObjectName mbean = (ObjectName) itr.next();
String sMBeanFullName = mbean.getCanonicalName();
MBeanInfo mbeanInfo = connection.getMBeanInfo(mbean);
MBeanAttributeInfo mbeanAttrInfoArray[] = mbeanInfo.getAttributes();
if (mbeanAttrInfoArray == null) {
continue;
String sMBeanDescription = mbeanInfo.getDescription();
String s = mbeanInfo.getClassName();
System.out.println("====================");
System.out.println(sMBeanFullName);
for (int i = 0; i < mbeanAttrInfoArray.length; i++) {
MBeanAttributeInfo attrInfo = mbeanAttrInfoArray;
if (attrInfo.isReadable()) {
//If attribute datatype is supported, add it to the list for this mbean
String sAttrDataType = attrInfo.getType();
String sAttrName = attrInfo.getName();
String sAttrDescription = attrInfo.getDescription();
System.out.println("Name:" + sAttrName + "\nType:" + sAttrDataType + "\nDesc:" + sAttrDescription);
} //end if
public static void main(String[] args) throws Exception {
String hostname = "192.168.1.24";
String portString = "7001";
String username = "weblogic";
String password = "weblogic";
MyConnection c = new MyConnection();
initConnection(hostname, portString, username, password);
c.printNameAndState();
c.discovery();
c.getComplidatedObject();
c.printNameAndState();
connector.close();
public static ObjectName[] getServerRuntimes() throws Exception {
ObjectName service = new ObjectName(
"com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
return (ObjectName[]) connection.getAttribute(service, "ServerRuntimes");
public void printNameAndState() throws Exception {
ObjectName[] serverRT = getServerRuntimes();
System.out.println("got server runtimes");
int length = (int) serverRT.length;
for (int i = 0; i < length; i++) {
MBeanInfo mb = connection.getMBeanInfo(serverRT[i]);
System.out.println(mb.getClassName());
String name = (String) connection.getAttribute(serverRT[i], "Name");
String state = (String) connection.getAttribute(serverRT[i],
"State");
System.out.println("Server name: " + name + ". Server state: " + state); -
JMXConnector connect fails but JConsole connects
I have been using JMXConnectorFactory.connect for several months with no problem on different servers until I tested it on a new server. The remote server is 1.5 and this statement:
connector = JMXConnectorFactory.connect(address,env);
produces this error:
Oct 23, 2007 10:43:26 AM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
WARNING: "IOP01210228: (BAD_OPERATION) This ORB instance has been destroyed, so no operations can be performed on it"
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 228 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(Unknown Source)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(Unknown Source)
at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(Unknown Source)
at com.sun.corba.se.impl.orb.ORBImpl.create_any(Unknown Source)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.writeAny(Unknown Source)
at javax.rmi.CORBA.Util.writeAny(Unknown Source)
at org.omg.stub.javax.management.remote.rmi._RMIServer_Stub.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(Unknown Source)
at javax.management.remote.rmi.RMIConnector.connect(Unknown Source)
at javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
at MyJMXServer.listenSocket(MyJMXServer.java:199)
at MyJMXServer.main(MyJMXServer.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Unknown Source)
[ERROR] Error connecting to JMXConnector : CORBA BAD_OPERATION 1398079716 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 228 completed: No
However using JConsole (jdk1.5.0_11) I do get a connection. I did a trace for JConsole with
javax.management.level=FINEST
javax.management.remote.level=FINEST
but could not see if it was calling com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState which is where I think the problem is.
I could not find anything related to IOP01210228 or CORBA BAD_OPERATION 1398079716.
I also tested the connect without the env parameter:
connector = JMXConnectorFactory.connect(address); hoping to get an authentication error but I still received the same error described above.This is the jconsole trace output set to FINEST during the connect. I just copied enough to show that it connects.
Oct 29, 2007 12:30:02 PM RMIConnector connect
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
///jndi/iiop://D6-DMS-001:8489/dms] connecting...
Oct 29, 2007 12:30:02 PM RMIConnector connect
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
///jndi/iiop://D6-DMS-001:8489/dms] finding stub...
Oct 29, 2007 12:30:03 PM RMIConnector connect
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
///jndi/iiop://D6-DMS-001:8489/dms] connecting stub...
Oct 29, 2007 12:30:03 PM RMIConnector connect
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
///jndi/iiop://D6-DMS-001:8489/dms] getting connection...
Oct 29, 2007 12:30:03 PM RMIConnector connect
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
///jndi/iiop://D6-DMS-001:8489/dms] getting class loader...
Oct 29, 2007 12:30:03 PM RMIConnector connect
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
///jndi/iiop://D6-DMS-001:8489/dms] done...
Oct 29, 2007 12:30:04 PM RMIConnector queryNames
FINEST: name=java.lang:*, query=null
Oct 29, 2007 12:30:04 PM RMIConnector isInstanceOf
FINEST: name=java.lang:type=Runtime, className=java.lang.management.RuntimeMXBea
n
Oct 29, 2007 12:30:04 PM RMIConnector addNotificationListener(ObjectName,Notific
ationListener,NotificationFilter,Object)
FINEST: name=JMImplementation:type=MBeanServerDelegate, listener=sun.tools.jcons
ole.MBeansTab[,2,25,887x655,invalid,hidden,layout=sun.tools.jconsole.VariableGri
dLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777225,maximumSize=,minimu
mSize=,preferredSize=], filter=null, handback=null
Oct 29, 2007 12:30:04 PM RMIConnector addListenerWithSubject -
JConsole unable to connect to PID
Hi All,
First off, I know very little about JDKs, let alone JConsole. We're using the tool to monitor a process in our test environment, however the same commands do no work in our production environment. These are the commands I'm using, and the error which I'm receiving -
$ cd /usr/java6_64/bin
$ jconsole &
[1] 19202262
I am presented with:
JConsole: New Connection
* Local Process
run.jar.start (This is the Name I select) along with the associated PID.
Click Connect
This is the error:
"Connection Lost; Reconnect?
The connection to "PID#" has been lost because the remote process has been terminated.
Would you like to reconnect?"
I am not experiencing this issue in our test environment. I do not know where to start to begin trouble shooting the issue.
What other information would you like?
Thanks,
SteveI will answer my own question.
Yes you can use MX4J with JConsole. The problem I was having was because of the way we block our main thread.
When we start our services we kick off a new thread from the main thread and then our main thread goes into a wait where it listens for IO from the user using the System.in.
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
String in = null;
do {
// Waits for user input from the console
in = r.readLine(); //blocks the main thread, this blocks the JConsole from being attaching to the MBeanServer
Shawn
www.whatjar.co.uk -
Looking at Threads in jconsole and should I worry?
When watching a threaded app in jconsole in the Threads Tab, I see a lot of threads, but I assume for several reasons that the ones name btpool#-# where # is a number are the ones in which my code is executing.
Now when I select a thread like "main, Reference Handler, etc" some of these have stack traces some of them do not list any of my classes, but some of them do, even the btpool threads have stack traces.
My question is what is the significance of these stack traces? They seem to be there even when the app is running fine no tasks skippped or crashed.
Second question why are the first lines left out, the one that say what kind of an Exception was thrown? Seems like that would be helpful info.
In the thread list is a thread called Thread-2 which always has a line -locked java.net.SocksSocketImpl@......., is this something I could fix?
RMIScheduler(0) always has sun.misc.Unsafe.park(Native Method), anything helpful there?
Am I correct in assuming that the "Detect Deadlock" button only applies to the currently selected thread?
So much info, but what is important?
JimIf you want to know more information, I suggest using a debugger. This will give you answers to most of these questions.
jjones3566 wrote:
My question is what is the significance of these stack traces? It shows what the thread is doing.
They seem to be there even when the app is running fine no tasks skippped or crashed.If you had no stack traces, your program wouldn't be doing anything, or waiting to do anything.
Second question why are the first lines left out, the one that say what kind of an Exception was thrown?What suggests that an Exception is being thrown?
Seems like that would be helpful info.If this were happening, you would see the Exception in the stack trace.
In the thread list is a thread called Thread-2 which always has a line -locked java.net.SocksSocketImpl@......., is this something I could fix?If you have a dealock, yes. Otherwise, probably no.
RMIScheduler(0) always has sun.misc.Unsafe.park(Native Method), anything helpful there?It means it waiting to do something. i.e. park'ing
Am I correct in assuming that the "Detect Deadlock" button only applies to the currently selected thread?No.
So much info, but what is important?Not enough information I would guess, a debugger is better if you are trying to find a bug. -
How does jconsole know of all monitored JVMs in system?
When you run jconsole, the tab named "local" lists JVMs running and their PIDs. By what mechanism is it able to 'know' which JVMs are running that have been started with the arguments that enable JMX management?
Does jconsole connect to JVMs or to MBeanServers? (Assume each JVM has multiple MBeanServers, and each MBeanServer has multiple domains.)
Also, what's the difference between using the 'remote' and 'advanced' tabs to connect to a JVM? They both have usernames and passwords, but while the 'remote' tab has a host and port, the 'advanced' tab has a URL that contains a host and port within it. So what's the difference - when would you pick one method of connection over another?
Thanks.If jconsole connects to MBeanServers rather than
JVMs, then how can it tell the difference between
multiple MBeanServers that have been started by a
single JVM?JConsole connects to a given JMX connector server which is associated with a given MBeanServer at creation time.
For example, if I have a simple application (i.e. one
JVM) that starts up two MBeanServers in its main
method, using
MBeanServerFactory.createMBeanServer(name). To start
the application, you run the JVM with the
com.sun.management.jmxremote and
com.sun.management.jmxremote.port variables.
How will jconsole know to differentiate between the
two MBeanServers? After all, there's only one JVM -
and it's been started with only one port number.In your example JConsole will not see any of your MBeanServers. It'll see the platform MBeanServer which is the one used by the out-of-the-box management agent.
The next question I have is regarding the JVM - does
any JVM that's started locally show up in the "local"
tab of JConsole (because the JVM is always
instrumented by default - true?), or does it only
appear if you run it with the
com.sun.management.jmxremote variable?The new Attach API in JDK 6 allows JConsole 6 to show all the JVMs running on the local machine although you will only be able to connect to the ones running on JDK 6 (and JDK 5.0 if started with the com.sun.management.jmxremote or com.sun.management.jmxremote.port system properties).
JConsole 5 only shows the JVMs running on JDK 5.0 and started with the com.sun.management.jmxremote or com.sun.management.jmxremote.port system properties.
Have a look at the link below for more detailed info:
http://java.sun.com/javase/6/docs/technotes/guides/management/index.html
Regards,
Luis-Miguel Alventosa
Java SE JMX/JConsole development team
Sun Microsystems, Inc.
http://blogs.sun.com/lmalventosa/ -
Geting remote management example work with 1.5 jconsol.exe
Hello, I had a difficulty getting remote manegement exaple work with jconsole.
I follow the guidence of:
http://java.sun.com/developer/technicalArticles/J2SE/jmx.html
Working with HTTP adaptor going fine,
Tring to invoke example with jconsole.exe produces exception (the situation happens unsing jre 1.4 and 1.5):
the code:
public class Server {
public static void main(String[] args) {
try {
// Instantiate the MBean server
System.out.println("\nCreate the MBean server");
MBeanServer mbs = MBeanServerFactory.createMBeanServer();
// Create a JMXMP connector server
System.out.println("\nCreate a JMXMP connector server");
JMXServiceURL url = new JMXServiceURL("jmxmp", null, 5551);
JMXConnectorServer cs =
JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
// Start the JMXMP connector server
System.out.println("\nStart the JMXMP connector server");
cs.start();
System.out.println("\nJMXMP connector server successfully started");
System.out.println("\nWaiting for incoming connections...");
} catch (Exception e) {
e.printStackTrace();
}consol:
Create the MBean server
Create a JMXMP connector server
Start the JMXMP connector server
JMXMP connector server successfully started
Waiting for incoming connections...
20/03/2007 10:54:51 GenericConnectorServer ClientCreation.run
WARNING: Failed to open connection: java.io.StreamCorruptedException: invalid stream header
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at com.sun.jmx.remote.socket.SocketConnection$ObjectInputStreamWithLoader.<init>(SocketConnection.java:354)
at com.sun.jmx.remote.socket.SocketConnection.readMessage(SocketConnection.java:204)
at com.sun.jmx.remote.opt.security.AdminServer.connectionOpen(AdminServer.java:76)
at com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl.connect(ServerSynchroMessageConnectionImpl.java:58)
at javax.management.remote.generic.GenericConnectorServer$ClientCreation.run(GenericConnectorServer.java:405)
at com.sun.jmx.remote.opt.util.ThreadService$ThreadServiceJob.run(ThreadService.java:208)
at com.sun.jmx.remote.opt.util.JobExecutor.run(JobExecutor.java:59)Any ideas ?
10X
Message was edited by:
KIRPICH79Hi,
We belive that you used the default connector RMIConnector in your jconsole to connect your JMXMP connector server.
What you should do is to:
1) start your jconsole with the jmxmp classes:
jconsole -J-Djava.class.path=JAVA_HOME/lib/jconsole.jar:JAVA_HOME/lib/tools.jar:jmxremote_optional.jar
(see http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html)
2) specify your server url address in the jconsole connecting window:
service:jmx:jmxmp://boat:5551
you should substitue "boat" to your host name
3)connect
Hope this helps and let's know if you still have problem.
Shanliang JIANG
SUN JavaSE/JMX team -
Does anyone having any suggestions on how to try and debug a plugin tab for jconsole ?
I'd like to try and do this from eclipse if possible, the problem is due to having supply the jar file with jconsole instead of class files from eclipse .
any suggestions would be much appreciated.Yup, I just did that myself. I wrote a main() method in our plugin class and connect to our JMX-enabled app. Here's a code fragment that might get you started:
-- david
private static String JMX_KEY = "com.sun.management.jmxremote.localConnectorAddress";
private static VirtualMachine findMonitorVM() throws AttachNotSupportedException, IOException {
// only local VM's supporting the attach api will respond here. This means JDK 1.6 and newer
for (VirtualMachineDescriptor vmd : VirtualMachine.list()) {
if (vmd.displayName().equals(MONITOR_CLASS)) {
return VirtualMachine.attach(vmd);
return null;
private static String agentAddress() throws Exception {
VirtualMachine vm = findMonitorVM();
if (vm == null) {
throw new RuntimeException("Saffron monitor agent not running");
String addr = vm.getAgentProperties().getProperty(JMX_KEY);
if (addr == null) {
throw new RuntimeException("Remote management agent not loaded");
vm.detach();
return addr;
private static MBeanServerConnection connect() throws Exception {
JMXServiceURL url = new JMXServiceURL(agentAddress());
JMXConnector conn = JMXConnectorFactory.connect(url);
return (conn.getMBeanServerConnection());
private static void startSwingWorker(final MonitorAgentTab agent) {
TimerTask task = new TimerTask() {
public void run() {
agent.makeEventHandler().execute();
Timer timer = new Timer("MonitorAgentTab Swing thread", true);
timer.schedule(task, 0, 2000);
public static void main(String args[]) throws Exception {
MonitorAgentTab agent = new MonitorAgentTab();
agent.setMBeanServerConnection(connect());
agent.startManagement();
JFrame frame = new JFrame("MonitorAgentTab");
frame.getContentPane().add(agent);
frame.setPreferredSize(new Dimension(900, 500));
frame.pack();
frame.setVisible(true);
startSwingWorker(agent);
} -
JConsole and MX4J - Unable to connect.
Hi, I am trying to connect to an application that uses MX4J for its JMX monitoring, but I am unable to connect to any remote or local JVMs.
Java version=1.6.0_01-b06
I can see my local process but if I try connect to it I just get the info window saying connecting to <and then the pid number>, but never connects.
If I try connect to the remote process using the server host and port it tries for a long time before it fails to connect.
service:jmx:rmi:///jndi/rmi://host:port/myconnector
Firstly can you use JConsole if you are using MX4J?
Is there a log file that gives more info about the failed connection?
Any ideas would be appreciated:
Thanks,
ShawnI will answer my own question.
Yes you can use MX4J with JConsole. The problem I was having was because of the way we block our main thread.
When we start our services we kick off a new thread from the main thread and then our main thread goes into a wait where it listens for IO from the user using the System.in.
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
String in = null;
do {
// Waits for user input from the console
in = r.readLine(); //blocks the main thread, this blocks the JConsole from being attaching to the MBeanServer
Shawn
www.whatjar.co.uk -
JConsole 6 PID connection problems
I have written a small program that I would like to manage using JMX. Using JDK 5 everything works fine. But since I migrated to JDK 6 the JMX part does not work anymore. Here is the code of the MBean that I would like to manage:
Interface
public interface HelloMBean {
public String test() throws java.rmi.RemoteException;
Class
public class Hello implements HelloMBean {
public String test() { return "Hello"; } throws java.rmi.RemoteException;
public Hello() {
try { ManagementFactory.getPlatformMBeanServer().registerMBean(this, new ObjectName(getClass().getPackage().getName().concat(":type=").concat(getClass().getSimpleName()))); }
catch (Exception E) { LOG.throwing(getClass().getName(), "<init>", E); }
}When using JConsole from JDK 6 and try to connect using the PID method, JConsole tries to connect to the (correct) PID forever.
I scanned through the forum and other sources in the Internet but all the proposed trouble-shoots did not help. I checked the TMP directory and inside is a directory named "hsperfdata_bwuest01". Inside this directory one file per JVM is, named for the PID of the JVM process (e.g. 2772, which I try to connect to in JConsole). The access rights to this directory are (oh, sorry, I am using Windows XP on NTFS):
d:\document and settings\bwuest01\local settings\temp\hsperfdata_bwuest01 bwuest01:F
d:\document and settings\bwuest01\local settings\temp\hsperfdata_bwuest01 everyone:RHope that someone can help me with this issue, because I do not want to migrate back to JDK 5.Hi,
Sorry for taking some days to come back but I am no more a "hardcore" developer, but rather hope to find some time to code once a month.
I have cleared my PC from all Java versions except JDK 6.0 with the following version information:
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
Here is the log that is printed by the server application with logging of JMX enabled:
*22.09.2007 22:17:47 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = JMImplementation:type=MBeanServerDelegate
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=JMImplementation:type=MBeanServerDelegate
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object JMImplementation:type=MBeanServerDelegate
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered JMImplementation:type=MBeanServerDelegate
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.ClassLoadingImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=ClassLoading
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=ClassLoading
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:type=ClassLoading
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=ClassLoading
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=Memory
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=Memory
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:type=Memory
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=Memory
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for com.sun.management.OperatingSystem
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=OperatingSystem
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=OperatingSystem
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:type=OperatingSystem
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=OperatingSystem
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.RuntimeImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=Runtime
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=Runtime
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:type=Runtime
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=Runtime
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.ThreadImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=Threading
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=Threading
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:type=Threading
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=Threading
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.HotSpotDiagnostic
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = com.sun.management:type=HotSpotDiagnostic
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=com.sun.management:type=HotSpotDiagnostic
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object com.sun.management:type=HotSpotDiagnostic
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered com.sun.management:type=HotSpotDiagnostic
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.CompilationImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=Compilation
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=Compilation
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:type=Compilation
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=Compilation
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryManagerImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=MemoryManager,name=CodeCacheManager
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=MemoryManager,name=CodeCacheManager
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=CodeCacheManager,type=MemoryManager
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=MemoryManager,name=CodeCacheManager
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.GarbageCollectorImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=GarbageCollector,name=Copy
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=GarbageCollector,name=Copy
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=Copy,type=GarbageCollector
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=GarbageCollector,name=Copy
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.GarbageCollectorImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=GarbageCollector,name=MarkSweepCompact
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=GarbageCollector,name=MarkSweepCompact
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=MarkSweepCompact,type=GarbageCollector
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=GarbageCollector,name=MarkSweepCompact
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=MemoryPool,name=Code Cache
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=MemoryPool,name=Code Cache
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=Code Cache,type=MemoryPool
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Code Cache
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=MemoryPool,name=Eden Space
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=MemoryPool,name=Eden Space
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=Eden Space,type=MemoryPool
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Eden Space
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=MemoryPool,name=Survivor Space
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=MemoryPool,name=Survivor Space
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=Survivor Space,type=MemoryPool
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Survivor Space
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=MemoryPool,name=Tenured Gen
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=MemoryPool,name=Tenured Gen
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=Tenured Gen,type=MemoryPool
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Tenured Gen
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.lang:type=MemoryPool,name=Perm Gen
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.lang:type=MemoryPool,name=Perm Gen
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.lang:name=Perm Gen,type=MemoryPool
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Perm Gen
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
*FEINER: ObjectName = java.lang:type=MemoryPool,name=Perm Gen [shared-ro]*
*22.09.2007 22:17:48 Repository addMBean*
*FEINER: name=java.lang:type=MemoryPool,name=Perm Gen [shared-ro]*
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
*FEINER: Send create notification of object java.lang:name=Perm Gen [shared-ro],type=MemoryPool*
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
*FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Perm Gen [shared-ro]*
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for sun.management.MemoryPoolImpl
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
*FEINER: ObjectName = java.lang:type=MemoryPool,name=Perm Gen [shared-rw]*
*22.09.2007 22:17:48 Repository addMBean*
*FEINER: name=java.lang:type=MemoryPool,name=Perm Gen [shared-rw]*
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
*FEINER: Send create notification of object java.lang:name=Perm Gen [shared-rw],type=MemoryPool*
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
*FEINER: JMX.mbean.registered java.lang:type=MemoryPool,name=Perm Gen [shared-rw]*
*22.09.2007 22:17:48 StandardMBean getMBeanInfo*
FEINER: Building MBeanInfo for java.util.logging.Logging
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = java.util.logging:type=Logging
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=java.util.logging:type=Logging
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object java.util.logging:type=Logging
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered java.util.logging:type=Logging
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = net.eco_dom.server.registry:type=CRegistry
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=net.eco_dom.server.registry:type=CRegistry
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object net.eco_dom.server.registry:type=CRegistry
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered net.eco_dom.server.registry:type=CRegistry
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = net.eco_dom.server.service.network:type=CConnectionManager
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=net.eco_dom.server.service.network:type=CConnectionManager
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object net.eco_dom.server.service.network:type=CConnectionManager
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered net.eco_dom.server.service.network:type=CConnectionManager
Server is running
Echo server running and registered
Mediator registrar is running and registered
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor registerMBean*
FEINER: ObjectName = net.eco_dom.server.service.mediator_registrar:type=CMediatorRegistrar
*22.09.2007 22:17:48 Repository addMBean*
FEINER: name=net.eco_dom.server.service.mediator_registrar:type=CMediatorRegistrar
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor addObject*
FEINER: Send create notification of object net.eco_dom.server.service.mediator_registrar:type=CMediatorRegistrar
*22.09.2007 22:17:48 DefaultMBeanServerInterceptor sendNotification*
FEINER: JMX.mbean.registered net.eco_dom.server.service.mediator_registrar:type=CMediatorRegistrar
And here is the log of JConsole with the option you proposed:
This is all that JConsole prints while having debug active => it is nothing! That is the reason why I am so puzzled about this problem. If I would get some kind of an exception, even it is one of those "nothing-saying NPE", I would have an indication that there is a problem somewhere. But looking at the current logs (well, JConsole did not print one) I cannot identify any problem, except that things are not working. However, as I already mentioned, I could manage to make it work with coding the "stay in main-method forever" in a different way.
Best regards,
Bjoern -
I would like to JConsole my webstart application. I tried adding com.sun.management.jmxremote as a system property to JNLP file, but I could not find a way to make webstart applications run through the JDK's JRE (which is what JConsole needs).
So is there a nice way to JConsole webstart applications?It is possible to attach a debugger to a JVM started by Web Start. I got the following batch file from another thread and I made it to work for me.
@echo off
setlocal
rem *** The following parameters must come from the JNLP file ***
set VM_ARGS=-ea -Xincgc -Xmx96m -Dcom.sun.management.jmxremote
set URL=http://mywebsite/downloads/myapp.jsp
rem *** This path must be absolute because javaws uses a simple string-compare against the expected path ***
set JAVAW_PATH=C:\Program Files\java\jdk1.5.0_04\bin\javaw.exe
rem *** Enable the following line to have Webstart dump all possible logs ***
rem set WS_DEBUG=-XX:TraceBasic=true -XX:TraceNetwork=true -XX:TraceCache=true -XX:TraceTemp=true -XX:TraceSecurity=true -XX:TraceExtensions=true
rem *** Enable the following line create a JNLP session on startup ***
set JDPA=-Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n
set DEBUG=-Xdebug -Xnoagent -Djava.compiler=NONE %JDPA% -Dcom.sun.management.jmxremote
set WS_OPTS="-Xbootclasspath/a:%JAVA_HOME%\jre\lib\javaws.jar;%JAVA_HOME%\jre\lib\deploy.jar" "-Djnlpx.vmargs=%DEBUG%" "-Djnlpx.jvm=%JAVAW_PATH%" "-Djnlpx.splashport=-1" "-Djnlpx.home=%JAVA_HOME%\jre\bin" "-Djnlpx.remove=false" "-Djnlpx.offline=false" "-Djnlpx.heapsize=NULL,NULL" "-Djava.security.policy=file:%JAVA_HOME%\jre\lib\security\javaws.policy" "-Djnlpx.deployment.system.home=C:\WINDOWS\Sun\Java\Deployment" "-Djnlpx.deployment.user.home=C:\Documents and Settings\hxue.FRACTAL\Application Data\Sun\Java\Deployment" -DtrustProxy=true -Xverify:remote
echo on
"%JAVA_HOME%\jre\bin\java.exe" %VM_ARGS% -esa %WS_OPTS% -classpath "%JAVA_HOME%\jre\lib\javaws.jar" com.sun.javaws.Main %WS_DEBUG% %URL%Save the content in a .bat file (I assume you use Windows) and run it from the command line. After your web start app starts running, attach your debugger to port 8888. -
Not having to refresh the data in the main report but only in the subreport
Hi SAP,
I have a report that uses a stored procedure in the main report and uses regular database tables in the subreport. The data returned from the stored procedure reports information from the month-end database (a cutoff point from the previous month's numbers) while the subreport reports information from the live database. This report gets run everyday to show the changes in numbers from the live database. Obviously the numbers from the month-end database remainds static until the next month's cutoff database is created.
My problem is that everyday when I run the report, the data needs to refresh from both the stored procedure in the main report and the live database tables in the subreport. How can I leave the data returned from the stored procedure static or as is without refreshing the stored procedure returned data and just have the subreport data refresh itself? The stored procedure really puts a strain on the database and I would like to cut-out the time to process the report as well. Does anyone have any ideas?
ZackHi Zack,
Try the following under Report options.
1. Clear the check box of "Verify Stored Procedures on First Refresh" in the Main report.
2. Select the check box of "Verify on First Refresh" in the sub report.
Hope this helps.
Maybe you are looking for
-
# This file is in the UTF-8 encoding [Strings] # LOCALIZATION NOTE (isRTL): # Leave this entry empty unless your language requires right-to-left layout, # for example like Arabic, Hebrew, Persian. If your language needs RTL, please # use the untransl
-
Updating to panther from 9.2 on iMac G3?
I have all the Mac OS X Panther CD's, and I can select them as the startup disk from the control panel, but when I reboot and it tries to boot from the disk but it shows the folder with the question mark in it. Are there any settings I need to disabl
-
Can't access a portal I need for work!
I get the following message when I try to access a work portal. "If you are having issues seeing parts of the portal, please use Internet Explorer (with Compatibility View selected) or Firefox as your browser. " Does this mean I can't access it with
-
HOW DO I CANCEL ADOBE PDF SERVICES??????
HOW DO I CANCEL SERVICE.
-
10.4.7, PB G4 550MHz, Firewire external peripherals
Hi, I updated from 10.4.6 to 10.4.7 a few days ago and since then no more firewire periphrals are mounted. No external HD, no DV cam, no external DVD-RW. I tested all these peripherals on other PCs and Mac and there are recognized without problems. I