I am trying to run JBoss in the Eclipse debugger so that I can
single-step through the JBoss code (in addition to client and EJB bean
code).
My Setup:
=========
Eclipse 2.1m4 on Redhat 8.0.
1. I created an Eclipse project called "org.jboss". In this project, I
have added no source files, but have added the following external JARs:
<jboss-install-dir>/bin/run.jar
<jboss-install-dir>/bin/jboss-boot.jar
<jboss-install-dir>/bin/jboss-common.jar
<jboss-install-dir>/bin/jboss-jmx.jar
<jboss-install-dir>/bin/jboss-system.jar
I then created a ZIP file containing all of the sources in JBoss and
attached it to each of the above JAR files.
2. I configured a Java Application Launcher in Eclipse with the
following params:
Project: org.jboss
Main class: org.jboss.Main
Working Directory: <jboss-install-dir>/bin
Classpath: <jboss-install-dir>/bin/run.jar
Note: I removed the other JBoss JARs from the classpath because
otherwise they interfere with the JBoss classloader architecture.
My Problem:
============
When I launch the application in the debugger with a breakpoint in
org.jboss.Main.main(), Eclipse displays the source file and I can debug
normally, single-stepping, etc. I can single-step up to the method:
org.jboss.Main.boot(), at the line, "server.init(props)".
When I step into server.init() in the debugger, the source file for
org.jboss.system.server.ServerImpl is not found by the debugger, even
though I can open that file in the Java perspective or the Plugin
Perspective and view/edit the source.
Hint:
=====
JBoss loads the org.jboss.system.server.ServerImpl class in a new
URLClassLoader, a different classloader than the boot classloader in
which the application is started. Could this be the problem?
Question:
=========
Why is the org.jboss.system.server.ServerImpl source file not found by
the Eclipse debugger?
Thanks for any help,
Rick