27 April 2007

Start OC4J in remote debug mode

Note for self: starting OC4J in remote debug mode

>java -server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -jar oc4j.jar

4 comments:

Anonymous said...

Hi
I recently have difficulties to start OC4J Instance in debug mode since I don't know where to put
"-server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -jar oc4j.jar " since OC4J instance is started from Oracle Enterprise Manager administrative console.
Can you help?

Buttso said...

You basically need to configure the EM managed OC4J instance with these settings.

Ultimately they will end up in the $OH/opmn/conf/opmn.xml as Java start properties for the OC4J instance in question.

<process-type id="foo" module-id="OC4J" status="enabled">
<module-data>
<category id="start-parameters">
<data id="java-options" value=" ... GOES IN HERE ... " />
</category>


From OracleAS 10.1.3.1 onwards you can enter these values using EM itself -- see the Server Properties link at the bottom of the console. Or you can manually add them to the opmn.xml file yourself. If you do that, remember to either stop/start OPMN process (and all associated managed procs), or at the very least force OPMN to do reload (-reload) and then individually cycle the OC4J instances.

Marian said...

Thanks a lot, I solve the problem.

Marian said...

Hi I have another question. I recently install Oracle Web Center 10.1.3 and I want to debug web services deployed on OC4J_WebCenter.
I made all things from here:
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3?topic=rem_p_main_oc4j_html
but when I try to start a remote debug it asks me to select "Default run target" the only file that looks to be valid run target is .jaxrpc file since project is Web Service but in this case it starts Embedded OC4J server and not connect to remote server. In JDeveloper 10.1.2 it was "Start Remote Debugger" option. So my question is how to connect t remote OC4J and not to start embedded one.

Thanks in advance