You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Eric Everman <ev...@precedadesign.com> on 2005/11/16 16:42:54 UTC
Incorrect Java Source Line Numbers in Xalan Classes (Xalan 2.7.1)
Hi-
The Xalan 2.7.1 classes seem to report wildly incorrect java source
line numbers when running in debug mode via an IDE. (Note: I'm not
talking about XSLT line numbers).
I've tried tracing the xalan.jar using the source provided from the
source distribution, and I've also trying building the xalan.jar from
the build.sh script and just using ant directly. All class files
report incorrect tracing line numbers - Here is an example:
----------------------------------------------------------------
In my IDE, I see execution stopped at this breakpoint:
Class breakpoint occurred at line 143 of DefaultConnectionPool.java,
in method: void
org.apache.xalan.lib.sql.DefaultConnectionPool.setDriver
(java.lang.String)
Looking at the source code, line 143 is near the end of a method
named freeUnused(), approximately 40 lines down from the setDriver()
method.
----------------------------------------------------------------
What am I doing wrong?? I'm not an ant expert - is ant modifying the
source code before compile?
Platform:
Oracle's JDeveloper on Mac OS X 10.4.3, which is running on JDK 1.5.
All compiling and class compatibility is JDK 1.4.2, including ant and
build.sh builds.
Any help is appreciated - I'm pulling my hair out on this one.
Eric Everman
Re: Incorrect Java Source Line Numbers in Xalan Classes (Xalan 2.7.1)
Posted by Stanimir Stamenkov <st...@myrealbox.com>.
/Stanimir Stamenkov/:
> /Eric Everman/:
>
>> Platform:
>> Oracle's JDeveloper on Mac OS X 10.4.3, which is running on JDK 1.5.
>> All compiling and class compatibility is JDK 1.4.2, including ant and
>> build.sh builds.
>
> I guess Xalan 2.7.0 classes (as far as I see there's no 2.7.1 released
> yet) clash with the older Xalan classes included with the Sun JDK 1.4.2
> - you should put the Xalan 2.7.0 libraries into the endorsed directories:
Ops, just noticed you're actually running JDK 1.5 (got misled by the
"JDK 1.4.2" part). I don't see 'org.apache.xalan' classes in the JRE
of the Sun's Java 5, but I don't know if it the same for the JDK on
Mac OS X you're running.
--
Stanimir
Re: Incorrect Java Source Line Numbers in Xalan Classes (Xalan 2.7.1)
Posted by Brian Minchau <mi...@ca.ibm.com>.
As suggested by Stanimir,
this is probably an endorsed or boot classpath sort of issue.
In Eclipse one can put a project or a jar on the "boot" classpath, which
has the same effect as the endorsed directory. Of course I don't know that
Eric is using Eclipse as his IDE.
- Brian
Re: Incorrect Java Source Line Numbers in Xalan Classes (Xalan 2.7.1)
Posted by Stanimir Stamenkov <st...@myrealbox.com>.
/Eric Everman/:
> I've tried tracing the xalan.jar using the source provided from the
> source distribution, and I've also trying building the xalan.jar from
> the build.sh script and just using ant directly. All class files report
> incorrect tracing line numbers - Here is an example:
> [...]
> What am I doing wrong?? I'm not an ant expert - is ant modifying the
> source code before compile?
>
> Platform:
> Oracle's JDeveloper on Mac OS X 10.4.3, which is running on JDK 1.5.
> All compiling and class compatibility is JDK 1.4.2, including ant and
> build.sh builds.
I guess Xalan 2.7.0 classes (as far as I see there's no 2.7.1
released yet) clash with the older Xalan classes included with the
Sun JDK 1.4.2 - you should put the Xalan 2.7.0 libraries into the
endorsed directories:
http://java.sun.com/j2se/1.4.2/docs/guide/standards/
--
Stanimir
Re: Incorrect Java Source Line Numbers in Xalan Classes (Xalan 2.7.1)
Posted by Eric Everman <ev...@precedadesign.com>.
Thanks to all - Brian your tip was the trick: Indeed, the xalan.jar
I thought was being used was different then the one *actually* being
used. Of course the configuration of Oracle's OC4J server (with its
own classloader) is opaque enough that I'll be unravelling this for
awhile yet.
Sorry about the 2.7.1 deal - That would be the Xerces version, not
the Xalan version.
Thanks again,
Eric Everman
On Nov 16, 2005, at 10:55 AM, Brian Minchau wrote:
> Hi Eric,
> I'm sure that you're talking about Xalan 2.7.0, there is no 2.7.1 yet.
>
> Sounds like you are not running the class files that you think you
> are,
> probably a class loading issue.
>
> Put a:
> throw new RuntimException("Eric E");
> in your code. In a place that you are sure is getting executed.
> Then build
> with ant.
>
> I'm willing to bet that when you run your transformation in the
> IDE, the
> exception is never thrown, i.e. you built a xalan.jar, but that is
> not the
> xalan.jar being used in your IDE.
>
> If you IDE is Eclipse, I can probably give assistance.
>
> - Brian
> - - - - - - - - - - - - - - - - - - - -
> Brian Minchau
> minchau@apache.org
>
>
>
>
> Eric Everman
> <everman@precedad
>
> esign.com> To
> xalan-j-users@xml.apache.org
> 11/16/2005
> 10:42 cc
> AM
>
> Subject
> Incorrect Java Source Line
> Numbers
> in Xalan Classes (Xalan 2.7.1)
>
>
>
>
>
>
>
>
>
>
> Hi-
>
> The Xalan 2.7.1 classes seem to report wildly incorrect java source
> line numbers when running in debug mode via an IDE. (Note: I'm not
> talking about XSLT line numbers).
>
> I've tried tracing the xalan.jar using the source provided from the
> source distribution, and I've also trying building the xalan.jar from
> the build.sh script and just using ant directly. All class files
> report incorrect tracing line numbers - Here is an example:
>
> ----------------------------------------------------------------
> In my IDE, I see execution stopped at this breakpoint:
> Class breakpoint occurred at line 143 of DefaultConnectionPool.java,
> in method: void
> org.apache.xalan.lib.sql.DefaultConnectionPool.setDriver
> (java.lang.String)
>
> Looking at the source code, line 143 is near the end of a method
> named freeUnused(), approximately 40 lines down from the setDriver()
> method.
> ----------------------------------------------------------------
>
> What am I doing wrong?? I'm not an ant expert - is ant modifying the
> source code before compile?
>
> Platform:
> Oracle's JDeveloper on Mac OS X 10.4.3, which is running on JDK 1.5.
> All compiling and class compatibility is JDK 1.4.2, including ant and
> build.sh builds.
>
>
> Any help is appreciated - I'm pulling my hair out on this one.
>
> Eric Everman
>
>
>
>
> **************************************************************
> This message, including any attachments, contains confidential
> information intended for a specific individual and purpose, and is
> protected by law. If you are not the intended recipient, please
> contact sender immediately by reply e-mail and destroy all copies.
> You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based on
> it, is strictly prohibited.
> TIAA-CREF
> **************************************************************
Re: Incorrect Java Source Line Numbers in Xalan Classes (Xalan 2.7.1)
Posted by Brian Minchau <mi...@ca.ibm.com>.
Hi Eric,
I'm sure that you're talking about Xalan 2.7.0, there is no 2.7.1 yet.
Sounds like you are not running the class files that you think you are,
probably a class loading issue.
Put a:
throw new RuntimException("Eric E");
in your code. In a place that you are sure is getting executed. Then build
with ant.
I'm willing to bet that when you run your transformation in the IDE, the
exception is never thrown, i.e. you built a xalan.jar, but that is not the
xalan.jar being used in your IDE.
If you IDE is Eclipse, I can probably give assistance.
- Brian
- - - - - - - - - - - - - - - - - - - -
Brian Minchau
minchau@apache.org
Eric Everman
<everman@precedad
esign.com> To
xalan-j-users@xml.apache.org
11/16/2005 10:42 cc
AM
Subject
Incorrect Java Source Line Numbers
in Xalan Classes (Xalan 2.7.1)
Hi-
The Xalan 2.7.1 classes seem to report wildly incorrect java source
line numbers when running in debug mode via an IDE. (Note: I'm not
talking about XSLT line numbers).
I've tried tracing the xalan.jar using the source provided from the
source distribution, and I've also trying building the xalan.jar from
the build.sh script and just using ant directly. All class files
report incorrect tracing line numbers - Here is an example:
----------------------------------------------------------------
In my IDE, I see execution stopped at this breakpoint:
Class breakpoint occurred at line 143 of DefaultConnectionPool.java,
in method: void
org.apache.xalan.lib.sql.DefaultConnectionPool.setDriver
(java.lang.String)
Looking at the source code, line 143 is near the end of a method
named freeUnused(), approximately 40 lines down from the setDriver()
method.
----------------------------------------------------------------
What am I doing wrong?? I'm not an ant expert - is ant modifying the
source code before compile?
Platform:
Oracle's JDeveloper on Mac OS X 10.4.3, which is running on JDK 1.5.
All compiling and class compatibility is JDK 1.4.2, including ant and
build.sh builds.
Any help is appreciated - I'm pulling my hair out on this one.
Eric Everman