You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Martin Cooper <ma...@tumbleweed.com> on 2002/04/26 21:53:07 UTC

Problems running example

I'm trying to run the <x:transform> example in the standard-examples web
app, but am having problems with both Tomcat 4.0.2-b2 and Resin 2.1.0.

With Tomcat, I get the following stack trace (this is the start of the root
cause part):

java.lang.NoClassDefFoundError: javax/xml/transform/TransformerException
 at java.lang.Class.getMethods0(Native Method)
 at java.lang.Class.getDeclaredMethods(Class.java:1039)
 at java.beans.Introspector$1.run(Introspector.java:852)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:850)
 at java.beans.Introspector.getTargetEventInfo(Introspector.java:556)
 at java.beans.Introspector.getBeanInfo(Introspector.java:294)
 at java.beans.Introspector.(Introspector.java:271)
 at java.beans.Introspector.getBeanInfo(Introspector.java:81)
 at
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
 at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146
)
 .....

I expected that the standard-examples web app would have everything needed
to run the examples, but apparently not. What do I need to add (and where)
to get this to work?

With Resin, I get a different problem:

javax.servlet.jsp.JspException: bad source
javax.xml.transform.sax.SAXSource@acf6e
 at
org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(Trans
formSupport.java:163)
 at
org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag(TransformTag.
java:104)
 at
_xml._transform__jsp._jspService(/standard-examples/xml/Transform.jsp:28)
 at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
 at com.caucho.jsp.Page.subservice(Page.java:485)
 .....

Here I have even less idea what's going wrong.

Any ideas, anyone?

Thanks!

--
Martin Cooper


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problems running example

Posted by Shawn Bayern <ba...@essentially.net>.
On Fri, 26 Apr 2002, Martin Cooper wrote:

> > My best advice is to use the JAXP 1.2 set of JARs consistently; that
> > should be the easiest way to fix the problem.
> 
> I presume you mean the JAXP 1.2 EA2 that's bundled with the JAX Pack?

Yeah, that's what I had in mind.  At least, it's that distribution that
I've tested the JSTL implementation with.

> Also presumably, I'll need to replace the containers' JAXP
> implementations with this, and not just what's in the
> standard-examples web app?

No, loading from the webapp classloader should be sufficient.  Just
dropping all the JAXP 1.2 EA2 JARs (barring xsltc.jar) into WEB-INF/lib
should be all you need to do.  Let me know if that doesn't work for you,
though.  (And keep in mind the Tomcat 4.0.3 bug that prevents it from
working; it's fixed in Tomcat 4.0.4B2.)

-- 
Shawn Bayern
"JSP Standard Tag Library"   http://www.jstlbook.com
(coming this summer from Manning Publications)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problems running example

Posted by Martin Cooper <ma...@tumbleweed.com>.
----- Original Message -----
From: "Shawn Bayern" <ba...@essentially.net>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Friday, April 26, 2002 2:45 PM
Subject: Re: Problems running <x:transform> example


> On Fri, 26 Apr 2002, Martin Cooper wrote:
>
> > I'm trying to run the <x:transform> example in the standard-examples web
> > app, but am having problems with both Tomcat 4.0.2-b2 and Resin 2.1.0.
> >
> > With Tomcat, I get the following stack trace (this is the start of the
root
> > cause part):
> >
> > java.lang.NoClassDefFoundError: javax/xml/transform/TransformerException
>
> This is just a missing class.  In the crimson/xalan pair, it should be
> found in xalan.jar; in the JAXP 1.2 arrangement, it's in jaxp-api.jar.  If
> you use the xalan.jar from the standard-examples.war application, the
> right classes should be there; note that not every JAR called 'xalan.jar'
> will include it.

Hmm. This is weird. It is, in fact, in the xalan.jar that's in the JSTL Beta
2 distribution, but it's not in the xalan.jar that was bundled into the 4/26
nightly build. A problem with the nightly build process, perhaps?

> > I expected that the standard-examples web app would have everything
needed
> > to run the examples, but apparently not. What do I need to add (and
where)
> > to get this to work?
> >
> > With Resin, I get a different problem:
> >
> > javax.servlet.jsp.JspException: bad source
>
> This is from a TransformerConfigurationException; as a first guess, it's
> related to a behind-the-scenes error casting a class due to conflicts in
> the versions between two class loaders.

Sigh. Class loaders bite me again. ;-{

> My best advice is to use the JAXP 1.2 set of JARs consistently; that
> should be the easiest way to fix the problem.

I presume you mean the JAXP 1.2 EA2 that's bundled with the JAX Pack? Also
presumably, I'll need to replace the containers' JAXP implementations with
this, and not just what's in the standard-examples web app?

Thanks, Shawn.

--
Martin Cooper


>
> --
> Shawn Bayern
> "JSP Standard Tag Library"   http://www.jstlbook.com
> (coming this summer from Manning Publications)
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problems running example

Posted by Shawn Bayern <ba...@essentially.net>.
On Fri, 26 Apr 2002, Martin Cooper wrote:

> I'm trying to run the <x:transform> example in the standard-examples web
> app, but am having problems with both Tomcat 4.0.2-b2 and Resin 2.1.0.
> 
> With Tomcat, I get the following stack trace (this is the start of the root
> cause part):
> 
> java.lang.NoClassDefFoundError: javax/xml/transform/TransformerException

This is just a missing class.  In the crimson/xalan pair, it should be
found in xalan.jar; in the JAXP 1.2 arrangement, it's in jaxp-api.jar.  If
you use the xalan.jar from the standard-examples.war application, the
right classes should be there; note that not every JAR called 'xalan.jar'
will include it.

> I expected that the standard-examples web app would have everything needed
> to run the examples, but apparently not. What do I need to add (and where)
> to get this to work?
> 
> With Resin, I get a different problem:
> 
> javax.servlet.jsp.JspException: bad source

This is from a TransformerConfigurationException; as a first guess, it's
related to a behind-the-scenes error casting a class due to conflicts in
the versions between two class loaders.

My best advice is to use the JAXP 1.2 set of JARs consistently; that
should be the easiest way to fix the problem.

-- 
Shawn Bayern
"JSP Standard Tag Library"   http://www.jstlbook.com
(coming this summer from Manning Publications)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>