MyEclipse下如何调试EJB服务端代码(weblogic环境)
dt_socket这个一定要小写,否则将无法启动weblogic
下面是在weblogic10.3.2 aix下的配置结果:
大概在startWebLogic.sh (一定domain下,注:我的是domain\bin下面)的189行,修改为如下:
${JAVA_HOME}/bin/java ${JAVA_VM} -version
JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=30000,server=y,suspend=n"
export JAVA_DEBUG
if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
echo "Starting WLS with line:"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${JAVA_DEBUG} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Dfile.encoding=UTF-8 -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${JAVA_DEBUG} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Dfile.encoding=UTF-8 -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
fi
重启weblogic,OK,终于成功,鸡冻人心啊,赶紧记录下来,嘿嘿。
光锥极客 2011/11/19 13:40 阅读量:2991