Magnus,
 
Here is a basic how to:
 
There are two ways to setup JBuider4 Enterprise for debugging any class that runs under Orion: The standard java debugger, or JPDA.
 
Using either method the first thing to do is to create a project that includes all of the code you wish to debug.
 
This means that if you are using JSPs that you include in your project the path that you have Orion putting your source and class files it generates for JSPs.
 
Create a library for your project that includes at least the following jar files from your orion install directory:
ejb.jar
orion.jar
jdbc.jar
jaxp.jar
jndi.jar
jta.jar
 
You may wish to add other jars to the list depending on what you are doing. If you are using the JavaMail API for example you will want to include the activation.jar, and mail.jar.
 
Include any other libraries your project requires.
---------------------------------------------------------------------------------------------------------
Non JPDA method(Any Java2 platform on which JB4 will run):
 
select run from the menu
 
select configurations
 
select default
 
select the main class ellipses button to select the main class.
type:
com.evermind.server.ApplicationServer
 
now under vm parameters type:
-classic
 
If you do include the classic parameter debugging will either not work at all, or very slowly, so don't forget that step.
 
when you want to debug with Orion you simple start Orion by clicking on the debug icon at the top of the screen or using shift-F9.
 
Now you have an instance of Orion running in JBuilder and you can use JBuilder's built in browser, (or any browser) to access your work by pointing it to http://localhost
 
You may place break points in anything that is in your source/classpath that means that you can debug EJBs, JSPs, or Servlets with ease.
 
You will need to restart your local Orion server when you make changes to your code.
 
-------------------------------------------------------------------------------------
JPDA method (assumes JDK1.3)
 
 
Create a batch file(NT/2K) or a shell script (Linux/UNIX/BSD/Solaris). I put this file in the orion install directory and call it debug.bat
It should look something like this:
%JAVA_HOME%\bin\java -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -jar orion.jar
 
Now in JBuilder open your project.
 
Select project from the menu.
 
Select the debug tab.
 
Enable remote debugging by selecting the check box associated marker "Enable remote debugging".
 
Click the attach radio button.
Select dt_socket as the transport type.
Enter localhost as the host name if you are running Orion locally, otherwise use the name of the host Orion will be running on.
Enter 8000 as the address.
 
Now start Orion with your batch/shell script.
 
Put a break point were you need one and then click the debug icon, or hit shift-F9.
 
note:
 
When using JPDA I have found that when I change something I have to stop and start the Orion server, and then restart the debugging session by removing it's tab at the bottom of the IDE. This can be annoying.
 
If you need more details let me know.
 
I would appreciate whatever credit is appropriate.
 
Also since I wrote this very quickly let me know if there are any holes, and feel free to edit.
 
Russ
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus Rydin
Sent: Monday, November 13, 2000 1:59 AM
To: Orion-Interest
Subject: RE: JBuilder4.0

Russ,
can you send in a setup description for your JBuilder 4 environment so that we can add it to orionsupport?
WR
-----Original Message-----
From: Russ White [mailto:[EMAIL PROTECTED]]  
Sent: den 9 november 2000 13:31
To: Orion-Interest
Subject: RE: JBuilder4.0

It must be a configuration problem as I do this regularly with no problems.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] m]On Behalf Of Savotchkin Egor
Sent: Thursday, November 09, 2000 4:54 AM
To: Orion-Interest
Subject: JBuilder4.0

 
Hi all,
    I try to use JB4.0 with to debug apps in Orion, so when I run orion with jdk1.3 (in dubug mode) it just hangs and finally "java commits a system error ... ". With 1.2.2 it works fine! Is it a jdk 1.3 bug or some other issue?
 
P.S. When I run it (not in debug) everything works ok.

Egor Savotchkin.

Reply via email to