MyEclipse: Debugging with Weblogic 8.1

rviras - Jun 02, 2004 - 08:23 PM
Post subject: Debugging with Weblogic 8.1
I am unable to debug my web application from eclipse using weblogic 8.1

I saw Scott's posting @ http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=84&highlight=weblogic+debug
and still unable to debug the JSP. The system hangs after i set a breakpoint. Also, i am using Java 1.41_03 for building my application and using the same JDK to start my application server.

Any help will be appreciated.
support-rkalla - Jun 02, 2004 - 08:39 PM
Post subject:
Can you post the answers to the questions we ask in the posting guidelines? (TIP: Hit Post Reply, then Insert and answer those questions).

Also, when you say "The system hangs..." do you mean your entire system hard locks, do you mean that the app server freezes, do you mean Eclipse locks up? Can you hit bring up the task manager to see if any process is pegging the CPU? Can you move the mouse? Who played 1st base for the Red Rocks in 1943?

Answering these questions help us narrow down where we might need to look for causes.
rviras - Jun 02, 2004 - 08:59 PM
Post subject:
Sorry for the ambiguity,

I have a JSP and a class that is called from the JSP.

When I have a breakpoint in the JSP, the ctrl doesn;t stop at the breakpoint. The system displays the html output of the the JSP.

When I have a breakpoint inside the java class, the breakpoint icon looks different from the one available in the JSP. The browser just hangs when I try accessing the same page.

My settings:
from window->preferences,
In the java option, I set the java compliance level to 1.4
The installed JRE home is pointing to C:\bea\jdk141_05.

In the myeclipse option, i chose weblogic 8 and used the same JDK. i chose debug mode in the launch option.

I tried restarting the server and when I chose rebuild all, the system resoinds stating that HotCode replace failed - VM may be inconsistent.
support-rkalla - Jun 02, 2004 - 09:52 PM
Post subject:
Quote:

When I have a breakpoint in the JSP, the ctrl doesn;t stop at the breakpoint. The system displays the html output of the the JSP.

Hmm, I would say its worth double checking your setup for weblogic to make sure its compiling the pages with debugging support. I know in your first post you mentioned you read that thread, but just for sanity sake you might want to check again, quick link: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-18.html#97

Quote:
When I have a breakpoint inside the java class, the breakpoint icon looks different from the one available in the JSP.

If the breakpoint is a dot with a checkmark inside of it, then that means the debugger was able to verify that the app server has that class loaded and it will be able to stop at the breakpoint. If there is no checkbox, then it means the app server does not have that class loaded or will not be able to stop at the breakpoint. Which of the two editors (Java, JSP) has which kind of breakpoint in it?

Quote:
The browser just hangs when I try accessing the same page.

Try hitting the play button in the Eclipse debugger to let execution continue, this should "unhang" the browser, otherwise it will sit indefinately waiting for the app to reply.

Quote:
In the myeclipse option, i chose weblogic 8 and used the same JDK. i chose debug mode in the launch option.

Sounds right to me...

Quote:
I tried restarting the server and when I chose rebuild all, the system resoinds stating that HotCode replace failed - VM may be inconsistent.

If you want to rebuild your app, then stop the server and then rebuild, then restart. This error is the app server telling the remote debugger that "So much has changed, I've lost track of it", or something to that effect. So when you compile or replace 1 or 2 files at a time, its not a problem. But when you go and rebuild (replace ALL) of the class files on the server while its running, it usually freaks out and sends back that warning. Note that its just a warning, your app MIGHT still work just fine. If you every notice that your changes aren't getting sent back to the server, then its probably out of sync and you can restart then. I've actually had this error before, and succesfully continued developing without restarting the server for hours afterwards, but as soon as you run into some whackiness, its best to restart the server.
rviras - Jun 03, 2004 - 07:21 PM
Post subject:
I started eclipse with JDK 1.4_05 and my java class debugging has started working. When my control passes to JSP, I am having seperate tab called service in the debug screen and this is the message I got. that thread is suspended.

Source not found for __index(JspBase).service(ServletRequest, ServletResponse) line: 34 [local variables unavailable]

my weblogic.xml located in the web-inf directory. Do I need to specify keepgenerated and source directory?

<!DOCTYPE weblogic-web-app PUBLIC "-//BEASystems, Inc.//DTD Web Application 7.0//EN"
"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<description>WebLogic Descriptor</description>
<jsp-descriptor>
<jsp-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</jsp-param>
</jsp-descriptor>
</weblogic-web-app
support-scott - Jun 03, 2004 - 09:06 PM
Post subject:
Quote:

Do I need to specify keepgenerated and source directory?

No, you don't. In fact your weblogic.xml file looks just like the one I use for testing.

Usually thest debugging issues are related to the JDK in user. Instead of using BEA's JDK, can you try using a Sun JDK of 1.4.1 instead? Here's a thread that has run the issues down before:
http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=582&highlight=weblogic+jsp+debugging
rviras - Jun 03, 2004 - 10:22 PM
Post subject:
i downloaded the 1.42 sdk from sun and replaced with the one from bea to start eclipse as well as weblogic. i am still getting the error message

Source not found for ServletStubImpl$ServletInvocationAction.run() line: 972 [local variables unavailable]
support-rkalla - Jun 03, 2004 - 11:10 PM
Post subject:
Quote:
Source not found for ServletStubImpl$ServletInvocationAction.run() line: 972 [local variables unavailable]

This is different than the error you reported the first time, is that correct, you are now getting a different error? Where are you setting your breakpoint? In a JSP page? Does the debugger stop at that line in the JSP?
rviras - Jun 04, 2004 - 02:40 PM
Post subject:
it stops in the JSP, but doesn't have the arrow mark indicating the line where the control is. I press f6 couple of times and control leaves the JSP.
support-scott - Jul 12, 2004 - 07:55 PM
Post subject:
Does the stack in the Debug View show an entry for the JSP? Can you double-click on the line for the JSP in the displayed stack and see if the JSP source is opened at that point?
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits