wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAXB "AccessType cannot be resolved"" Watch "JAXB "AccessType cannot be resolved"" New topic
Author

JAXB "AccessType cannot be resolved"

Richard Roszak
Greenhorn

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?

Thanks
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: http://java.sun.com/webservices/docs/2.0/ReleaseNotes.html#RedistributableComponents . 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: http://aspose.com/file-tools
 
subject: JAXB "AccessType cannot be resolved"
 
Similar Threads
Java Migration from 1.4 to 1.6
JAXB namespace issue
JAXB in eclipse
Type mismatch: cannot convert from AccessType to XmlAccessType
Unmarshalling large files with JAXB