[ https://issues.apache.org/jira/browse/COCOON-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478723 ]
robert.onslow commented on COCOON-2021: --------------------------------------- The problem lies in this matcher: <map:match pattern="*.xhtml"> <map:select type="request-method"> <map:when test="GET"> <map:generate type="serverpages" src="xsp/{1}.xsp"/> <map:transform src="xsl/{1}.xsl"/> <map:serialize type="xhtml"/> </map:when> <map:when test="POST"> <map:generate type="stream"/> <map:transform type="writeDOMsession"> <map:parameter name="dom-name" value="postdata"/> <map:parameter name="dom-root-element" value="n1:dataFields"/> </map:transform> <map:serialize/> </map:when> </map:select> </map:match> When the POST comes through, the WriteDOMSessionTransformer is not having its setup() method invoked. Is this expected behaviour? > NPE in WriteDOMSessionTransformer > --------------------------------- > > Key: COCOON-2021 > URL: https://issues.apache.org/jira/browse/COCOON-2021 > Project: Cocoon > Issue Type: Bug > Components: * Cocoon Core > Affects Versions: 2.1.10 > Reporter: robert.onslow > > The following POST thru' a Stream generator generates an NPE: > POST: > <?xml version="1.0" encoding="UTF-8"?> > <n1:dataFields xmlns:xscript="http://apache.org/xsp/xscript/1.0" > xmlns:soap="http://apache.org/xsp/soap/3.0" > xmlns:xsp-request="http://apache.org/xsp/request/2.0" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:n5="http://xlegal.co.uk/courts/schemas/parties" > xmlns:n4="http://xlegal.co.uk/courts/schemas/case" > xmlns:n3="http://xlegal.co.uk/courts/schemas/objects" > xmlns:n2="http://xlegal.co.uk/courts/schemas/chron" > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:n1="http://xlegal.co.uk/XPDLEngine/" > xmlns:xpdle="http://xlegal.co.uk/XPDLEngine/" > xmlns:xforms="http://www.w3.org/2002/xforms"> > <newpkg_df5> > <n2:EventList caseNumber="HC04C1234"> > <n2:Event eventOfType="documentFiled" eventTime="10:00" > eventDate="2007-01-01"> > <n3:StatCase dref="http://" apparentDate="2007-01-01" > statCaseOfType="Claim Form"> > </n3:StatCase> > </n2:Event> > </n2:EventList> > </newpkg_df5> > <newpkg_df3>HC04C1234</newpkg_df3> > <newpkg_df4> > <n4:Case caseNumber="HC04C1234"> > <n5:Parties> > <n5:PartyGroup partyGroupOfType="Claimant"> > <n5:Party>NEW CLAIMANT</n5:Party> > </n5:PartyGroup> > <n5:PartyGroup partyGroupOfType="Defendant"> > <n5:Party>NEW DEFENDANT</n5:Party> > </n5:PartyGroup> > </n5:Parties> > </n4:Case> > </newpkg_df4> > </n1:dataFields> > Sitemap: > <map:generate type="stream"/> > <map:transform type="writeDOMsession"> > <map:parameter name="dom-name" value="postdata"/> > <map:parameter name="dom-root-element" value="n1:dataFields"/> > </map:transform> > <map:serialize/> > Exception: > java.lang.NullPointerException > at > org.apache.cocoon.transformation.WriteDOMSessionTransformer.storePrefixMapping(WriteDOMSessionTransformer.java:186) > at > org.apache.cocoon.transformation.WriteDOMSessionTransformer.startPrefixMapping(WriteDOMSessionTransformer.java:123) > at > org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping(Unknown > Source) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > Source) > The namespaces appear to be correct in the POST. The error is still present > when a different dom-root-element is used. > Is the stream generator is generating a startPrefixMapping(null, null) when > the unqualified elements appear? > Robert -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.