Tomcat Xalan classpath problem

View: New views
9 Messages — Rating Filter:   Alert me  

Tomcat Xalan classpath problem

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that allow
the caller to pass in the class name of implementation classes.

It all works find standalone. It works fine in Jetty. It fails in Tomcat
6.0.20. The error is a missing method in a Xalan class; as if Tomcat has
somehow gotten an older version of Xalan into the classpath.

I don't see any likely suspects in the Tomcat tree, so I'm momentarily
mystified.

Re: Tomcat Xalan classpath problem

by awarnier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Benson Margulies wrote:

> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that allow
> the caller to pass in the class name of implementation classes.
>
> It all works find standalone. It works fine in Jetty. It fails in Tomcat
> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat has
> somehow gotten an older version of Xalan into the classpath.
>
> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
> mystified.
>
A piece of the logfile where the error messages occur may help someone
to help you.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Tomcat Xalan classpath problem

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here's the relevant log traffic of the missing method. I can get past this
problem by putting xalan into the endorsed directory, but I should not have
to do that when using the JAXP 1.4 API to create XPathFactory.


Caused by: java.lang.NoSuchMethodError:
org.apache.xpath.XPathContext.<init>(Z)V
    at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
    at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
    at
com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
    at
com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
    at
com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
    at
com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
    ... 48 more
org.apache.cxf.common.injection.ResourceInjector  - method annotated by
@PostConstruct throws exception when invoked
java.lang.reflect.InvocationTargetException


On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:

> Benson Margulies wrote:
>
>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that allow
>> the caller to pass in the class name of implementation classes.
>>
>> It all works find standalone. It works fine in Jetty. It fails in Tomcat
>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat has
>> somehow gotten an older version of Xalan into the classpath.
>>
>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
>> mystified.
>>
>>  A piece of the logfile where the error messages occur may help someone to
> help you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: Tomcat Xalan classpath problem

by Rainer Jung-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just to make sure w.r.t. it being working in Jetty: You use the same
Java version? Sun changed an important bit between Java 5 and Java 6,
where they are now caching something detected during runtime in a global
static thus partially breaking the dynamics of XML parser detection when
using mutiple classloaders. The usual indication is a class cast
exception, which is not the case in your situation, but nevertheless I
wanted to check, whether there's a relation to Java 6 vs. Java 5
(handling in Java 6 is broken).

Regards,

Rainer

On 03.11.2009 14:00, Benson Margulies wrote:

> Here's the relevant log traffic of the missing method. I can get past this
> problem by putting xalan into the endorsed directory, but I should not have
> to do that when using the JAXP 1.4 API to create XPathFactory.
>
>
> Caused by: java.lang.NoSuchMethodError:
> org.apache.xpath.XPathContext.<init>(Z)V
>     at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
>     at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
>     at
> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
>     at
> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
>     at
> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
>     at
> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
>     ... 48 more
> org.apache.cxf.common.injection.ResourceInjector  - method annotated by
> @PostConstruct throws exception when invoked
> java.lang.reflect.InvocationTargetException
>
>
> On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:
>
>> Benson Margulies wrote:
>>
>>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that allow
>>> the caller to pass in the class name of implementation classes.
>>>
>>> It all works find standalone. It works fine in Jetty. It fails in Tomcat
>>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat has
>>> somehow gotten an older version of Xalan into the classpath.
>>>
>>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
>>> mystified.
>>>
>>>  A piece of the logfile where the error messages occur may help someone to
>> help you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Tomcat Xalan classpath problem

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am sure that I'm using the MacOS JDK 1.6 at all points. Also, if you look
closely at the below, you will see that the problem is that one part of
Xalan is failing to call another part ... of Xalan. If I had JDK 1.5 I'd be
missing the newInstance APIs that take the class name, and if I had other
problems I'd have a mixture of sun. classes and org.apache. classes. But
this is 100% org.apache.

I shouldn't need to use endorsed at all with JDK 1.6, I claim, if I use the
new newInstances APIs that take class names. But somehow Tomcat prevents
that from working, I don't know how.


On Tue, Nov 3, 2009 at 9:22 AM, Rainer Jung <rainer.jung@...> wrote:

> Just to make sure w.r.t. it being working in Jetty: You use the same
> Java version? Sun changed an important bit between Java 5 and Java 6,
> where they are now caching something detected during runtime in a global
> static thus partially breaking the dynamics of XML parser detection when
> using mutiple classloaders. The usual indication is a class cast
> exception, which is not the case in your situation, but nevertheless I
> wanted to check, whether there's a relation to Java 6 vs. Java 5
> (handling in Java 6 is broken).
>
> Regards,
>
> Rainer
>
> On 03.11.2009 14:00, Benson Margulies wrote:
> > Here's the relevant log traffic of the missing method. I can get past
> this
> > problem by putting xalan into the endorsed directory, but I should not
> have
> > to do that when using the JAXP 1.4 API to create XPathFactory.
> >
> >
> > Caused by: java.lang.NoSuchMethodError:
> > org.apache.xpath.XPathContext.<init>(Z)V
> >     at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
> >     at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
> >     at
> >
> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
> >     ... 48 more
> > org.apache.cxf.common.injection.ResourceInjector  - method annotated by
> > @PostConstruct throws exception when invoked
> > java.lang.reflect.InvocationTargetException
> >
> >
> > On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:
> >
> >> Benson Margulies wrote:
> >>
> >>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that
> allow
> >>> the caller to pass in the class name of implementation classes.
> >>>
> >>> It all works find standalone. It works fine in Jetty. It fails in
> Tomcat
> >>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat
> has
> >>> somehow gotten an older version of Xalan into the classpath.
> >>>
> >>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
> >>> mystified.
> >>>
> >>>  A piece of the logfile where the error messages occur may help someone
> to
> >> help you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: Tomcat Xalan classpath problem

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've attached a self-contained test case to bz 48116, so you can see this
for yourself.



On Tue, Nov 3, 2009 at 9:22 AM, Rainer Jung <rainer.jung@...> wrote:

> Just to make sure w.r.t. it being working in Jetty: You use the same
> Java version? Sun changed an important bit between Java 5 and Java 6,
> where they are now caching something detected during runtime in a global
> static thus partially breaking the dynamics of XML parser detection when
> using mutiple classloaders. The usual indication is a class cast
> exception, which is not the case in your situation, but nevertheless I
> wanted to check, whether there's a relation to Java 6 vs. Java 5
> (handling in Java 6 is broken).
>
> Regards,
>
> Rainer
>
> On 03.11.2009 14:00, Benson Margulies wrote:
> > Here's the relevant log traffic of the missing method. I can get past
> this
> > problem by putting xalan into the endorsed directory, but I should not
> have
> > to do that when using the JAXP 1.4 API to create XPathFactory.
> >
> >
> > Caused by: java.lang.NoSuchMethodError:
> > org.apache.xpath.XPathContext.<init>(Z)V
> >     at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
> >     at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
> >     at
> >
> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
> >     ... 48 more
> > org.apache.cxf.common.injection.ResourceInjector  - method annotated by
> > @PostConstruct throws exception when invoked
> > java.lang.reflect.InvocationTargetException
> >
> >
> > On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:
> >
> >> Benson Margulies wrote:
> >>
> >>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that
> allow
> >>> the caller to pass in the class name of implementation classes.
> >>>
> >>> It all works find standalone. It works fine in Jetty. It fails in
> Tomcat
> >>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat
> has
> >>> somehow gotten an older version of Xalan into the classpath.
> >>>
> >>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
> >>> mystified.
> >>>
> >>>  A piece of the logfile where the error messages occur may help someone
> to
> >> help you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: Tomcat Xalan classpath problem

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i don't suppose you've had time to look at the test case?

On Tue, Nov 3, 2009 at 9:22 AM, Rainer Jung <rainer.jung@...> wrote:

> Just to make sure w.r.t. it being working in Jetty: You use the same
> Java version? Sun changed an important bit between Java 5 and Java 6,
> where they are now caching something detected during runtime in a global
> static thus partially breaking the dynamics of XML parser detection when
> using mutiple classloaders. The usual indication is a class cast
> exception, which is not the case in your situation, but nevertheless I
> wanted to check, whether there's a relation to Java 6 vs. Java 5
> (handling in Java 6 is broken).
>
> Regards,
>
> Rainer
>
> On 03.11.2009 14:00, Benson Margulies wrote:
> > Here's the relevant log traffic of the missing method. I can get past
> this
> > problem by putting xalan into the endorsed directory, but I should not
> have
> > to do that when using the JAXP 1.4 API to create XPathFactory.
> >
> >
> > Caused by: java.lang.NoSuchMethodError:
> > org.apache.xpath.XPathContext.<init>(Z)V
> >     at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
> >     at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
> >     at
> >
> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
> >     at
> >
> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
> >     ... 48 more
> > org.apache.cxf.common.injection.ResourceInjector  - method annotated by
> > @PostConstruct throws exception when invoked
> > java.lang.reflect.InvocationTargetException
> >
> >
> > On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:
> >
> >> Benson Margulies wrote:
> >>
> >>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that
> allow
> >>> the caller to pass in the class name of implementation classes.
> >>>
> >>> It all works find standalone. It works fine in Jetty. It fails in
> Tomcat
> >>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat
> has
> >>> somehow gotten an older version of Xalan into the classpath.
> >>>
> >>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
> >>> mystified.
> >>>
> >>>  A piece of the logfile where the error messages occur may help someone
> to
> >> help you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: Tomcat Xalan classpath problem

by Rainer Jung-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 06.11.2009 03:22, Benson Margulies wrote:
> i don't suppose you've had time to look at the test case?

Done, unfortunately worksforme :( - or should I write :) ?

See https://issues.apache.org/bugzilla/show_bug.cgi?id=48116

What's next?

Regards,

Rainer

P.S.: Are you at ApacheCon?

> On Tue, Nov 3, 2009 at 9:22 AM, Rainer Jung <rainer.jung@...> wrote:
>
>> Just to make sure w.r.t. it being working in Jetty: You use the same
>> Java version? Sun changed an important bit between Java 5 and Java 6,
>> where they are now caching something detected during runtime in a global
>> static thus partially breaking the dynamics of XML parser detection when
>> using mutiple classloaders. The usual indication is a class cast
>> exception, which is not the case in your situation, but nevertheless I
>> wanted to check, whether there's a relation to Java 6 vs. Java 5
>> (handling in Java 6 is broken).
>>
>> Regards,
>>
>> Rainer
>>
>> On 03.11.2009 14:00, Benson Margulies wrote:
>>> Here's the relevant log traffic of the missing method. I can get past
>> this
>>> problem by putting xalan into the endorsed directory, but I should not
>> have
>>> to do that when using the JAXP 1.4 API to create XPathFactory.
>>>
>>>
>>> Caused by: java.lang.NoSuchMethodError:
>>> org.apache.xpath.XPathContext.<init>(Z)V
>>>     at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
>>>     at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
>>>     at
>>>
>> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
>>>     at
>>>
>> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
>>>     at
>>>
>> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
>>>     at
>>>
>> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
>>>     ... 48 more
>>> org.apache.cxf.common.injection.ResourceInjector  - method annotated by
>>> @PostConstruct throws exception when invoked
>>> java.lang.reflect.InvocationTargetException
>>>
>>>
>>> On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:
>>>
>>>> Benson Margulies wrote:
>>>>
>>>>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that
>> allow
>>>>> the caller to pass in the class name of implementation classes.
>>>>>
>>>>> It all works find standalone. It works fine in Jetty. It fails in
>> Tomcat
>>>>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat
>> has
>>>>> somehow gotten an older version of Xalan into the classpath.
>>>>>
>>>>> I don't see any likely suspects in the Tomcat tree, so I'm momentarily
>>>>> mystified.
>>>>>
>>>>>  A piece of the logfile where the error messages occur may help someone
>> to
>>>> help you.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Tomcat Xalan classpath problem

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My prediction is that it will also work for me on 'anything but a mac.' At
which point I confront the annoying uphill process of complaining to the
Apple people, or give up.

On Fri, Nov 6, 2009 at 3:16 AM, Rainer Jung <rainer.jung@...> wrote:

> On 06.11.2009 03:22, Benson Margulies wrote:
> > i don't suppose you've had time to look at the test case?
>
> Done, unfortunately worksforme :( - or should I write :) ?
>
> See https://issues.apache.org/bugzilla/show_bug.cgi?id=48116
>
> What's next?
>
> Regards,
>
> Rainer
>
> P.S.: Are you at ApacheCon?
>
> > On Tue, Nov 3, 2009 at 9:22 AM, Rainer Jung <rainer.jung@...>
> wrote:
> >
> >> Just to make sure w.r.t. it being working in Jetty: You use the same
> >> Java version? Sun changed an important bit between Java 5 and Java 6,
> >> where they are now caching something detected during runtime in a global
> >> static thus partially breaking the dynamics of XML parser detection when
> >> using mutiple classloaders. The usual indication is a class cast
> >> exception, which is not the case in your situation, but nevertheless I
> >> wanted to check, whether there's a relation to Java 6 vs. Java 5
> >> (handling in Java 6 is broken).
> >>
> >> Regards,
> >>
> >> Rainer
> >>
> >> On 03.11.2009 14:00, Benson Margulies wrote:
> >>> Here's the relevant log traffic of the missing method. I can get past
> >> this
> >>> problem by putting xalan into the endorsed directory, but I should not
> >> have
> >>> to do that when using the JAXP 1.4 API to create XPathFactory.
> >>>
> >>>
> >>> Caused by: java.lang.NoSuchMethodError:
> >>> org.apache.xpath.XPathContext.<init>(Z)V
> >>>     at org.apache.xpath.jaxp.XPathImpl.eval(XPathImpl.java:207)
> >>>     at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:281)
> >>>     at
> >>>
> >>
> com.basistech.vws.env.GazetteerConfigManager.initialGazetteerConfiguration(GazetteerConfigManager.java:67)
> >>>     at
> >>>
> >>
> com.basistech.vws.env.RLPEnvironmentManager.initialGazetteerConfiguration(RLPEnvironmentManager.java:400)
> >>>     at
> >>>
> >>
> com.basistech.vws.env.RLPEnvironmentManager.initialConfiguration(RLPEnvironmentManager.java:358)
> >>>     at
> >>>
> >>
> com.basistech.vws.env.RLPEnvironmentManager.initialize(RLPEnvironmentManager.java:182)
> >>>     ... 48 more
> >>> org.apache.cxf.common.injection.ResourceInjector  - method annotated by
> >>> @PostConstruct throws exception when invoked
> >>> java.lang.reflect.InvocationTargetException
> >>>
> >>>
> >>> On Tue, Nov 3, 2009 at 7:48 AM, André Warnier <aw@...> wrote:
> >>>
> >>>> Benson Margulies wrote:
> >>>>
> >>>>> I have a webapp that makes calls to the JAXP 1.4/Java 1.6 APIs that
> >> allow
> >>>>> the caller to pass in the class name of implementation classes.
> >>>>>
> >>>>> It all works find standalone. It works fine in Jetty. It fails in
> >> Tomcat
> >>>>> 6.0.20. The error is a missing method in a Xalan class; as if Tomcat
> >> has
> >>>>> somehow gotten an older version of Xalan into the classpath.
> >>>>>
> >>>>> I don't see any likely suspects in the Tomcat tree, so I'm
> momentarily
> >>>>> mystified.
> >>>>>
> >>>>>  A piece of the logfile where the error messages occur may help
> someone
> >> to
> >>>> help you.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@...
> >> For additional commands, e-mail: users-help@...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>