You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "robert.onslow (JIRA)" <ji...@apache.org> on 2007/03/06 23:15:24 UTC

[jira] Created: (COCOON-2021) NPE in WriteDOMSessionTransformer

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.


[jira] Reopened: (COCOON-2021) NPE in WriteDOMSessionTransformer

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörg Heinicke reopened COCOON-2021:
-----------------------------------


> 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
>
> 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.


[jira] Closed: (COCOON-2021) NPE in WriteDOMSessionTransformer

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Closed: (COCOON-2021) NPE in WriteDOMSessionTransformer

Posted by "Jason Johnston (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Johnston closed COCOON-2021.
----------------------------------

    Resolution: Invalid

Closing at the request of the issue reporter.

> 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.


[jira] Commented: (COCOON-2021) NPE in WriteDOMSessionTransformer

Posted by "robert.onslow (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Assigned: (COCOON-2021) NPE in WriteDOMSessionTransformer

Posted by "Jörg Heinicke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COCOON-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörg Heinicke reassigned COCOON-2021:
-------------------------------------

    Assignee: Jörg Heinicke

> 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
>
> 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.


[jira] Commented: (COCOON-2021) NPE in WriteDOMSessionTransformer

Posted by "robert.onslow (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COCOON-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478777 ] 

robert.onslow commented on COCOON-2021:
---------------------------------------

Sorry - please close
I had failed to set up a session with a <map:act type="session"> around my components in the sitmap. Looking in the cocoon log in WEB-INF/logs showed that setup() was being called, but was failing due to the lack of a session.

Robert

> 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.