You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stefano Mazzocchi <st...@apache.org> on 2003/04/29 02:10:06 UTC

[BUG] very weird NPE in JXTemplateTransformer

This is a pretty weird bug. I've updated linotype to the latest and
greatest CVS but I get a NPE on this pipeline:

    <map:match pattern="edit/news/*/">
     <map:generate src="cocoon://news/{1}.xml"/>
     <map:transform src="stylesheets/news2edit.xslt">
      <map:parameter name="home" value="{global:home}"/>
     </map:transform>
     <map:transform type="jx"/>
     <map:serialize/>
    </map:match>



Re: [BUG] very weird NPE in JXTemplateTransformer

Posted by Bernhard Huber <be...@a1.net>.
Hi,

i faced some NPE problems as i was using the JXTemplateGenerator, and 
JXTemplateTransformer in the linotype web application.

at the end i patched JXTemplateGenerator, somehow the location object is 
null,
i didn't devled into the code further why location object is null, just 
fixing the symptom,
the patch:

Index: JXTemplateGenerator.java
===================================================================
RCS file: 
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/J
XTemplateGenerator.java,v
retrieving revision 1.1
diff -r1.1 JXTemplateGenerator.java
813a814,815
 > //HB 20030427: fix NPE
 > if (location != null) {
814a817,819
 > } else {
 >   this.location = new LocatorImpl();
 > }
1510a1516,1517
 > //HB 20030427: fix NPE
 > if (locator != null) {
1511a1519,1521
 > } else {
 >   charLocation = new LocatorImpl();
 > }
1616a1627,1628
 > //HB 20030427: fix NPE
 > if (locator != null) {
1617a1630,1632
 > } else {
 >   this.locator = new LocatorImpl();
 > }

hope it helps



Re: [BUG] very weird NPE in JXTemplateTransformer

Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/29/03 6:03 AM Pier Fumagalli wrote:

> "Stefano Mazzocchi" <st...@apache.org> wrote:
> 
> 
>>This is a pretty weird bug. I've updated linotype to the latest and
>>greatest CVS but I get a NPE on this pipeline:
>>
>>  <map:match pattern="edit/news/*/">
>>   <map:generate src="cocoon://news/{1}.xml"/>
>>   <map:transform src="stylesheets/news2edit.xslt">
>>    <map:parameter name="home" value="{global:home}"/>
>>   </map:transform>
>>   <map:transform type="jx"/>
>>   <map:serialize/>
>>  </map:match>
> 
> 
> I've noticed a similar one in the JX Generator... Any stacktrace from your
> end?

yes, damn it, the above was somehow cut.... hmmmm, since I'm half a
planet away from the previous router, I'm starting to think there is
something wrong in mozmail... damn.

well, resending.

-- 
Stefano.



Re: [BUG] very weird NPE in JXTemplateTransformer

Posted by Peter Royal <pr...@apache.org>.
On Tuesday, April 29, 2003, at 01:59  PM, Christopher Oliver wrote:
> I don't know how to recreate this problem. But probably the best thing 
> to do to debug this is to modify Xalan TransformerImpl.java to not 
> swallow the stacktrace of the original NPE. If you do that, then 
> repost the real stack trace and I'll take a look at it.

My strategy to work around this has been to:

Create a new exception:

public class CascadingSAXException extends SAXException implements 
CascadingThrowable
{
  ...
}

And wrap all transformer / generators in something like:


void startElement( ... )
{
    try
    {
       ... logic ...
    }
    catch( SAXException e )
    {
        throw e;
    }
    catch( Exception e )
    {
        throw new CascadingSAXException( e );
    }
}


-pete


Re: [BUG] very weird NPE in JXTemplateTransformer

Posted by Christopher Oliver <re...@verizon.net>.
I don't know how to recreate this problem. But probably the best thing 
to do to debug this is to modify Xalan TransformerImpl.java to not 
swallow the stacktrace of the original NPE. If you do that, then repost 
the real stack trace and I'll take a look at it.

Chris

Stefano Mazzocchi wrote:

>on 4/29/03 6:03 AM Pier Fumagalli wrote:
>
>  
>
>>"Stefano Mazzocchi" <st...@apache.org> wrote:
>>
>>
>>    
>>
>>>This is a pretty weird bug. I've updated linotype to the latest and
>>>greatest CVS but I get a NPE on this pipeline:
>>>
>>> <map:match pattern="edit/news/*/">
>>>  <map:generate src="cocoon://news/{1}.xml"/>
>>>  <map:transform src="stylesheets/news2edit.xslt">
>>>   <map:parameter name="home" value="{global:home}"/>
>>>  </map:transform>
>>>  <map:transform type="jx"/>
>>>  <map:serialize/>
>>> </map:match>
>>>      
>>>
>>I've noticed a similar one in the JX Generator... Any stacktrace from your
>>end?
>>    
>>
>
>java.lang.RuntimeException: java.lang.NullPointerException
>	at
>org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3363)
>	at
>org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
>	at
>org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
>	at
>org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:503)
>	at
>org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:2133)
>	at
>org.apache.cocoon.generation.JXTemplateGenerator.access$600(JXTemplateGenerator.java:247)
>	at
>org.apache.cocoon.generation.JXTemplateGenerator$TransformerAdapter$TemplateConsumer.endDocument(JXTemplateGenerator.java:1844)
>	at
>org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
>	at
>org.apache.cocoon.components.source.impl.EnvironmentChanger.endDocument(SitemapSource.java:524)
>	at
>org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTeePipe.java:102)
>	at
>org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:119)
>	at
>org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:109)
>	at
>org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:251)
>	at
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:681)
>	at
>org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414)
>	at
>org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:538)
>	at
>org.apache.cocoon.environment.http.HttpEnvironment.toSAX(HttpEnvironment.java:305)
>	at
>org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:521)
>	at
>org.apache.cocoon.environment.wrapper.EnvironmentWrapper.toSAX(EnvironmentWrapper.java:350)
>	at
>org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140)
>	at
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:545)
>	at
>org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:214)
>	at
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:489)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:150)
>	at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
>	at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
>	at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)
>	at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)
>	at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
>	at
>org.apache.cocoon.environment.ForwardRedirector.cocoonRedirect(ForwardRedirector.java:207)
>	at
>org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:114)
>	at
>org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:227)
>	at
>org.apache.cocoon.components.flow.javascript.JSCocoon.jsFunction_forwardTo(JSCocoon.java:227)
>	at inv2.invoke()
>	at org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)
>	at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)
>	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
>	at
>org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1087)
>	at
>org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:173)
>	at
>org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:121)
>	at
>org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
>	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
>	at
>org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunction(JavaScriptInterpreter.java:580)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:196)
>	at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
>
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
>	at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
>	at
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>	at
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)
>	at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)
>	at
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
>	at org.apache.cocoon.Cocoon.process(Cocoon.java:640)
>	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1139)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
>	at
>org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
>	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
>	at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
>	at
>org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
>	at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
>	at org.mortbay.http.HttpServer.service(HttpServer.java:863)
>	at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
>	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
>	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
>	at
>org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
>	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
>	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
>
>
>I believe the JXTemplate* sends some null stuff into the SAX events
>instead of "" in some places.
>
>Chris, did you experience anything like this before?
>
>  
>



Re: [BUG] very weird NPE in JXTemplateTransformer

Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/29/03 6:03 AM Pier Fumagalli wrote:

> "Stefano Mazzocchi" <st...@apache.org> wrote:
> 
> 
>>This is a pretty weird bug. I've updated linotype to the latest and
>>greatest CVS but I get a NPE on this pipeline:
>>
>>  <map:match pattern="edit/news/*/">
>>   <map:generate src="cocoon://news/{1}.xml"/>
>>   <map:transform src="stylesheets/news2edit.xslt">
>>    <map:parameter name="home" value="{global:home}"/>
>>   </map:transform>
>>   <map:transform type="jx"/>
>>   <map:serialize/>
>>  </map:match>
> 
> 
> I've noticed a similar one in the JX Generator... Any stacktrace from your
> end?

java.lang.RuntimeException: java.lang.NullPointerException
	at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3363)
	at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
	at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
	at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:503)
	at
org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:2133)
	at
org.apache.cocoon.generation.JXTemplateGenerator.access$600(JXTemplateGenerator.java:247)
	at
org.apache.cocoon.generation.JXTemplateGenerator$TransformerAdapter$TemplateConsumer.endDocument(JXTemplateGenerator.java:1844)
	at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
	at
org.apache.cocoon.components.source.impl.EnvironmentChanger.endDocument(SitemapSource.java:524)
	at
org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTeePipe.java:102)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:119)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:109)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:251)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:681)
	at
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:414)
	at
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:538)
	at
org.apache.cocoon.environment.http.HttpEnvironment.toSAX(HttpEnvironment.java:305)
	at
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:521)
	at
org.apache.cocoon.environment.wrapper.EnvironmentWrapper.toSAX(EnvironmentWrapper.java:350)
	at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:545)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:214)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:489)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:150)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
	at
org.apache.cocoon.environment.ForwardRedirector.cocoonRedirect(ForwardRedirector.java:207)
	at
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:114)
	at
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:227)
	at
org.apache.cocoon.components.flow.javascript.JSCocoon.jsFunction_forwardTo(JSCocoon.java:227)
	at inv2.invoke()
	at org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)
	at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:1087)
	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:173)
	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:121)
	at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
	at
org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunction(JavaScriptInterpreter.java:580)
	at
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:196)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:640)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1139)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
	at org.mortbay.http.HttpServer.service(HttpServer.java:863)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
	at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)


I believe the JXTemplate* sends some null stuff into the SAX events
instead of "" in some places.

Chris, did you experience anything like this before?

-- 
Stefano.



RE: [BUG] very weird NPE in JXTemplateTransformer

Posted by Ias <ia...@apache-korea.org>.
I solved this problem by modifying news2edit.xslt to

     <form name="data" action="#{string('{$continuation/id}')}.kont"
method="POST" enctype="multipart/form-data">

(The value of the action attribute was intially
"{string('{$continuation/id}')}.kont".)

Now my Linotype application works very fine. 

In addition, I made some change to flow.js for Linotype to be
context-independent.

/*
 * The edit action performs the editing subflow.
 */
function edit(id,type,subpage) {

   	var repository = home + "repository/" + type + "/";
	var contextPath = cocoon.request.getContextPath();

	if (id == "template") {
		id = repo.getID(repository);
		repo.copy(repository + "template", repository + id);
		redirect(contextPath + "/private/edit/" + type + "/" + id +
"/");
	} else if ((subpage != undefined) && (subpage != "")) {
   		sendPage("/edit/" + type + "/" + id + "/" + subpage);
	} else {
		var document = repository + id;

		while (true) {
	    	sendPageAndWait("/edit/" + type + "/" + id + "/", {
username: username });
	        var action = cocoon.request.getParameter("action");
	       	if (action == "delete") {
	        	repo.remove(document);
	        	break;
	       	} else {
		        var output = new java.io.FileOutputStream(document +
"/document.xml");
		        process("action/save-" + type,{},output);
		        repo.save(cocoon.request, document);
		    	if (action == "finish") break;
			}	   	
		}

		redirect(contextPath + "/private/" + type);
	}
}

Thank all of you very much.

Ias.

> -----Original Message-----
> From: Tony Collen [mailto:tcollen@neuagency.com] 
> Sent: Friday, May 02, 2003 12:11 PM
> To: cocoon-dev@xml.apache.org
> Subject: RE: [BUG] very weird NPE in JXTemplateTransformer
> 
> 
> On Fri, 2 May 2003 iasandcb@apache-korea.org wrote:
> 
> > I figured out this NPE problem by updating the jars 
> WEB-INF/lib from 
> > cocoon-2.1-M2 latest build. However, after opening some 
> editing window 
> > at http://localhost:8080/linotype/private/edit/news/1/, you 
> meet the 
> > following error message in case of any action i.e. delete, save, or 
> > finish.
> 
> <snip/>
> 
> 
> > Request URI
> >
> > private/edit/news/1/{$continuation/id}.kont
> >
> > cause
> >
> > The continuation ID id} is invalid.
> >
> > request-uri
> >
> > /linotype/private/edit/news/1/%7B$continuation/id%7D.kont
> >
> > Apache Cocoon 2.1-M2-dev
> > -----
> >
> 
> 
> > I found that the action attribute of the form in the edit 
> window was 
> > not valid like this:
> >
> > <form enctype="multipart/form-data" method="POST" 
> > action="{$continuation/id}.kont" name="data"> ...
> 
> 
> Try using action="{$continuation.id}.kont".  I ran into this 
> problem and it ended up being a syntax error in the jxtemplate.
> 
> 
> tony
> 
> 
> --
> Tony Collen
> ICQ: 12410567
> --
> Cocoon: Internet Glue (A Cocoon Weblog) http://manero.org/weblog/
> --
> 
> 


RE: [BUG] very weird NPE in JXTemplateTransformer

Posted by Tony Collen <tc...@neuagency.com>.
On Fri, 2 May 2003 iasandcb@apache-korea.org wrote:

> I figured out this NPE problem by updating the jars WEB-INF/lib from
> cocoon-2.1-M2 latest build. However, after opening some editing window at
> http://localhost:8080/linotype/private/edit/news/1/, you meet the following
> error message in case of any action i.e. delete, save, or finish.

<snip/>


> Request URI
>
> private/edit/news/1/{$continuation/id}.kont
>
> cause
>
> The continuation ID id} is invalid.
>
> request-uri
>
> /linotype/private/edit/news/1/%7B$continuation/id%7D.kont
>
> Apache Cocoon 2.1-M2-dev
> -----
>


> I found that the action attribute of the form in the edit window was not
> valid like this:
>
> <form enctype="multipart/form-data" method="POST"
> action="{$continuation/id}.kont" name="data"> ...


Try using action="{$continuation.id}.kont".  I ran into this problem and
it ended up being a syntax error in the jxtemplate.


tony


--
Tony Collen
ICQ: 12410567
--
Cocoon: Internet Glue (A Cocoon Weblog)
http://manero.org/weblog/
--


RE: [BUG] very weird NPE in JXTemplateTransformer

Posted by ia...@apache-korea.org.
I figured out this NPE problem by updating the jars WEB-INF/lib from
cocoon-2.1-M2 latest build. However, after opening some editing window at
http://localhost:8080/linotype/private/edit/news/1/, you meet the following
error message in case of any action i.e. delete, save, or finish.
-----
Internal Server Error

Message: null

Description: No details available.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

private/edit/news/1/{$continuation/id}.kont

cause

The continuation ID id} is invalid.

request-uri

/linotype/private/edit/news/1/%7B$continuation/id%7D.kont

Apache Cocoon 2.1-M2-dev
-----

I found that the action attribute of the form in the edit window was not
valid like this:

<form enctype="multipart/form-data" method="POST"
action="{$continuation/id}.kont" name="data"> ...

Actually my sitemap.xmap has

    <map:match pattern="edit/news/*/">
     <map:generate src="cocoon://news/{1}.xml"/>
     <map:transform src="stylesheets/news2edit.xslt">
      <map:parameter name="home" value="{global:home}"/>
     </map:transform>
     <map:transform type="jx"/>
     <map:serialize/>
    </map:match>

with

    <map:transformer name="jx" 
      src="org.apache.cocoon.transformation.JXTemplateTransformer" 
      logger="jx.sitemap.transformer"
      pool-min="2" pool-grow="2" pool-max="8"  
    />

but I guess transform by jx doesn't work for edit/news/*/ pattern.

Thanks for any help in advance.

Ias.

> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org]
> Sent: Tuesday, April 29, 2003 9:10 AM
> To: Apache Cocoon
> Subject: [BUG] very weird NPE in JXTemplateTransformer
> 
> 
> This is a pretty weird bug. I've updated linotype to the
> latest and greatest CVS but I get a NPE on this pipeline:
> 
>     <map:match pattern="edit/news/*/">
>      <map:generate src="cocoon://news/{1}.xml"/>
>      <map:transform src="stylesheets/news2edit.xslt">
>       <map:parameter name="home" value="{global:home}"/>
>      </map:transform>
>      <map:transform type="jx"/>
>      <map:serialize/>
>     </map:match>
> 
> 
> 


Re: [BUG] very weird NPE in JXTemplateTransformer

Posted by Pier Fumagalli <pi...@betaversion.org>.
"Stefano Mazzocchi" <st...@apache.org> wrote:

> This is a pretty weird bug. I've updated linotype to the latest and
> greatest CVS but I get a NPE on this pipeline:
> 
>   <map:match pattern="edit/news/*/">
>    <map:generate src="cocoon://news/{1}.xml"/>
>    <map:transform src="stylesheets/news2edit.xslt">
>     <map:parameter name="home" value="{global:home}"/>
>    </map:transform>
>    <map:transform type="jx"/>
>    <map:serialize/>
>   </map:match>

I've noticed a similar one in the JX Generator... Any stacktrace from your
end?

    Pier