Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Working with Java Web Servers
This topic describes the configuration requirements and procedure for debugging Java web servers such as JBOSS and Apache Tomcat (both Server configuration and Windows Service configuration) in Enterprise Architect.
How to
To attach to the process hosting the Java Virtual Machine from Enterprise Architect
Step |
Action |
See also |
---|---|---|
1 |
Ensure binaries for the web server code to be debugged have been built with debug information.
|
|
2 |
Launch the server with the Virtual Machine startup option described in Server Configuration, below.
|
|
3 |
Import source code into the Enterprise Architect Model, or synchronize existing code.
|
|
4 |
Set breakpoints. |
|
5 |
Launch the client.
|
|
6 |
Attach to the process from Enterprise Architect.
|
|
Topics
Topic |
Detail |
See also |
||||
---|---|---|---|---|---|---|
The configuration necessary for the web servers to interact with Enterprise Architect must address the following two essential points:
The Enterprise Architect debugger uses the java.class.path property in the VM being debugged, to locate the source file corresponding to a breakpoint occurring in a Class during execution; for example, a Class to be debugged is called: a.b.C This is located in physical directory: C:\source\a\b So, for debugging to be successful, the CLASSPATH must contain the root path: c:\source
|
|
|||||
Using the Debug tab of the Build Script dialog, create a script for the code you have imported and:
All other fields are unimportant; the Directory field is normally used in the absence of any Class path property.
|
How to
To debug
Step |
Action |
See also |
---|---|---|
1 |
Ensure that the server is running, and that the server process has loaded the Sparx Systems Agent. DLL SSJavaProfiler75.DLL (Use Process Explorer or similar tools to prove this). |
|
2 |
In Enterprise Architect, open the source code and set some breakpoints. |
|
3 |
Click on the Run Debug button in Enterprise Architect. The Attach To Process dialog displays.
|
|
4 |
Select the server process hosting the application.
|
|
5 |
Click on the OK button. A confirmation message displays in the Debug window, stating that the process has been attached.
|
|
The breakpoints could show a question mark. In this case the Class might not have been loaded yet by the VM. If the question mark remains even after you are sure the Class containing the breakpoint has been loaded, then either:
• | The binaries being executed by the server are not based on the source code |
• | The debugger cannot reconcile the breakpoint to a source file (check class paths), or |
• | The JVM has not loaded the Sparx Systems agent |
Learn more