You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2003/01/10 12:14:02 UTC

RE: Reason of HTMLSerializer exception

We had this problem, when not the proper version of xalan was in the
classpath or precisly in the web-inf/lib directory.
Due to the movement of the libraries into the endorsed directory we
ended up having no xalan/xerces version in web-inf/lib and therefore
the default version was used.

HTH
Carsten

> -----Original Message-----
> From: Stephan Michels [mailto:stephan@apache.org]
> Sent: Friday, January 10, 2003 12:15 PM
> To: cocoon-dev
> Subject: Reason of HTMLSerializer exception
> 
> 
> 
> Hi,
> 
> if I start the Cocoon webapp into tomcat I got always this exception.
> 
> org.apache.cocoon.CascadingIOException:
> org.apache.xml.utils.WrappedRuntimeException: The output format must have
> a '{http://xml.apache.org/xslt}content-handler' property!:
> org.apache.xml.utils.WrappedRuntimeException: The output format must have
> a '{http://xml.apache.org/xslt}content-handler' property!
> 	at
> org.apache.cocoon.serialization.HTMLSerializer.setOutputStream(HTM
> LSerializer.java:92)
> 
> I tought that I know the reason for some time ago, but I forget
> this. Can anyone give me a hint?
> 
> Thanks, Stephan Michels.
> 
> _______________________________________________________________________
>          Stephan Michels               EMail: stephan@apache.org
>          ICQ: 115535699                Tel: +49-030-314-21583
> ----+----|----+----|----+----|----+----|----+----|----+----|----+----|-|
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Geoff Howard <co...@leverageweb.com>.
> > I'm using tomcat 3.3.1 - remember, if you're using tomcat 4.x
> > you have to copy the cocoon/lib/endorsed jars to tomcat's
> > common/endorsed directory as Giacomo asked.
> 
> Okay okay, to repeat (I'm a bit slow today):
> 
> lib/core -> cocoon/WEB-INF/lib
> lib/optional -> cocoon/WEB-INF/lib
> lib/endorsed -> tomcat/common/endorsed
> 
> Right?
> 
> Why are the following instruction in build.xml?
>     <copy todir="${build.war}/WEB-INF/lib">
>       <fileset dir="${lib.dir}/endorsed">
>         <include name="*.jar"/>
>         <exclude name="servlet*.jar"/>
>       </fileset>
> 
> To complete my confusion, I'm currently working with java 1.4,
> which, if I don't make mistakes, have the XML stuff included.
> So I don't need xml-apis.jar etc. So why to the *grmpf*# get I an
> exception, when I have the xml apis in WEB-INF.

An older version is included with the jdk - which doesn't work for 
cocoon.  This is why you need to copy them to endorsed, which is 
new with 1.4 for the very purpose of overriding the provided version 
with newer ones as needed.

the standard jdk endorsed dir is overridden by default by tomcat's 
startup parameters replaced with tomcat/common/endorsed, which is 
not yet mentioned in the cocoon docs.

> 
> Not my day, really.

Don't worry, by my count you're the 5,000th person that's been hung up 
on this.

Geoff Howard

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Giacomo Pati <gi...@apache.org>.
On Fri, 10 Jan 2003, Stephan Michels wrote:

>
>
>
> On Fri, 10 Jan 2003, Carsten Ziegeler wrote:
>
> > > -----Original Message-----
> > > From: Stephan Michels [mailto:stephan@apache.org]
> > >
> > > Strange .. Without these libs in WEB-INF/lib/ I don't get this
> > > exception, and with I got this exception. Hmm.
> > >
> > > Do you use tomcat? And when yes, which version?
> > >
> > I'm using tomcat 3.3.1 - remember, if you're using tomcat 4.x
> > you have to copy the cocoon/lib/endorsed jars to tomcat's
> > common/endorsed directory as Giacomo asked.
>
> Okay okay, to repeat (I'm a bit slow today):
>
> lib/core -> cocoon/WEB-INF/lib
> lib/optional -> cocoon/WEB-INF/lib
> lib/endorsed -> tomcat/common/endorsed
>
> Right?
>
> Why are the following instruction in build.xml?
>     <copy todir="${build.war}/WEB-INF/lib">
>       <fileset dir="${lib.dir}/endorsed">
>         <include name="*.jar"/>
>         <exclude name="servlet*.jar"/>
>       </fileset>
>
> To complete my confusion, I'm currently working with java 1.4,
> which, if I don't make mistakes, have the XML stuff included.
> So I don't need xml-apis.jar etc. So why to the *grmpf*# get I an
> exception, when I have the xml apis in WEB-INF.

Because the included stuff in Java 1.4 is OLD! Because the xml stuff in
Java 1.4 has precedence over WEB-INF/lib (classloader convention), thus
the endorsed directory to even preceed standard Java classes

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Stephan Michels <st...@apache.org>.


On Fri, 10 Jan 2003, Carsten Ziegeler wrote:

> > -----Original Message-----
> > From: Stephan Michels [mailto:stephan@apache.org]
> >
> > Strange .. Without these libs in WEB-INF/lib/ I don't get this
> > exception, and with I got this exception. Hmm.
> >
> > Do you use tomcat? And when yes, which version?
> >
> I'm using tomcat 3.3.1 - remember, if you're using tomcat 4.x
> you have to copy the cocoon/lib/endorsed jars to tomcat's
> common/endorsed directory as Giacomo asked.

Okay okay, to repeat (I'm a bit slow today):

lib/core -> cocoon/WEB-INF/lib
lib/optional -> cocoon/WEB-INF/lib
lib/endorsed -> tomcat/common/endorsed

Right?

Why are the following instruction in build.xml?
    <copy todir="${build.war}/WEB-INF/lib">
      <fileset dir="${lib.dir}/endorsed">
        <include name="*.jar"/>
        <exclude name="servlet*.jar"/>
      </fileset>

To complete my confusion, I'm currently working with java 1.4,
which, if I don't make mistakes, have the XML stuff included.
So I don't need xml-apis.jar etc. So why to the *grmpf*# get I an
exception, when I have the xml apis in WEB-INF.

Not my day, really.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Giacomo Pati <gi...@apache.org>.
On Fri, 10 Jan 2003, Carsten Ziegeler wrote:

> > -----Original Message-----
> > From: Stephan Michels [mailto:stephan@apache.org]
> >
> > Strange .. Without these libs in WEB-INF/lib/ I don't get this
> > exception, and with I got this exception. Hmm.
> >
> > Do you use tomcat? And when yes, which version?
> >
> I'm using tomcat 3.3.1 - remember, if you're using tomcat 4.x
> you have to copy the cocoon/lib/endorsed jars to tomcat's
> common/endorsed directory as Giacomo asked.

Oh, tomcat 3.3. Hmm.. maybe you need to copy them into
$JAVA_HOME/jre/lib/endorsed (create it if it doesn't exists.

THIS IS ONLY TRUE IF YOU ARE USING JAVA 1.4!!

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
> -----Original Message-----
> From: Stephan Michels [mailto:stephan@apache.org]
> 
> Strange .. Without these libs in WEB-INF/lib/ I don't get this
> exception, and with I got this exception. Hmm.
> 
> Do you use tomcat? And when yes, which version?
> 
I'm using tomcat 3.3.1 - remember, if you're using tomcat 4.x
you have to copy the cocoon/lib/endorsed jars to tomcat's
common/endorsed directory as Giacomo asked.

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Stephan Michels <st...@apache.org>.

On Fri, 10 Jan 2003, Carsten Ziegeler wrote:

>
>
> > -----Original Message-----
> > From: Stephan Michels [mailto:stephan@apache.org]
> >
> > On Fri, 10 Jan 2003, Carsten Ziegeler wrote:
> >
> > > We had this problem, when not the proper version of xalan was in the
> > > classpath or precisly in the web-inf/lib directory.
> > > Due to the movement of the libraries into the endorsed directory we
> > > ended up having no xalan/xerces version in web-inf/lib and therefore
> > > the default version was used.
> >
> > Okay thank you. For recapitulation, all libs in endorsed/ shouldn't
> > be copied into the webapp? When yes, why were they copied?
> > Or am I wrong?
> >
> No, it's the other way round. They should be copied but weren't on my
> system. And then without the libs, I got the same exception.

Strange .. Without these libs in WEB-INF/lib/ I don't get this
exception, and with I got this exception. Hmm.

Do you use tomcat? And when yes, which version?

Stephan Michels.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: Stephan Michels [mailto:stephan@apache.org]
> 
> On Fri, 10 Jan 2003, Carsten Ziegeler wrote:
> 
> > We had this problem, when not the proper version of xalan was in the
> > classpath or precisly in the web-inf/lib directory.
> > Due to the movement of the libraries into the endorsed directory we
> > ended up having no xalan/xerces version in web-inf/lib and therefore
> > the default version was used.
> 
> Okay thank you. For recapitulation, all libs in endorsed/ shouldn't
> be copied into the webapp? When yes, why were they copied?
> Or am I wrong?
> 
No, it's the other way round. They should be copied but weren't on my
system. And then without the libs, I got the same exception.

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Reason of HTMLSerializer exception

Posted by Stephan Michels <st...@apache.org>.


On Fri, 10 Jan 2003, Carsten Ziegeler wrote:

> We had this problem, when not the proper version of xalan was in the
> classpath or precisly in the web-inf/lib directory.
> Due to the movement of the libraries into the endorsed directory we
> ended up having no xalan/xerces version in web-inf/lib and therefore
> the default version was used.

Okay thank you. For recapitulation, all libs in endorsed/ shouldn't
be copied into the webapp? When yes, why were they copied?
Or am I wrong?

> ls -1 webapps/cocoon/WEB-INF/lib/x*
webapps/cocoon/WEB-INF/lib/xalan-2.4.1.jar
webapps/cocoon/WEB-INF/lib/xercesImpl-2.1.0.jar
webapps/cocoon/WEB-INF/lib/xml-apis.jar
webapps/cocoon/WEB-INF/lib/xmldb-api-20011111.jar
webapps/cocoon/WEB-INF/lib/xsltc.jar

Stephan.

> > -----Original Message-----
> > From: Stephan Michels [mailto:stephan@apache.org]
> > Sent: Friday, January 10, 2003 12:15 PM
> > To: cocoon-dev
> > Subject: Reason of HTMLSerializer exception
> >
> >
> >
> > Hi,
> >
> > if I start the Cocoon webapp into tomcat I got always this exception.
> >
> > org.apache.cocoon.CascadingIOException:
> > org.apache.xml.utils.WrappedRuntimeException: The output format must have
> > a '{http://xml.apache.org/xslt}content-handler' property!:
> > org.apache.xml.utils.WrappedRuntimeException: The output format must have
> > a '{http://xml.apache.org/xslt}content-handler' property!
> > 	at
> > org.apache.cocoon.serialization.HTMLSerializer.setOutputStream(HTM
> > LSerializer.java:92)
> >
> > I tought that I know the reason for some time ago, but I forget
> > this. Can anyone give me a hint?
> >
> > Thanks, Stephan Michels.



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org