Unable to transform to docbook

Mansour Al Akeel <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <CAFvvX=ZYndwO++mBOn1jKO5LK+aSVU0PHU3k8uifwtO5ih2eWA@mail.gmail.com>
I have worked with C2.1 and 2.2 before. I am trying to play with C3
for a coming project.
I need to generate HTML from docbook file.

INFO  RequestProcessor - Sitemap execution for /article/ex took 6470.727 ms.
ERROR XMLSitemapServlet - Cocoon can't process the request.
org.apache.cocoon.sitemap.InvocationException:
org.apache.cocoon.pipeline.ProcessingException: Can't parse url
connection file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
        at org.apache.cocoon.sitemap.util.ExceptionHandler.getInvocationException(ExceptionHandler.java:39)
        at org.apache.cocoon.sitemap.node.PipelineNode.handleException(PipelineNode.java:101)
        at org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:71)
        at org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
        at org.apache.cocoon.sitemap.node.PipelinesNode.invoke(PipelinesNode.java:49)
        at org.apache.cocoon.sitemap.node.AbstractSitemapNode.invoke(AbstractSitemapNode.java:96)
        at org.apache.cocoon.sitemap.node.Sitemap.invoke(Sitemap.java:42)
        at org.apache.cocoon.servlet.RequestProcessor.invoke(RequestProcessor.java:233)
        at org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:290)
        at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:90)
        at org.apache.cocoon.servlet.XMLSitemapServlet.service(XMLSitemapServlet.java:47)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

.....

Caused by: org.apache.cocoon.pipeline.ProcessingException: Can't parse
url connection file:/home/mansour/workspace/pipelines/repo/articles/ex.xml
        at org.apache.cocoon.sax.util.XMLUtils.toSax(XMLUtils.java:117)
        at org.apache.cocoon.sax.component.XMLGenerator$URLGenerator.execute(XMLGenerator.java:385)
        at org.apache.cocoon.sax.component.XMLGenerator.execute(XMLGenerator.java:104)
        at org.apache.cocoon.pipeline.AbstractPipeline.invokeStarter(AbstractPipeline.java:146)
        at org.apache.cocoon.pipeline.CachingPipeline.execute(CachingPipeline.java:143)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at org.apache.cocoon.servlet.collector.ResponseHeaderCollector.interceptInvoke(ResponseHeaderCollector.java:94)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy27.execute(Unknown Source)
        at org.apache.cocoon.sitemap.InvocationImpl.execute(InvocationImpl.java:141)
        at org.apache.cocoon.sitemap.node.PipelineNode.invoke(PipelineNode.java:66)
        ... 60 more
Caused by: org.xml.sax.SAXException: java.lang.NullPointerException
javax.xml.transform.TransformerException: java.lang.NullPointerException
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:245)
        at org.apache.cocoon.xml.sax.AbstractSAXPipe.endDocument(AbstractSAXPipe.java:58)
        at org.apache.cocoon.sax.AbstractSAXTransformer.endDocument(AbstractSAXTransformer.java:47)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:742)

......

Here's my pipeline:

  <map:pipelines>
        <map:pipeline>

            <map:match pattern="article/{id}">
                <map:generate
src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
                <map:transform
src="/home/mansour/workspace/pipelines/docbook-xsl-snapshot/html/docbook.xsl"
/>
                <map:serialize />
            </map:match>


This matcher is working with another transformation.
For example the following pipeline:

        <map:pipeline>

            <map:match pattern="article/{id}">
                <map:generate
src="/home/mansour/workspace/pipelines/repo/articles/{map:id}.xml" />
                <map:transform src="sheets/myCustomSheet.xsl" />
                <map:serialize />
            </map:match>

Would work fine.

The same file "ex.xml" can be processed with xalan from the command
line and produce the correct output !

any idea ??
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.