[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grégory Joseph updated MAGNOLIA-2653:
-------------------------------------

    Fix Version/s: 4.1.1

> MagnoliaV2Filter emits bogus and unbalanced sv:value element - may cause 
> StackOverflow on large imports
> -------------------------------------------------------------------------------------------------------
>
>                 Key: MAGNOLIA-2653
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2653
>             Project: Magnolia
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.3
>         Environment: JDK1.6, WIn2000 and Suse Linux
>            Reporter: Henryk Paluch
>            Assignee: Philipp Bärfuss
>             Fix For: 3.6.x, 4.0.2, 4.1.1
>
>         Attachments: dms.Test.xml, M2FilterMetaBugTest.java, 
> MagnoliaV2FilterSvValueFix.diff, MagnoliaV2FilterTestCase.diff, 
> v2filter-out-14551.xml
>
>
> MagnoliaV2Filter (user also when importing repository) data emits bogus 
> sv:value and unbalanced sv:value tag. When importing large repositories (3GB 
> with thousands of Documents) this may cause stack overflow due extreme 
> element nesting:
> Caused by: java.lang.StackOverflowError
>       at java.util.HashMap.get(HashMap.java:300)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:93)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:97)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:97)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:97)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:97)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:97)
>       at 
> org.apache.jackrabbit.core.xml.NamespaceContext.getURI(NamespaceContext.java:97)
> ...
> (thousands of lines)
> It turned out, that this overflow is caused by MagnoliaV2Filter when 
> replacing jcr:primary of MetataData type.
> Here is excerpt from input data:
>   <sv:node sv:name="MetaData">
>     <sv:property sv:name="jcr:primaryType" sv:type="Name">
>       <sv:value>mgnl:metaData</sv:value>
>     </sv:property>
>     <sv:property sv:name="jcr:created" sv:type="Date">
>       <sv:value>2009-03-09T12:20:25.822+01:00</sv:value>
>     </sv:property>
> Which is by this filter transormed into:
>   <sv:node sv:name="MetaData">
>     <sv:property sv:name="jcr:primaryType" sv:type="Name">
>       <sv:value>mgnl:metaData</sv:value>
>     </sv:property>
>     
>       <sv:value>mgnl:metaData
>     
>     <sv:property sv:name="jcr:created"
>         sv:type="Date">
>       <sv:value>2009-03-09T12:20:25.822+01:00</sv:value>
>     </sv:property>
>  
> There is a clear difference - an spurious (and unclosed) 
> <sv:value>mgnl:metaData element
> I'm supposed that its startElement() method is missing somehting like
>   if (skipProperty && qName.equals("sv:value") ){
>     skipValue = true;
>    return;
>   }
> I shall try and send possible fix hopefully in few days.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to