[
https://issues.apache.org/jira/browse/COCOON-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jörg Heinicke closed COCOON-2021.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.2-dev (Current SVN)
2.1.11-dev (Current SVN)
Adapted WriteDOMSessionTransformer so that NPE is prevented in case session is
not available.
> 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
> Assigned To: Jörg Heinicke
> Fix For: 2.1.11-dev (Current SVN), 2.2-dev (Current SVN)
>
>
> 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.