File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes JAXB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAXB "AccessType cannot be resolved"" Watch "JAXB "AccessType cannot be resolved"" New topic

JAXB "AccessType cannot be resolved"

Richard Roszak

Joined: Jan 06, 2009
Posts: 27
I’m working on a large project that is using JDK1.5 and it looks as if the xsd’s have generated java files using JAXB 1.0. I’m trying to use JAXB 2.0 to generate new java files where I have modified the xsd’s. I generate the java files but there are compile errors:

“AccessType cannot be resolved” and “The import javax.xml.bind.annotation.AccessType cannot be resolved”

Is it possible to have generated files in the same project using both versions of JAXB?

R Srini
Ranch Hand

Joined: Feb 19, 2010
Posts: 215
Just curious. Is there a specific reason for you to maintain generated source from two different versions? Are there existing consumers whose code will break if you upgrade to 2.0? Or are you worried about breaking your existing code's behaviour if you regenerate all the classes?

If not, you could regenerate all the code for 2.0 - its a one-time deal. Of course, if you need to maintain the original code for compatibility reasons, and have the new code coexist, then that is a different matter.

In case you are using Web Services Developer Pack 2.0, then please look at this: . Look for this section: "Using JAXP 1.3.1_01 in Java WSDP 2.0 with J2SE 5.0". Maybe this is what you need?
I agree. Here's the link:
subject: JAXB "AccessType cannot be resolved"
It's not a secret anymore!