How to integrate Intelij IDEA and OC4J by jsr-45

Hi

How I can locally debug my web app in Idea (6.0.6) with standalone OC4J (101330)?

Dev computer info:
JDK 1.6.0_02
WinXP Sp2


I try to use with batch file to start OC4J:
set JAVA_HOME=C:\Java\jdk1.6.0_02
set ORACLE_HOME=D:\Oracle\oc4j101330

set ADMIN_JAR=%ORACLE_HOME%\j2ee\home\admin.jar
set CLIENTNAME=Console
set CMD=-start
set CMDARGS=-config "%ORACLE_HOME%\j2ee\home\config\server.xml"
set J2EE_HOME=%ORACLE_HOME%\j2ee\home
set OC4J_JAR=%ORACLE_HOME%\j2ee\home\oc4j.jar
set ORMI_URL=ormi://localhost
set ORMI_USER=oc4jadmin
set SERVER_XML=%ORACLE_HOME%\j2ee\home\config\server.xml
set SESSIONNAME=Console

set JVM_OPTS=-Xms128m -Xmx256m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
%JAVA_HOME%\bin\java %JVM_OPTS% -jar %OC4J_JAR% %CMDARGS%


I see this error in debug window:
C:\>C:\Java\jdk1.6.0_02\bin\java -Xms128m -Xmx256m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8151 -jar D:\Oracle\oc4j101330\j2ee\home\oc4j.jar -config "D:\Oracle\oc4j101330\j2ee\home\config\server.xml"

FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized


In Process Explorer I see the port 8151 is starting to listen from process idea.exe in press debug button monent.

If I change port number - situation is same.

Help me please.

Please sign in to leave a comment.