• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error on remote debugging WebLogic 10 with Eclipse

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I am new to remote debug feature and have to make use if it at my new job.

I am trying to remote debug WebLogic10 with Eclipse (J2EE version). I have set debug options in startWebLogic.cmd (as I am using weblogic managed server- wlm.cmd to run my server) but getting error on console.

Error :
JDWP option syntax error:-agentlib:jdwp=transport= ["debugInit.c",L1182]

What is going wrong here ?

I am pasting here changes I amde to my .cmd file.

set DEBUG_OPTIONS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n

and my startup server script looks like :

echo starting weblogic with Java version:

"%JAVA_HOME%\bin\java" %DEBUG_OPTIONS% %JAVA_VM% -version

Can someone explain me what is happening here ?

TIA,
Vivian
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I would start trying to change the $DEBUG_OPTIONS to place it after $JAVA_VERSION

like:



also if you still have the problem, pls post a more complete message from error you get.
 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marcos,

I tried changing the position of debug option but still when I run remote debugger it gives me error - "Failed to connect to remote VM. Connection refused.
Connection refused: connect " .

On the console its not showing any error this time.

Here is script running for WLS:

starting weblogic with Java version:
java version "1.5.0_14"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)

Starting WLS with line:

C:\Java\JDK15~1.0_1\bin\java -client -Xms256m -Xmx512m -XX ermSize=96m -XX:Ma
xPermSize=512m -Dweblogic.security.SSL.trustedCAKeyStore="C:\weblogic10\wlserver
_10.0\server\lib\cacerts" -Don24.properties=W:\config\on24.properties -Djava.uti
l.logging.config.file=W:\config\logging.properties -Xverify:none -da -Dplatform
.home=C:\WEBLOG~1\WLSERV~1.0 -Dwls.home=C:\WEBLOG~1\WLSERV~1.0\server -Dweblogic
.home=C:\WEBLOG~1\WLSERV~1.0\server -Dwli.home=C:\WEBLOG~1\WLSERV~1.0\integratio
n -Dweblogic.management.discover=false -Dweblogic.management.server=http://loca
lhost:7001 -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToCo
nsole= -Dweblogic.ext.dirs=C:\WEBLOG~1\patch_wlw1001\profiles\default\sysext_man
ifest_classpath;C:\WEBLOG~1\patch_wls1001\profiles\default\sysext_manifest_class
path -Dweblogic.Name=devManaged -Djava.security.policy=C:\WEBLOG~1\WLSERV~1.0\se
rver\lib\weblogic.policy weblogic.Server
<May 27, 2008 9:45:53 AM PDT> <Notice> <WebLogicServer> <BEA-000395> <Following
extensions directory contents added to the end of the classpath:
C:\weblogic10\wlserver_10.0\platform\lib\p13n\p13n-schemas.jar;C:\weblogic10\wls
erver_10.0\platform\lib\p13n\p13n_common.jar;C:\weblogic10\wlserver_10.0\platfor
m\lib\p13n\p13n_system.jar;C:\weblogic10\wlserver_10.0\platform\lib\wlp\netuix_c
ommon.jar;C:\weblogic10\wlserver_10.0\platform\lib\wlp\netuix_schemas.jar;C:\web
logic10\wlserver_10.0\platform\lib\wlp\netuix_system.jar;C:\weblogic10\wlserver_
10.0\platform\lib\wlp\wsrp-client.jar;C:\weblogic10\wlserver_10.0\platform\lib\w
lp\wsrp-common.jar>


And my startWebLogic.cmd file has following things in it.

set DEBUG_OPTIONS= -Xdebug -Xnoagent -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n

Script :

@REM START WEBLOGIC

echo starting weblogic with Java version:

"%JAVA_HOME%\bin\java" %JAVA_VM% -version %DEBUG_OPTIONS%



-Vivian
 
Marcos Maia
Ranch Hand
Posts: 977
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

try declaring your debug parameters using the JAVA_OPTIONS variable,
in startWeblogic.cmd script in line where you have:

change it to add your debug options(space after suspend=n ok?)


then take out your %DEBUG_OPTIONS% from this line



this should work. Also make sure you're running weblogic development mode

You should see a line like this on the console where you run startWeblogic script:



Then you just have to configure a remote Java Application on eclipse and connect to this port.
 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Marcos,

Thanks !! My webserver started listening to that port !

I have a message on console saying "Listening to 1044...." and aslo with netstat -a I can see that.

I also created remote debug configuratioon with following details

Project name : javasource
Connection Tyoe : Standard (Socket Attach)
Host : localhost
Port :1044

Still its giving me same error when clicking debug button on this configuration window.

Error : Failed to connect to remote VM. Connection refused.
Connection refused: connect


-Vivian
 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marcos,

I solved that issue.

I was making mistake of giving space before and after '=' sign. After removing that it started working smoothly !

Thanks for all your help. I really appreciate that.

- Vivian
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting the same error and I am not able to debug.

I gave the debug parameters as optional VM arguments

-Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX ermSize=48m -XX:MaxPermSize=128m -Xverify:none -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Ddsco.datasource=exodys_oracle -Dweblogic.log.Log4jLoggingEnabled=true -da

Need some help here.

Thanks
Lavanya
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marcos I followed the steps you specified and I was debugging on weblogic through eclipse fine. However when I tried today I am getting the message
Failed to connect to remote VM: Connection refused
Connection refused:connect
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by lavanya Ananth:
Hi,

I am getting the same error and I am not able to debug.

I gave the debug parameters as optional VM arguments

-Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX ermSize=48m -XX:MaxPermSize=128m -Xverify:none -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Ddsco.datasource=exodys_oracle -Dweblogic.log.Log4jLoggingEnabled=true -da

Need some help here.

Thanks
Lavanya



Hi,

after try running the server can you see the message on console:
Listening for transport dt_socket at address: 8787

Could you also put some more information on the error you're getting.

regards.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vik ard:
Marcos I followed the steps you specified and I was debugging on weblogic through eclipse fine. However when I tried today I am getting the message
Failed to connect to remote VM: Connection refused
Connection refused:connect



Check if debug port is available. Also try restarting the server. If you still get the error pls post a more complete error message.

regards.
 
Vivian Josh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by lavanya Ananth:


I gave the debug parameters as optional VM arguments

-Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX ermSize=48m -XX:MaxPermSize=128m -Xverify:none -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Ddsco.datasource=exodys_oracle -Dweblogic.log.Log4jLoggingEnabled=true -da



Where are you giving these parameters? In weblogic script or eclipse ? Can you provide some more details?

Also, as Marcos said , try using netstat and see if it listening on specified port address.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was getting the same till I realised that I did not have the debug mode open and it was connected the first time and all other times it shows as connection refused.

So try opening the debug perspective to check it it has already connected.

Also change the port to some other: Say 7004. (Not really necessary)

I also used netstat -a and one way I could tell the it was connected is that it showed it as ESTABLISHED
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Experts,

I am facing the same problem.
I have added the following line in statWeblogic.sh file:


Also after starting weblogic server in the black window i can see following log message:


After this i tried creating a new Debug Config by using Eclipse. I did following to create Debug Config:
1. Provided ip address of weblogic server under Connection Properties-->Host
2. Provided 1044 under Connection Properties-->Port
3. Click on "Apply" button and "Close"
4. Open Debug perspective and "Debug" the newly created configuration.

I am getting following Error:
"Failed to connect Remote VM. Connection timed out."
I have already taken care of following:
1. Make sure that code in eclipse and jar deployed on weblogic server are in synch.

Following are the details of my environment:
1. Windows 2000 Professional
2. Eclipse Galileo
3. Java 1.6
4. Weblogic 9.3

Please help me, I dont now where actaully the problem is.
Thanks....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic