Search code examples
eclipsedebuggingweblogicliferay

Enable debug mode with liferay in weblogic server? and debug in eclipse with those serves?


I am working with Liferay portal on weblogic server and I have problems to debug with eclipse.

I use Eclipse Juno with OEPE Pack extension, Oracle Weblogic Server 11gR1 (10.3.5) and Liferay 6.1.

When i start without debug options i launch weblogic admin server OK and liferay server OK.

But when I change local domain file setDomainEnv.sh with this lines

set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole.`

Weblogic serve starts OK

Server Log

Listening for transport dt_socket at address: 8453 java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Oracle JRockit(R) (build R28.1.3-11-141760-1.6.0_24-20110301-1429-windows-ia32, compiled mode) Starting WLS with line: E:\Oracle\MIDDLE~1\JROCKI~1.2-4\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx512m -Dweblogic.Name=Admin -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Dweblogic.ProductionModeEn abled=true -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=E:\Or acle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=E:\WLS\DO MINI~1\LOCAL_~1 -Does.client.home=E:\Oracle\MIDDLE~1\OES -Doracle.home=E:\Oracle\MIDDLE~1\OES -Doracle.security.jps.config=E:\WLS\DOMINI~1\LOCAL_~1\co nfig\oeswlssmconfig\Admin\jps-config.xml -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConso le=false -Dweblogic.ext.dirs=E:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_oepe180\profiles\def ault\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_ocp360\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_jdev1111\profiles\d efault\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manifest_classpath weblogic.Server Listening for transport dt_socket at address: 8453

but when I start liferay server fails

Liferay script

set DOMAIN_HOME=E:\WLS\Dominio_wls11\local_domain1
call "%DOMAIN_HOME%\bin\startManagedWebLogic.cmd" liferay %*)

Server log

starting weblogic with Java version: 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 [../../../src/share/back/debugInit.c:690] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) [ERROR] aborted JRockit aborted: Unknown error (50) Starting WLS with line: E:\Oracle\MIDDLE~1\JROCKI~1.2-4\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms512m -Xmx512m -Dweblogic.Name=liferay -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.security.SSL.trustedCAKeyStore="E:\Oracle\Middleware\wlserver_10.3\server\lib\cacerts" -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=E:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=E:\WLS\DOMINI~1\LOCAL_~1 -Does.client.home=E:\Oracle\MIDDLE~1\OES -Doracle.home=E:\Oracle\MIDDLE~1\OES -Doracle.security.jps.config=E:\WLS\DOMINI~1\LOCAL_~1\config\oeswlssmconfig\liferay\jps-config.xml -Dweblogic.management.discover=false -Dweblogic.management.server=http://localhost:9819 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=E:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_ocp360\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manifest_classpath weblogic.Server 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 [../../../src/share/back/debugInit.c:690] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) [ERROR] aborted JRockit aborted: Unknown error (50)

Why does liferay server fail?

I think that i need to configurate servers in eclipse for connect to weblogic in debug mode. How could i do this? I have seen that i don´t have Liferay 6.1 server for weblogic in the server list only Liferay 6.1 server to Tomcat 6 o 7. I try to install Liferay IDE plugin but it fails due to different conflicts with OEPE Pack.


Solution

  • You're using the same debug port (8453) for both JVMs. "Address already in use" means that Java cannot create a socket on this port because another socket occupies it.