Anderson
Anderson

Reputation: 13

Problem with JAXB and Hibernate3 illegal access

I'm migrating a system from hibernate2 to hibernate 3 and i'm getting the following error:

java.lang.IllegalAccessError: tried to access method com.sun.xml.bind.DatatypeConverterImpl.<init>()V from class com.sun.xml.bind.DefaultJAXBContextImpl
 at com.sun.xml.bind.DefaultJAXBContextImpl.<init>(DefaultJAXBContextImpl.java:73)
 at com.sun.xml.bind.ContextFactory.createContext(ContextFactory.java:39)

I have already searched in the hibernate migration guides and found nothing on this topic. Searching on google also proved no good. This error has been pesking me for some time already and I would like any kind of assistance.

Thanks for you attention.

Upvotes: 1

Views: 1195

Answers (1)

Marek Sebera
Marek Sebera

Reputation: 40681

When you look to code in here

http://www.docjar.com/html/api/com/sun/xml/internal/bind/DatatypeConverterImpl.java.html

You can see that constructor is protected, so for retrieving instance you should address theInstance (line 62), which has public access.

Upvotes: 1

Related Questions