Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Breakpoint shows class from wrong library
Breakpoint shows class from wrong library [message #251290] Thu, 07 February 2008 12:01 Go to next message
Eclipse UserFriend
I'm pretty sure what I'm seeing is a bug, but it may be a result of a
workaround I had to implement to get around another bug. I'll file a bug
report as soon as I get a little more info about what might be happening
here.

I have two apps deployed to Tomcat 6. They are both JSF 1.2 apps. Both
of them have as their JSF implementation a "fake" JSF implementation, and
the actual JSF implementation is a plain user library. One of the apps is
using the Sun RI, and the other is using MyFaces.

While debugging the MyFaces one, I saw an exception occur in one of the
JSF implementation classes. I visited the file in question, making sure
to get the MyFaces one, and I set a breakpoint on the line and method
where the exception is thrown.

I then reran the test. When it hit the breakpoint on the method and line,
it showed the source file from the Sun RI, not the MyFaces implementation.
I tested this several times, with the same result.

I then undeployed the app using the Sun RI and reran the test, and this
time it went to the correct implementation.
Re: Breakpoint shows class from wrong library [message #251297 is a reply to message #251290] Thu, 07 February 2008 16:33 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

David Karr wrote:
> I'm pretty sure what I'm seeing is a bug, but it may be a result of a
> workaround I had to implement to get around another bug. I'll file a
> bug report as soon as I get a little more info about what might be
> happening here.
>
> I have two apps deployed to Tomcat 6. They are both JSF 1.2 apps. Both
> of them have as their JSF implementation a "fake" JSF implementation,
> and the actual JSF implementation is a plain user library. One of the
> apps is using the Sun RI, and the other is using MyFaces.
>
> While debugging the MyFaces one, I saw an exception occur in one of the
> JSF implementation classes. I visited the file in question, making sure
> to get the MyFaces one, and I set a breakpoint on the line and method
> where the exception is thrown.
>
> I then reran the test. When it hit the breakpoint on the method and
> line, it showed the source file from the Sun RI, not the MyFaces
> implementation. I tested this several times, with the same result.
>
> I then undeployed the app using the Sun RI and reran the test, and this
> time it went to the correct implementation.

Remember that the runtime (launch) classpath is maintained separate from
the build path of your projects. So when your breakpoint is hit, the Sun
RI class is the one that the running app has first on its classpath.
Because class loading semantics of JEE apps are complicated and differ
from vendor to vendor, its difficult to say exactly how to make sure the
MyFaces version you're looking for gets put ahead of the other one
correctly.
First thing I would check is that neither of them is deployed in the
Tomcat container lib directory - they should only be deployed under the
respective apps, right?

Hope this helps,
Eric
Previous Topic:Servlet changes cannot be read
Next Topic:escaping string literals
Goto Forum:
  


Current Time: Wed Apr 30 03:28:01 EDT 2025

Powered by FUDForum. Page generated in 0.54259 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top