You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Andreas Veithen (Created) (JIRA)" <ji...@apache.org> on 2011/10/15 17:17:11 UTC

[jira] [Created] (AXIOM-393) Premature END_DOCUMENT event generated by OMStAXWrapper

Premature END_DOCUMENT event generated by OMStAXWrapper
-------------------------------------------------------

                 Key: AXIOM-393
                 URL: https://issues.apache.org/jira/browse/AXIOM-393
             Project: Axiom
          Issue Type: Bug
          Components: DOOM, LLOM
    Affects Versions: 1.2.12
            Reporter: Andreas Veithen
            Assignee: Andreas Veithen
            Priority: Minor
             Fix For: 1.2.13


In some cases, the XMLStreamReader returned by OMContainer#getXMLStreamReader generates a premature END_DOCUMENT event.

This occurs when all of the following conditions are met:

1. Caching is turned off.
2. The subtree contains elements that have the same name as the element on which getXMLStreamReader is invoked (example:. <element><element><element/><element/></element></element>).
3. The subtree is partially built.

The root cause can be traced back to an incorrect fix for AXIOM-151 which introduced the following code in OMStAXWrapper (see r552397):

//this is a potential place for bugs
//we have to test if the root node of this parser
//has the same name for this test
if (currentEvent == START_ELEMENT &&
        (parser.getLocalName().equals(((OMElement)rootNode).getLocalName()))) {
    ++depth;
} else if (currentEvent == END_ELEMENT   &&
       (parser.getLocalName().equals(((OMElement)rootNode).getLocalName())) ) {                                      
    --depth;
    if (depth < 0) {
        state = COMPLETED;
    }
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Resolved] (AXIOM-393) Premature END_DOCUMENT event generated by OMStAXWrapper

Posted by "Andreas Veithen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIOM-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIOM-393.
-----------------------------------

    Resolution: Fixed
    
> Premature END_DOCUMENT event generated by OMStAXWrapper
> -------------------------------------------------------
>
>                 Key: AXIOM-393
>                 URL: https://issues.apache.org/jira/browse/AXIOM-393
>             Project: Axiom
>          Issue Type: Bug
>          Components: DOOM, LLOM
>    Affects Versions: 1.2.12
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.13
>
>
> In some cases, the XMLStreamReader returned by OMContainer#getXMLStreamReader generates a premature END_DOCUMENT event.
> This occurs when all of the following conditions are met:
> 1. Caching is turned off.
> 2. The subtree contains elements that have the same name as the element on which getXMLStreamReader is invoked (example:. <element><element><element/><element/></element></element>).
> 3. The subtree is partially built.
> The root cause can be traced back to an incorrect fix for AXIOM-151 which introduced the following code in OMStAXWrapper (see r552397):
> //this is a potential place for bugs
> //we have to test if the root node of this parser
> //has the same name for this test
> if (currentEvent == START_ELEMENT &&
>         (parser.getLocalName().equals(((OMElement)rootNode).getLocalName()))) {
>     ++depth;
> } else if (currentEvent == END_ELEMENT   &&
>        (parser.getLocalName().equals(((OMElement)rootNode).getLocalName())) ) {                                      
>     --depth;
>     if (depth < 0) {
>         state = COMPLETED;
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[jira] [Commented] (AXIOM-393) Premature END_DOCUMENT event generated by OMStAXWrapper

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIOM-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128303#comment-13128303 ] 

Hudson commented on AXIOM-393:
------------------------------

Integrated in ws-axiom-trunk #620 (See [https://builds.apache.org/job/ws-axiom-trunk/620/])
    Fixed AXIOM-393.

veithen : 
Files : 
* /webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
* /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/element/TestGetXMLStreamReaderWithoutCachingPartiallyBuilt.java

                
> Premature END_DOCUMENT event generated by OMStAXWrapper
> -------------------------------------------------------
>
>                 Key: AXIOM-393
>                 URL: https://issues.apache.org/jira/browse/AXIOM-393
>             Project: Axiom
>          Issue Type: Bug
>          Components: DOOM, LLOM
>    Affects Versions: 1.2.12
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.13
>
>
> In some cases, the XMLStreamReader returned by OMContainer#getXMLStreamReader generates a premature END_DOCUMENT event.
> This occurs when all of the following conditions are met:
> 1. Caching is turned off.
> 2. The subtree contains elements that have the same name as the element on which getXMLStreamReader is invoked (example:. <element><element><element/><element/></element></element>).
> 3. The subtree is partially built.
> The root cause can be traced back to an incorrect fix for AXIOM-151 which introduced the following code in OMStAXWrapper (see r552397):
> //this is a potential place for bugs
> //we have to test if the root node of this parser
> //has the same name for this test
> if (currentEvent == START_ELEMENT &&
>         (parser.getLocalName().equals(((OMElement)rootNode).getLocalName()))) {
>     ++depth;
> } else if (currentEvent == END_ELEMENT   &&
>        (parser.getLocalName().equals(((OMElement)rootNode).getLocalName())) ) {                                      
>     --depth;
>     if (depth < 0) {
>         state = COMPLETED;
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org