Skip to main content

Strange JAXB Solaris Failure

6 replies [Last post]
wpeterson
Offline
Joined: 2007-09-25
Points: 0

Hi,

We've got a very simple JAXB solution for converting a few objects to/from XML in one of our projects.

We've been running our JAXB classes on Linux and Windows for quite some time, but are seeing a strange failure on Solaris.

When we try to marshal our JAXB object, we get the following stack trace:

weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
java.lang.ArrayIndexOutOfBoundsException
at
com.sun.xml.bind.v2.util.CollisionCheckStack.findDuplicate(CollisionCheckStack.java:112)
at
com.sun.xml.bind.v2.util.CollisionCheckStack.push(CollisionCheckStack.java:53)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.pushObject(XMLSerializer.java:471)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:521)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:276)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:461)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:221)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:77)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:221)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:77)

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jhonmarvi
Offline
Joined: 2013-01-01
Points: 0

Thanks for sharing...!

kohsuke
Offline
Joined: 2003-06-09
Points: 0

This looks like a bug we fixed in JAXB RI 2.1.2. Are you using 2.0.x?

clarktiff
Offline
Joined: 2012-12-07
Points: 0

To kohsuke,

I am having this same issue, however, I am using Weblogic 10 which installs with JAXB 2.0.5. Is there an updated 2.0.5 version we can use that includes the fix on the CollisionCheckStack class.
Please advise. Thanks!

wpeterson
Offline
Joined: 2007-09-25
Points: 0

Found this bug using 2.1.3.

We tried using 2.1.5 this morning with the same results.

What was the root of the issue for 2.0.x? Any clues as to diagnosing this?

wpeterson
Offline
Joined: 2007-09-25
Points: 0

I found this on Solaris Sparc64 running BEA Jrockit with WLS 10.

I swapped out JRockit for Sun's JVM and this problem goes away.

wpeterson
Offline
Joined: 2007-09-25
Points: 0

This occurs for all of our 4-5 JAXB objects in the same fashion, so it's not related to the input data as far as I can tell. I also make that judgement since these classes work fine on the other two platforms.