facebook

Debug problem – J2EE/JBoss, local vars cannot be resolved

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #229052 Reply

    behicks1
    Member

    I was able to successfully import into MyEclipse an existing command-line J2EE app (multiple dependent/linked build dirs), build with the existing ant build files by splitting into multiple projects (EAP with an EJB and WEB project, and a bunch of Java projects) and then forcing external ant builds on each project by selecting ‘properties’, then ‘builders’ and adding a new ‘ant build’.

    I manually deploy for now with success to JBoss 3.2.6, and I can start Jboss and successfully set a breakpoint in a Session Bean. Great!

    My problem is that once I get to the breakpoint, I can see the values of the method’s input variables (arg0, arg1, arg2, etc…), but cannot view any local variables. For example, just before the breakpoint I define a simple String as follows: String ret = “OK”; A few lines down at my breakpoint I try to “inspect”, “display” or “watch” the defined String “ret” and I get a popup window saying: “ret” cannot be resolved.

    Any ideas on this much appreciated,
    Brian

    #229081 Reply

    Riyad Kalla
    Member

    Brian,
    What versions of Eclispe and MyEclipse are you using, and you have to make sure that your app server supports the JSR 45 spec for full debugging support, IIRC JBoss 4 supports this, but not 3 unless you are using Tomcat 5… but I don’t remember exactly what the requirements were for JB3.

    #229170 Reply

    behicks1
    Member

    I’m running Eclipse 3.1M6, and MyEclipse 3.84M6 Beta. JBoss 3.2.6 does run with Tomcat 5. Using ant 1.6.2.

    Got it working by adding “vars” to my debug line in my ant build.xml files:

    original line: debug=”true” debuglevel=”lines,source”
    new line: debug=”true” debuglevel=”lines,vars,source”

    That did it.

    Thanks,
    Brian

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Debug problem – J2EE/JBoss, local vars cannot be resolved

You must be logged in to post in the forum log in