Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1254

org.modeshape.jcr.AbstractJcrNode.toString() causes out of memory if node contains large binary property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.5.1.GA, 2.6.0.Final
    • 2.6.0.Beta2
    • JCR
    • None

      org.modeshape.jcr.AbstractJcrNode.toString() causes out of memory if node contains large binary property, because it is trying to include the value of the property in the string representation.

      Here is the partial stack trace:

      Caused by: java.lang.OutOfMemoryError: Java heap space
      	at java.util.Arrays.copyOf(Arrays.java:2786)
      	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
      	at org.modeshape.common.util.IoUtil.readBytes(IoUtil.java:66)
      	at org.modeshape.graph.property.basic.StringValueFactory.create(StringValueFactory.java:287)
      	at org.modeshape.graph.property.basic.StringValueFactory.create(StringValueFactory.java:266)
      	at org.modeshape.graph.property.basic.StringValueFactory.create(StringValueFactory.java:56)
      	at org.modeshape.graph.property.basic.AbstractValueFactory.create(AbstractValueFactory.java:121)
      	at org.modeshape.jcr.AbstractJcrProperty.toString(AbstractJcrProperty.java:322)
      	at java.lang.String.valueOf(String.java:2826)
      	at java.lang.StringBuffer.append(StringBuffer.java:219)
      	at org.modeshape.jcr.AbstractJcrNode.toString(AbstractJcrNode.java:2235)
      

      This node has a large Binary property.

            rhauch Randall Hauch (Inactive)
            jonathandfields_jira Jonathan Fields (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: