aspose file tools*
The moose likes Spring and the fly likes Annotations in Spring framework OXM module with  JAXB framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Annotations in Spring framework OXM module with  JAXB framework " Watch "Annotations in Spring framework OXM module with  JAXB framework " New topic
Author

Annotations in Spring framework OXM module with JAXB framework

Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
Hi all

I am totally new to OXM module and going to use it with JAXB framework in my application
for which i download spring-framework oxm 3.0 jar and added to my build path and rebuilt the project.
Now i want to add oxm annotations like @XmlRoot to my bean( to persist) but i am not able to see its
package - javax.xml.bind... in my space. I mean, i am not able to use JAXB annotations here.

Am i missing anything here?
Thanks.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Yes, you are supposed to use JAXB annotations, which are defined by JAXB, in a JAXB jar file.

Spring doesn't provide the definition of the annotations, they are not supposed to.

They just provide classes that act on them, well in JAXB case just look for the what do you call it that JAXB uses. ObjectFactory I think, when you set up your marshaller/unmarshaller bean???

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
Thanks Mike

I added jaxb-api and jaxb-impl.jars to my project and i am running on jdk 5.
Versions i picked for jaxb2 were 1.0.6
and sprng oxm jar are 3.0.0
I added those to me project build path ,still i amnot able to see annotations definition.Could it be wrong version of jaxb jars.
Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
I switched to 2.2 jaxb api and it works.
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Annotations in Spring framework OXM module with JAXB framework