-
Bug
-
Resolution: Fixed
-
Major
-
3.6.3
-
None
-
JDK1.6, WIn2000 and Suse Linux
-
-
Yes
-
Empty show more show less
-
Yes
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.