Breakpoint shows class from wrong library [message #251290] |
Thu, 07 February 2008 12:01  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.54259 seconds