Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3264

Generated toString method can throws OutOfMemoryError

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.2.RELEASE
    • Fix Version/s: 1.2.3.RELEASE
    • Component/s: @ CORE
    • Labels:
    • Environment:
      Ubuntu 12.04, JDK 1.6.0_33, Maven 3.0.4, Postgres 9

      Description

      Generated toString method:

      public String TrgpDocumento.toString()

      { return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE); }

      Generated error:

      java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOf(Arrays.java:2882)
      at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
      at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
      at java.lang.StringBuffer.append(StringBuffer.java:224)
      at org.apache.commons.lang3.builder.ToStringStyle.appendFieldSeparator(ToStringStyle.java:1503)
      at org.apache.commons.lang3.builder.ToStringStyle.appendFieldEnd(ToStringStyle.java:1526)
      at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:439)
      at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
      at es.gva.cit.regproy.web.TrgpTipoSoporte_Roo_ToString.ajc$interMethod$es_gva_cit_regproy_web_TrgpTipoSoporte_Roo_ToString$es_gva_cit_regproy_web_TrgpTipoSoporte$toString(TrgpTipoSoporte_Roo_ToString.aj:13)
      at es.gva.cit.regproy.web.TrgpTipoSoporte.toString(TrgpTipoSoporte.java:1)
      at java.lang.String.valueOf(String.java:2826)
      at java.lang.StringBuffer.append(StringBuffer.java:219)
      at org.apache.commons.lang3.builder.ToStringStyle.appendDetail(ToStringStyle.java:586)
      at org.apache.commons.lang3.builder.ToStringStyle.appendInternal(ToStringStyle.java:550)
      at org.apache.commons.lang3.builder.ToStringStyle.append(ToStringStyle.java:436)
      at org.apache.commons.lang3.builder.ToStringBuilder.append(ToStringBuilder.java:848)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:522)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:683)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:282)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:145)
      at es.gva.cit.regproy.web.TrgpDocumentoAnexado_Roo_ToString.ajc$interMethod$es_gva_cit_regproy_web_TrgpDocumentoAnexado_Roo_ToString$es_gva_cit_regproy_web_TrgpDocumentoAnexado$toString(TrgpDocumentoAnexado_Roo_ToString.aj:13)
      at es.gva.cit.regproy.web.TrgpDocumentoAnexado.toString(TrgpDocumentoAnexado.java:1)
      at java.lang.String.valueOf(String.java:2826)
      at java.lang.StringBuilder.append(StringBuilder.java:115)
      at java.util.AbstractCollection.toString(AbstractCollection.java:422)
      at org.hibernate.collection.PersistentSet.toString(PersistentSet.java:333)
      at java.lang.String.valueOf(String.java:2826)
      at java.lang.StringBuffer.append(StringBuffer.java:219)

      I attach the db managed entity.

      Java heap space can be produced by cycling references between entities ?

        Attachments

        1. patch.diff
          5 kB
        2. patch.diff
          1 kB
        3. registro_proyectos_2012-09-03.zip
          253 kB
        4. TrgpDocumento_Roo_DbManaged.aj
          9 kB

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            mmartinez Mario Martínez Sánchez - gvNIX - DISID
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: