I am using WebLogic Workshop9.2 with JDK 1.5. My code is running fine on it. When I tried to run it on Weblogic 10 with JDK 1.6, I am getting following compile time error "Type mismatch: cannot convert from AccessType to XmlAccessType". I have to run with latest JAXB jars but not able to resolve it.
That's because weblogic 9.2 and weblogic 10 have different server classpath.
Chances are that weblogic 10 has a different version of the JAXB jar in its classpath (that it uses by default) but it is not the version expected by your application.
So if you have JAXB jar in your web-inf/lib you need to tell weblogic to use your version of JAXB instead of his.
You do that by adding under WEB-INF the file weblogic.xml with the following content
Hum I remember now that the jdk1.6 has a bigger api than jdk1.5 and it comes with a default impleementation for JAXB.
Maybe at runtime the JAXB from the jdk which is used and it's the version expected by your app.
There is mechanism to override the apis provided by default in the jdk.
so if you have a different version of JAXB you want to use on your file system just tell the jdk to use your version
instead of its default impl.
Step 1: Forget about WebLogic for now, write a small Java application which you can run under Java 6, and have it do the process you're now doing in WebLogic. Make sure it only uses the Java 6 version of JAXB and doesn't use any of the pre-Java-6 JAXB jars.
Step 2: When you have that working, implement the changes you had to make into the code which will run in WebLogic. Deploy that code into WebLogic, without any of the pre-Java-6 JAXB jars.