1

I'm trying to debug a J2EE web application currently running on WebLogic, using Eclipse.

My configuration is the following:

  1. AdminServer on localhost:7001 for the WebLogic admin console
  2. MyAppServer on localhost:8001 where I've deployed my web application.

Now i'd like to debug the app on Eclipse (I'm using Oracle WebLogic Pack for Eclipse).

I've found a lot of references on the web, but none of them seems working. maybe because my app is on a managed server...

For example, I've set the weblogic server to run as debug: on the console it says "listening for transport dt_socket at address: 8453". If I try Eclise -> Right-Click on my App -> Debug -> Remote Java Application on port 8453 it says "Failed to connect to VM".

Any hints?

I've no hopes, thanks!

user2010955
  • 3,871
  • 7
  • 34
  • 53
  • This question has been asked tons of times... have you checked: http://stackoverflow.com/questions/975384/eclipse-error-failed-to-connect-to-remote-vm http://stackoverflow.com/questions/9620723/eclipse-failed-to-connect-to-remote-vm-connection-refused http://stackoverflow.com/questions/18599256/failed-to-connect-to-remote-vm-connection-refused-when-trying-to-debug-remote http://stackoverflow.com/questions/12220614/failed-to-connect-to-remote-vm-connection-refused What file did you put the debug line in? – Display Name is missing Jan 14 '14 at 20:46

1 Answers1

3

Take the following steps:

  1. In "startManagedWeblogic.sh" using which your managed server is started, before "startWebLogic.sh" is called, add a line having "debugFlag=true"
  2. Start the server, enable tunneling from the web console (Domain > YOUR_SERVER > Protocols > General > check "Enable Tunneling" checkbox and save), and restart the server.

Default debug port, as you pointed out, is 8453. In Windows environment, substitute ".sh" with ".cmd"

Amir Keibi
  • 1,991
  • 28
  • 45
  • This solution works, but is sub-optimal because you have to hack on the file, and can only debug one managed server at a time. Surely that's not the intended way to do this per Oracle. – ggb667 Mar 17 '14 at 20:32
  • 3
    You can debug as many managed servers as you want by using different debug port in each server. As for whether or not it's the intended solution by Oracle, I'd say you have too much faith in Oracle and the quality of the integration work they've done on bea's weblogic. However, it doesn't mean there is no other solution. By all means, please share it with us. – Amir Keibi Mar 18 '14 at 18:02
  • I'd also like to ask why would one want to debug more than one server at a time. I mean in production you don't have debugging enabled. And in development, you'd work on 1 issue at a time. – Amir Keibi Mar 18 '14 at 18:10
  • You may not be the only developer working in a remote development cluster! Certainly other developers debugging applications deployed on the same managed server will not be able to attach to the same port, and if the ports are the same clearly that's not going to work. +1 about the too much faith though, I believe you are right at this point. I don't have a better suggestion. – ggb667 Mar 19 '14 at 19:22