Skip to main content

JAXB Umarshallexception - JAX-WS SOAP Webservice - since JDK 1.6.0_14

2 replies [Last post]
javanet007
Offline
Joined: 2008-10-24
Points: 0

Hi,

I've implemented a SOAP Webservice Client with JAX-WS, compiled and launched with JDK 1.6.0_11. Last week we have upgraded our systems to JDK 1.6.0_16.

After starting the program following exception will be thrown:
javax.xml.bind.UnmarshalException: tried to access class com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const from class ...

Our software is working properly up to JDK 1.6.0_13. Since version 1.6.0_14 this exception will be dumped.

Has anyone an idea what we can do?
Thank you in advance.

Regards,
Conrad

The whole stack:
Exception in thread "main" com.sun.xml.internal.ws.encoding.soap.DeserializationException: Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: tried to access class com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const from class org.netbeans.xml.schema.schema_service.ChildTableObjects$JaxbAccessorF_updateChecker]
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy31.getChildTableObjectsForTableName(Unknown Source)
at test.Main.main(Main.java:50)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: tried to access class com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const from class org.netbeans.xml.schema.schema_service.ChildTableObjects$JaxbAccessorF_updateChecker]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:414)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:351)
at com.sun.xml.internal.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:109)
at com.sun.xml.internal.bind.api.Bridge.unmarshal(Bridge.java:222)
at com.sun.xml.internal.ws.client.sei.ResponseBuilder$RpcLit$PartBuilder.readResponse(ResponseBuilder.java:656)
at com.sun.xml.internal.ws.client.sei.ResponseBuilder$RpcLit.readResponse(ResponseBuilder.java:615)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
... 4 more
Caused by: javax.xml.bind.UnmarshalException: tried to access class com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const from class org.netbeans.xml.schema.schema_service.ChildTableObjects$JaxbAccessorF_updateChecker
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:631)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:236)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:231)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.handleGenericError(Loader.java:227)
at com.sun.xml.internal.bind.v2.runtime.reflect.Accessor.receive(Accessor.java:165)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.endElement(UnmarshallingContext.java:507)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.endElement(InterningXmlVisitor.java:66)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:206)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:170)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:349)
... 9 more
Caused by: javax.xml.bind.UnmarshalException: tried to access class com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const from class org.netbeans.xml.schema.schema_service.ChildTableObjects$JaxbAccessorF_updateChecker
... 19 more
Java Result: 1

The whole stack:

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gbrian
Offline
Joined: 2006-07-13
Points: 0

Hi,

I get the same problem three years later! :)

javax.xml.bind.UnmarshalException: tried to access class com.sun.xml.internal.bind.v2.runtime.reflect.opt.Const from class com.hotelopia.xml.classes.FHotelValuedAvailRS$ServiceHotel$JaxbAccessorF_outPrice

In my case I was using an older version of JABX libraries. I've resolved it using the latest jabx library.

I hope it could help someone.

This reply gave me the clue:
http://comments.gmane.org/gmane.text.xml.saxon.help/11020
"
I (think) I've managed to track it down to a JDK issue as the Linux jdk
was different to my windows jdk (update 14 vs update7).
"

viggonavarsete
Offline
Joined: 2007-06-17
Points: 0

Hi,

have you figured out what the problem is, and a solution to it? I've also experienced similar problems. We have a few SOAP Web services that were working perfectly well in JDK 1.6.0_13, but after upgrade to 1.6.0_16 they've stopped working.
I'm getting errors like this:
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:148)
... 58 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 46 counts of IllegalAnnotationExceptions

I've doing contract-first development, so I have a wsdl that I've generated the services from.
I've used Enunciate to expose my web services, and Enunciate-Ryan suggests that the jaxws implementation has changed since I generated my services. He suggests to regenerate the services with the jaxws bundled with jdk 1.6.0_16, and that's what I will try to do now.

But I'm happy for all input related to this:)