Thanks, Vadim. Now, please find below the stack trace (just the root cause) from
Catalina's app specific log file. Looking at line 94  of CastorTransformer.java
(from the scratchpad of the Cocoon 2.0.3 source dist) I can see that it fails on
the line marked with --> <---, but simply woul dnot know enough to tell why ?

Is anybody actually using the CastorTransformer sucessfully ?

Werner

   /**
     * Inner class eventhandler, forward the Castor SAX events
     * to Cocoon 2 Events
     */
    CastorEventAdapter = new HandlerBase(){
    public void startElement(String name, AttributeList attributes) throws
SAXException
        {
          AttributesImpl a= new AttributesImpl();
          for(int i=0;i <attributes.getLength(); i++){

a.addAttribute("",attributes.getName(i),attributes.getName(i),
                          "",attributes.getValue(i));
          }

--->
CastorTransformer.super.contentHandler.startElement("",name,name,a);   <----
        }

        public void characters(char[] chars, int offset, int length) throws
SAXException
        {
          CastorTransformer.super.contentHandler.characters(chars, offset,
length);
        }

        public void endElement(String name) throws SAXException
        {

          CastorTransformer.super.contentHandler.endElement("", name,name);
        }
    };
  }




java.lang.NoSuchMethodError
        at
org.apache.cocoon.transformation.CastorTransformer$1.startElement(CastorTransformer.java:94)

        at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:876)
        at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:540)
        at
org.apache.cocoon.transformation.CastorTransformer.insertBean(CastorTransformer.java:225)

        at
org.apache.cocoon.transformation.CastorTransformer.process(CastorTransformer.java:173)

        at
org.apache.cocoon.transformation.CastorTransformer.startElement(CastorTransformer.java:132)

        at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118)
        at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
        at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)

        at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)

        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)

        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
        at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:269)
        at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:222)
        at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:206)

        at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
        at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)

        at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:399)

        at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:153)

        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)

        at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:156)

        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)

        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:140)

        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)

        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:144)

        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:328)

        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:293)

        at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
        at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)

        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)

        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)

        at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1759)

        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
        at
com.msdw.futopt.expiry.http.ExpiryActionServlet.doPost(ExpiryActionServlet.java:172)

        at
com.msdw.futopt.expiry.http.ExpiryActionServlet.doGet(ExpiryActionServlet.java:140)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)

        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)

        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
        at java.lang.Thread.run(Thread.java:484)


Vadim Gritsenko wrote:

> Werner Guttmann wrote:
>
> >Thanks, Vadim, for pointing this out. I just changed this back to be in line
> >with the CASTOR_URI declaration in CastorTransformer.java, i.e. use a
> >namespace declaration of
> >
> >xmlns:castor="http://castor.exolab.org/cocoontransfomer";
> >
> >in my page. Though now I am facing the same problem as in my original email,
> >iow I am still getting a NPE. Any idea why ?
> >
>
> No, I don't; and I have not read your original email: I've not worked
> with Castor (yet).
>
> Vadim
>
> >Werner
> >
> >Vadim Gritsenko wrote:
> >
> >
> >
> >>Werner Guttmann wrote:
> >>...
> >>
> >>
> >>
> >>>PS Btw, the Castor sample shipped with Cocoon 2.0.3 has an error in the
> >>>namespace documentation of the test.xml file, iow it really reads
> >>>
> >>><?xml version="1.0"?>
> >>><zoo xmlns:castor="http://castor.exolab.org/cocoontransfomer";>
> >>>
> >>>
> >>>
> >>Actually, this is not error in demo; it's a typo in a transformer
> >>itself. Thanks for pointing this out.
> >>
> >>This namespace typo can easily be fixed because this transformer is
> >>still in the scratchpad (== alpha).
> >>
> >>Vadim
> >>...
> >>
> >>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to