Sign in or 

For Application Server 10.1.3.x goto $ORACLE_HOME/opmn/config.Edit opmn.xml. Add this to the process-type/start-paramters/java-options of the "home" or "oc4j-soa" or ...
Restart Application Server
For OC4J standalone edit $ORACLE_HOME/bin/oc4j.cmd or oc4j.sh, addset JVMARGS=%OC4J_JVM_ARGS% -Dcom.sun.management.jmxremote=true
or
set OC4J_JVM_ARGS=-Dcom.sun.management.jmxremote=true before starting OC4J
For Application Server 11g (Technology PreviewTP3, TP4 or TP5)- Go to your $JDEV_USER_DIR/system11.1.1.0.22.48.95/o.j2ee/embedded-oc4j/bin
( for TP5 go to $JDEV_USER_DIR/system11.1.1.0.30.50.54/o.j2ee/embedded-oc4j/bin)
- Edit the startsoa(.bat): add "-Dcom.sun.management.jmxremote" to the JAVA_VM paramter
- Start the server with this script directly or from within the JDeveloper 11g.
JConsole screens:
JVisualVM/VisualVM screen:
jconsole
-J-Dcom.sun.management.jmxremote.ssl=false
-J-Dcom.sun.management.jmxremote.authenticate=true
-J-Djmx.remote.protocol.provider.pkgs=oracle.oc4j.admin.jmx.remote
-J-Djava.class.path=;%JAVA_HOME%\lib\jconsole.jar;%JAVA_HOME%lib\tools.jar;%ORACLE_HOME%\j2ee\home\lib\adminclient.jar;%ORACLE_HOME%\j2ee\home\oc4jclient.jar
Using the advanced connection tab, you can specify the direct JMX Service URL to identify the target server.
To connect remotely to an OC4J process the URL is of the format
OC4J standalone:service:jmx:rmi://[oc4j-host]:[oc4j-port]Oracle Application Server(OPMN managed):
e.g. service:jmx:rmi://localhost:23791, User Name: oc4jadmin, password: welcome1service:jmx:rmi:///opmn://<hostname>:<opmn-port>/<container-name>
e.g. service:jmx:rmi:///opmn://localhost:6005/home, User Name: oc4jadmin, password: welcome1
jvisualvm
-J-Dcom.sun.management.jmxremote.ssl=false
-J-Dcom.sun.management.jmxremote.authenticate=true
-J-Djmx.remote.protocol.provider.pkgs=oracle.oc4j.admin.jmx.remote
--cp:a %ORACLE_HOME%\j2ee\home\lib\adminclient.jar;%ORACLE_HOME%\j2ee\home\oc4jclient.jar
Using File -> Add JMX Connection, and "Use security credential" (e.g. oc4jadmin/welcome1)
With the option "--cp:a" you define the classpath for the netbean. See "visualvm --help".
With the option "-J-Dnetbeans.logger.console=true" you can get the logging to the console.
Tested with JVisualVM: Java SE 6 Update 13 and 14 and VisualVM 1.1.1.
|
robert.baumgartner |
Latest page update: made by robert.baumgartner
, Jun 20 2009, 3:00 AM EDT
(about this update
About This Update
3 words added 3 words deleted view changes - complete history) |
|
More Info: links to this page
|
| Started By | Thread Subject | Replies | Last Post | ||
|---|---|---|---|---|---|
| steffm | "Attach Listener" - java.lang.reflect.InvocationTargetException | 0 | Sep 24 2009, 1:12 PM EDT by steffm | ||
|
Thread started: Sep 24 2009, 1:12 PM EDT
Watch
Hi Robert
I'm Unable to use JVisualVM profiler with Standalone OC4J 10.1.3.4 (JDK 1.6) : Exception in thread "Attach Listener" 09/09/11 16:58:15 java.lang.reflect.InvocationTargetException 09/09/11 16:58:15 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09/09/11 16:58:15 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09/09/11 16:58:15 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09/09/11 16:58:15 at java.lang.reflect.Method.invoke(Method.java:597) 09/09/11 16:58:15 at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323) 09/09/11 16:58:15 at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:348) 09/09/11 16:58:15 Caused by: java.lang.NullPointerException 09/09/11 16:58:15 at org.netbeans.lib.profiler.server.ProfilerActivate15.getArchiveFile(ProfilerActivate15.java:75) 09/09/11 16:58:15 at org.netbeans.lib.profiler.server.ProfilerActivate15.activate(ProfilerActivate15.java:96) 09/09/11 16:58:15 at org.netbeans.lib.profiler.server.ProfilerActivate15.agentmain(ProfilerActivate15.java:61) 09/09/11 16:58:15 ... 6 more Agent failed to start! Steps to Reproduce Problem are : 1. Run the server using ==> java -Dcom.sun.management.jmxremote=true -jar oc4j.jar 2. Run JAVA_HOME/bin/jvisualvm. (detected by VisualVM) 3. Double click on OC4J node. I see a tab for PROFILER (along with Threads and memory) 4. Click on profiler TAB 5. When I click on MEMORY or CPU buttons, gives an empty box. An exception is displayed. According to your doc, it should work. Note also that the other TABS work fine, except for the "Profile" tab. Thx for your hints. Steff
Do you find this valuable?
Keyword tags:
10g
11g
java visualvm
jvisualvm
rmi
standalone oc4j
|
|||||