Debug Remotelly WebLogic Web Service - Debugger unable to connect
969358Dec 28 2012 — edited Jan 2 2013I have been able to debug locally when I start debug from IntegratedWebLogicServer,
but I have not been able to debug remotelly although I deploied successfully to WebLogic Server and I got correct result while testing from SoapUI.
With the purpose to debug remotelly the simple web service described below, I have done these steps on my enviroment:
On WebLogic
1) In the WebLogic console, belong the AdminServer definition, I browsed to Protocol > HTTP Tunneling and I checked it.
2) In startWebLogic.cmd I added:
set JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n %SAVE_JAVA_OPTIONS%
3) In setDomainEnv.cmd I changed to be:
set debugFlag=true
...
if "%debugFlag%"=="true" (
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...
)
After that, I restarted the weblogic.
On JDeveloper
4) In the page Project Properties > Run/Debug/Profile > Default > Edit:
I wrote the path to the HelloWorld.java on Default Run Target box.
I checked Remote Debugging
5) I right clicked the project and clicked Start Remote Debugger.
On Attach to JDPA Debugger window I wrote LocalHost on Host and 4000 on Port.
In my log window I got this message:
"Debugger attempting to connect to remote process at LocalHost 4000.
...Debugger unable to connect to remote process."
I was expecting to be able to call the web service from SoapUI and then stop on my breakpopint. What else should I do?
The only suggestion found on internet I have not done was
"In order for JDeveloper to work with WebLogic it will need a copy of the weblogic.jar file that can be found at [WLS-root]\weblogic1001\server\lib, copy this file to [jdev-root]\jdev\lib\ext directory and restart JDeveloper."
(http://www.oracle.com/technetwork/developer-tools/jdev/remotedebugwls-086628.html) I didn't find the path [jdev-root]\jdev\lib\ext in my computer.
My Sources:
//HelloWorld.java
package demo;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.SOAPBinding;
@WebService(portName = "HelloWorldSoap12HttpPort")
@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
public class HelloWorld {
public String sayHello(String firstname, String lastname){
return "Hello " + firstname + " " + lastname;
}
}
//web.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
<servlet>
<servlet-name>HelloWorldSoap12HttpPort</servlet-name>
<servlet-class>demo.HelloWorld</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldSoap12HttpPort</servlet-name>
<url-pattern>/HelloWorldSoap12HttpPort</url-pattern>
</servlet-mapping>
</web-app>