When I try to create a context:
JAXBContext jc =
JAXBContext.newInstance("com.example.oms:com.example.css");
I get a runtime exception:
Failed to initialize JAXP 1.3 DatatypeFactory classCaused by:
...
java.lang.ClassNotFoundException:
com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
...
I used to be able to get around this by putting ${java.home}/rt.jar on the
classpath. However, now when I do that, I am getting this error:
java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor5
cannot access its superclass sun.reflect.ConstructorAccessorImpl
What is the proper way to set the JAXP 1.3 DatatypeFactory implementation and
put it on the classpath?
Thanks,
Mark