IBM Support

IV75654: SCHEMAGEN FAILS WITH STACKOVERFLOWERROR IF THE ATTRIBUTE OF THE CLASS HAS A REFERENCE TO THE SAME CLASS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: StackOverflowError
    .
    Stack Trace: Problem encountered during annotation processing;
    see stacktrace below for more information.
    java.lang.StackOverflowError
        at
    java.lang.reflect.WeakCache.expungeStaleEntries(WeakCache.java:1
    99)
        at java.lang.reflect.WeakCache.get(WeakCache.java:113)
        at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:441)
        at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:716)
        at
    com.sun.xml.internal.txw2.ContainerElement._cast(ContainerElemen
    t.java:365)
        at
    com.sun.xml.internal.txw2.ContainerElement._element(ContainerEle
    ment.java:386)
        at
    com.sun.xml.internal.txw2.ContainerElement.addElement(ContainerE
    lement.java:230)
        at
    com.sun.xml.internal.txw2.ContainerElement.invoke(ContainerEleme
    nt.java:157)
        at com.sun.proxy.$Proxy15.complexType(Unknown Source)
        at
    com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator$Namesp
    ace.writeClass(XmlSchemaGenerator.java:910)
        at
    com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator$Namesp
    ace.writeTypeRef(XmlSchemaGenerator.java:781)
        at
    com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator$Namesp
    ace.writeTypeRef(XmlSchemaGenerator.java:752)
        at
    com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator$Namesp
    ace.access$1700(XmlSchemaGenerator.java:496)
        at
    com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator$Namesp
    ace$2.write(XmlSchemaGenerator.java:1074)
        at
    com.sun.xml.internal.bind.v2.schemagen.Tree$Optional.write(Tree.
    java:182)
        at
    com.sun.xml.internal.bind.v2.schemagen.Tree$Repeated.write(Tree.
    java:208)
        at
    com.sun.xml.internal.bind.v2.schemagen.Tree$Group.write(Tree.jav
    a:252)
        at
    com.sun.xml.internal.bind.v2.schemagen.Tree.write(Tree.java:135)
    .
    

Local fix

  • annotating the element which is referring to the same class with
    @XmlElementRef.
    

Problem summary

  • While generating schemagen on a Java class which has an instance
    variable referring to the  same class then XMLSchemagenerator is
    recursively writing the same class resulting in stackoverflow.
    

Problem conclusion

  • The JDK has been updated to validate whether the class is
    already written to avoid recursive writing of the same class.
    .
    This APAR will be fixed in the following Java Releases:
       6    SR16 FP25 (6.0.16.25)
       6 R1 SR8 FP25  (6.1.8.25)
       7 R1 SR3 FP40  (7.1.3.40)
       7    SR9 FP40  (7.0.9.40)
       8    SR2 FP10  (8.0.2.10)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV75654

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-07-31

  • Closed date

    2016-03-24

  • Last modified date

    2016-03-24

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IV78218

Fix information

  • Fixed component name

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSY

       UP

  • R700 PSY

       UP

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
24 March 2016