cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: C2: problems with /cocoon/status, "Namespace not supported
Date Thu, 11 Jan 2001 13:34:24 GMT
K. Lo Shih wrote:

> At 15:23 01/10/2001 -0500, Berin Loritsch wrote:
> 
>> Hmm.  It sounds like you are trying to use a JAXP parser.  Unfortunately,
>> I don't think that JAXP supports SAX 2 at this time.  Cocoon requires a
>> SAX 2 compliant XML parser to function (which is where you get the 
>> namespace
>> support).
> 
> 
> Should then I be using xerces-1.2.3's parser factory 
> org.apache.xerces.jaxp.SAXParserFactoryImpl (which I understand supports 
> SAX2) rather than the "default" com.sun.xml.parser.SAXParserFactoryImpl?
> 
> Do I set this using 
> -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactory 
> Impl (and copy the xerces_1_2_3.jar into $TOMCAT_HOME/lib)? I'm unable 
> to find where to specify a Cocoon2 specific property for the SAX parser 
> factory def.

Basically, you can do that.  Keep in mind that Cocoon 2 by default uses the
proper parser from Xerces.  If you have other XML parsers in the classpath
before Xerces, it may alter the default operation.

What I do is simply take the xerces jar and put it in $TOMCAT_HOME/lib, and
remove the other parser libraries.

Does anyone have a jar with the simple interfaces that SAX 2 and DOM 2 use?
By placing that in the $JAVA_HOME/jre/lib/ext directory, we can avoid most
XML Parser problems.

> 
> Thanks,
> Lo.
> 
> At 15:23 01/10/2001 -0500, Berin Loritsch wrote:
> 
>> K. Lo Shih wrote:
>> 
>>> I've just installed C2 and am running it for the first time using 
>>> xml-cocoon via cvs, tomcat-3.2.1.
>>> All is well until Cocoon services its first request whereupon it dies 
>>> with the exception org.apache.cocoon.ProcessingException: "The 
>>> sitemap handler's sitemap is not available". The sitemap.xmap seems 
>>> to be in the proper place in the unjarred war directory.
>>> Has anyone run into this one?
>> 
>> 
>> Hmm.  It sounds like you are trying to use a JAXP parser.  Unfortunately,
>> I don't think that JAXP supports SAX 2 at this time.  Cocoon requires a
>> SAX 2 compliant XML parser to function (which is where you get the 
>> namespace
>> support).
>> 
>>> The first exception logged is a ParserConfigurationException saying: 
>>> "Namespace not supported by SAXParser" (thrown somewhere within 
>>> com.sun.xml.parser.SAXParserFactoryImpl.newSAXParser()). So, I 
>>> thinking that this is a problem with not having the proper SAX parser 
>>> class configured because of a system properties setting. Do I need to 
>>> have a jaxp properties file somewhere in addition to installing 
>>> cocoon.war?
>>> Stack trace:
>>> DEBUG   2526    [cocoon  ] (Thread-24): DefaultComponentManager 
>>> returned instance for role org.apache.cocoon.Cocoon.
>>> ERROR   4030    [cocoon  ] (Thread-24): Logicsheet.setInputSource
>>> javax.xml.transform.TransformerConfigurationException: Namespace not 
>>> supported by SAXParser
>>>         at 
>>> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transforme 
>>> rFa ctoryImpl.java:755)
>>>         at 
>>> org.apache.cocoon.components.language.markup.Logicsheet.setInputSource(Lo 
>>> gic sheet.java:83)
>>>         at 
>>> org.apache.cocoon.components.language.markup.AbstractMarkupLanguage.confi 
>>> gur e(AbstractMarkupLanguage.java:143)
>>>         at 
>>> org.apache.cocoon.CocoonComponentSelector.setupComponent(CocoonComponentS 
>>> ele ctor.java:241)
>>>         at 
>>> org.apache.cocoon.CocoonComponentSelector.select(CocoonComponentSelector. 
>>> jav a:160)
>>>         at 
>>> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load 
>>> (Pr ogramGeneratorImpl.java:136)
>>>         at org.apache.cocoon.sitemap.Handler.run(Handler.java:162)
>>>         at java.lang.Thread.run(Thread.java:484)
>>> Thanks,
>>> Lo.
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>>> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org



Mime
View raw message