• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Annotations in Spring framework OXM module with JAXB framework

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I switched to 2.2 jaxb api and it works.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic