Erik,

I just noticed your attached message to the JDE mailing list. I've been
so deeply involved in a number of problems that I didn't notice that you
posted information very relevant to one of my problems! It helps to
raise your head and look around every now and then! :-)

I am trying to get remote debugging working against Weblogic. The
instructions that you posted pertain to using shared memory. However, we
are trying to get remote debugging to work across the network, and, for
this, I believe that we need to use a socket instead of a shared memory.
(Correct?) We can get this to work when we start weblogic in debug
client mode, but when we try to start it in debug server mode we get:

Error [4] in accept() call!
err:: Interrupted system call
Socket transport failed to init.
dt_socket transport error; accept failed, rc = -1

Our invocation looks like:

exec /usr/java1.2/bin/java -Xdebug -Xnoagent -Djava.compiler=None
-Xrunjdwp:transport=dt_socket,address=7000,server=y,suspend=y -Xmx64m
-Xms64m -classpath
/sets/tools/lib/jpda/jpda.jar:/sets/tools/CM-PIT-1/CmAppServer-1-S11/web
logic451sp11boot.jar:/sets/tools/weblogic/classes/boot:.:/sets/tools/TPB
rokerJava3.3.1/lib/vbjorb.jar:/sets/tools/TPBrokerJava3.3.1/lib/vbjapp.j
ar:/sets/tools/CM-PIT-1/CmAppServer-1-S11/classes12.zip:/sets/tools/tpbr
oker/lib/vbjapp.jar:/sets/tools/tpbroker/lib/vbjorb.jar:/sets/tools/CM-P
IT-1/CmAppServer-1-S11/cmarch.jar:/sets/tools/CM-PIT-1/CmAppServer-1-S11
:/sets/tools/CM-PIT-1/CmAppServer-1-S11/cmprops.jar
-Dweblogic.class.path=/sets/tools/CM-PIT-1/CmAppServer-1-S11/weblogic451
sp11.jar:/sets/tools/weblogic/license:/sets/tools/weblogic/classes:/sets
/tools/weblogic/lib/weblogicaux.jar:/sets/tools/CM-PIT-1/CmAppServer-1-S
11:/sets/tools/CM-PIT-1/CmAppServer-1-S11/cmserver.jar:/sets/tools/CM-PI
T-1/CmAppServer-1-S11/CosNotification.jar:/sets/tools/CM-PIT-1/CmAppServ
er-1-S11/bsh-1.0.jar:/sets/tools/CM-PIT-1/CmAppServer-1-S11/junit.jar
-Dweblogic.home=/sets/tools/weblogic
-Dweblogic.system.home=/sets/tools/CM-PIT-1/CmAppServer-1-S11
-Dweblogic.system.name=cmappserver1
-Dweblogic.httpd.documentRoot=public_html/ -Djava.security.manager
-Djava.security.policy==/sets/tools/CM-PIT-1/CmAppServer-1-S11/weblogic.
policy -Dorg.omg.CORBA.ORBClass=com.visigenic.vbroker.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=com.visigenic.vbroker.orb.ORB
com.sprint.arch.server.Server cmappserver

So, my question is have you tried and been successful with remote
debugging when putting Weblogic debug server mode?

Thank you for your help.

Chuck Irvine
Sprint 


-----Original Message-----
From: EHusby [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 22, 2000 9:40 AM
To: jde
Cc: EHusby
Subject: Debugging Servlets and EJB's with Emacs, JDEbug, and WebLogic
server



People have asked if it is possible to debug servlets or EJB's using
Emacs, JDE, and the WebLogic server.  This is the method that I use on
my Windows NT 4 workstation to debug servlets. I am sure that similar
techniques can apply to EJB's and to Unix workstations.

One needs a batch file to start the WebLogic server in remote debug
mode. And one needs to set the JDE properties to use the proper class
path and other options.

In the following instructions, I am debugging using the JDK1.2.2 that I
have installed on the C: drive. Weblogic 4.5.1 is also installed on the
C:
drive. The servlet class files will be in the C:/weblogic/servlets
directory. The source for my servlet is in
D:/ehusby/java/servletTest/ServletTest.java.


Starting WebLogic in remote debug mode

  This batch file will start WebLogic in remote debug mode. When the
java VM starts a remote debugging session it will display an dt_shmem
address. You need the name of the address to attach the JDBebug to the
java VM.

----------------------- cut here -------------------------------------
rem
rem File: startServerDebug.bat
rem Author: M. Erik Husby on 5-Aug-1999
rem Start the WebLogic server in debug mode.
rem
setlocal
cd /d c:\weblogic
set jdk=c:/jdk1.2.2
set jdpa=c:\jpda
set oracle=d:\orant
set weblogic=c:/weblogic
set weblogiccp
=%weblogic%/classes;%weblogic%/lib/weblogicaux.jar;%weblogic%/license
set cp=%weblogiccp%
set JAVACLASSPATH=%weblogic%\classes\boot;%xml%
set WEBLOGICCLASSPATH=%weblogic%\license;%weblogic%\classes;%weblogic%
\lib\weblogicaux.jar
set a=%jdk%\bin\java -ms64m -mx64m -classpath %JAVACLASSPATH%
set b=-Dweblogic.class.path=%WEBLOGICCLASSPATH%
set c=-Djava.compiler=NONE
set d=-Dweblogic.system.home=%weblogic%
set e=-Djava.security.policy==weblogic.policy
set f=-Xbootclasspath:%jdk%\jre\lib\rt.jar;%jdk%\lib\tools.jar
set g=-Xdebug
set h=-Xnoagent
set i=-Xrunjdwp:transport=dt_shmem,server=y,suspend=n
set k=weblogic.Server
rem
set path=%jdk%\bin;%jdpa%\bin;%weblogic%\bin;%oracle%\bin
%a% %b% %c% %d% %e% %f% %g% %h% %i% %k%
rem
endlocal
----------------------- cut here -------------------------------------

Note: The java command in the batch file should be all on one line. The
options are listed one by one to make it easier to read.

Most of the options are the standard ones used to start the WebLogic
server.

The -Djava.compiler=NONE option turns off the JIT compiler processing
which is necssary for debugging.

The -Xbootclasspath option includes the special remote debugging
libaries.

The -Xdebug option turns on the remote debugging feature.

The -Xnoagent turns off the tcp/ip based debugging.

The -Xrunjdwp option specifies that the Java VM will use shared memory
to talk to the debugger.

Set JDE properties for compilation

  JDE Options Compile

  Set the directory which will receive the class files.
  Jde Compile Option Directory: [Hide] c:\weblogic\servlets

  Set the debug compilation options to include all debugging information
  Jde Compile Option Debug: [Hide]
  Debug info to include in class:
  (*) all
  ( ) none
  ( ) selected
    info:
    [X] Line Numbers
    [X] Variables
    [X] Source

  Turn off compiler optimization.
  Jde Compile Option Optimize: [Hide] [Toggle]  off (nil)

  JDE Options Project

  Set the debug source directories to point to the source of your
servlet.
  Jde Db Source Directories: [Hide]
  [INS] [DEL] Path: d:/ehusby/java/servletTest/

Debugging the servlet

  Use the batch procedure to start the WebLogic server in debug
mode. The server should state that it is listening for a debug
connection

     Listening for transport dt_shmem at address: javadebug

  Start the debugger via
     JDEbug -- Processes -- Start Debugger

  Attach the debugger to the server process
     JDEbug -- Processes -- Attach Process -- Via Shared Memory

  At the prompt enter "javadebug" (or whatever is the name of the
dt_shmem
address).

  In the debugger window you should see something like:

     Attached to process javadebug.
     Attached VM (shmem) Java Debug Interface (Reference Implementation)
version 1.3
     Java Debug Wire Protocol (Reference Implementation) version 1.0
     JVM Debug Interface version 1.0
     JVM version 1.2.2 (Classic VM, build JDK-1.2.2-W, native threads,
nojit)

  Set a breakpoint in your servlet or EJB.

Do whatever is necessary to invoke your servlet or EJB. When the
breakpoint is hit, the Emacs window should pop to the front. From
there you can use the JDEbug like any other debugging session.


People have asked if it is possible to debug servlets or EJB's using
Emacs, JDE, and the WebLogic server.  This is the method that I use on
my Windows NT 4 workstation to debug servlets. I am sure that similar
techniques can apply to EJB's and to Unix workstations.

One needs a batch file to start the WebLogic server in remote debug
mode. And one needs to set the JDE properties to use the proper class
path and other options.

In the following instructions, I am debugging using the JDK1.2.2 that I
have installed on the C: drive. Weblogic 4.5.1 is also installed on the
C:
drive. The servlet class files will be in the C:/weblogic/servlets
directory. The source for my servlet is in
D:/ehusby/java/servletTest/ServletTest.java.


Starting WebLogic in remote debug mode

  This batch file will start WebLogic in remote debug mode. When the
java VM starts a remote debugging session it will display an dt_shmem
address. You need the name of the address to attach the JDBebug to the
java VM.

----------------------- cut here -------------------------------------
rem
rem File: startServerDebug.bat
rem Author: M. Erik Husby on 5-Aug-1999
rem Start the WebLogic server in debug mode.
rem
setlocal
cd /d c:\weblogic
set jdk=c:/jdk1.2.2
set jdpa=c:\jpda
set oracle=d:\orant
set weblogic=c:/weblogic
set weblogiccp
=%weblogic%/classes;%weblogic%/lib/weblogicaux.jar;%weblogic%/license
set cp=%weblogiccp%
set JAVACLASSPATH=%weblogic%\classes\boot;%xml%
set WEBLOGICCLASSPATH=%weblogic%\license;%weblogic%\classes;%weblogic%
\lib\weblogicaux.jar
set a=%jdk%\bin\java -ms64m -mx64m -classpath %JAVACLASSPATH%
set b=-Dweblogic.class.path=%WEBLOGICCLASSPATH%
set c=-Djava.compiler=NONE
set d=-Dweblogic.system.home=%weblogic%
set e=-Djava.security.policy==weblogic.policy
set f=-Xbootclasspath:%jdk%\jre\lib\rt.jar;%jdk%\lib\tools.jar
set g=-Xdebug
set h=-Xnoagent
set i=-Xrunjdwp:transport=dt_shmem,server=y,suspend=n
set k=weblogic.Server
rem
set path=%jdk%\bin;%jdpa%\bin;%weblogic%\bin;%oracle%\bin
%a% %b% %c% %d% %e% %f% %g% %h% %i% %k%
rem
endlocal
----------------------- cut here -------------------------------------

Note: The java command in the batch file should be all on one line. The
options are listed one by one to make it easier to read.

Most of the options are the standard ones used to start the WebLogic
server.

The -Djava.compiler=NONE option turns off the JIT compiler processing
which is necssary for debugging.

The -Dweblogic.system.home option specifies the home directory of the
WebLogic server.

The -Xbootclasspath option includes the special remote debugging
libaries.

The -Xdebug option turns on the remote debugging feature.

The -Xnoagent turns off the tcp/ip based debugging.

The -Xrunjdwp option specifies that the Java VM will use shared memory
to talk to the debugger.

Set JDE properties for compilation

  JDE Options Compile

  Set the directory which will receive the class files.
  Jde Compile Option Directory: [Hide] c:\weblogic\servlets

  Set the debug compilation options to include all debugging information
  Jde Compile Option Debug: [Hide]
  Debug info to include in class:
  (*) all
  ( ) none
  ( ) selected
    info:
    [X] Line Numbers
    [X] Variables
    [X] Source

  Turn off compiler optimization.
  Jde Compile Option Optimize: [Hide] [Toggle]  off (nil)

  JDE Options Project

  Set the debug source directories to point to the source of your
servlet.
  Jde Db Source Directories: [Hide]
  [INS] [DEL] Path: d:/ehusby/java/servletTest/

Debugging the servlet

  Use the batch procedure to start the WebLogic server in debug
mode. The server should state that it is listening for a debug
connection

     Listening for transport dt_shmem at address: javadebug

  Start the debugger via
     JDEbug -- Processes -- Start Debugger

  Attach the debugger to the server process
     JDEbug -- Processes -- Attach Process -- Via Shared Memory

  At the prompt enter "javadebug" (or whatever is the name of the
dt_shmem
address).

  In the debugger window you should see something like:

     Attached to process javadebug.
     Attached VM (shmem) Java Debug Interface (Reference Implementation)
version 1.3
     Java Debug Wire Protocol (Reference Implementation) version 1.0
     JVM Debug Interface version 1.0
     JVM version 1.2.2 (Classic VM, build JDK-1.2.2-W, native threads,
nojit)

  Set a breakpoint in your servlet or EJB.

Do whatever is necessary to invoke your servlet or EJB. When the
breakpoint is hit, the Emacs window should pop to the front. From
there you can use the JDEbug like any other debugging session.

Erik Husby
Domain Pharma Corp
Suite 110      Vox: 781-778-3834
10 Maguire Rd       Fax: 781-778-3800
Lexington, MA 02421 Email: [EMAIL PROTECTED]




Reply via email to