Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean Creation Exception with Spring OXM and JAXB2

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
This is my first experience with Spring OXM and JAXB 2. (Jdk 5, Tomcat 6) Now i have been trying for few hours to make it work but its not at all .
I keep getting 'Bean Creation Exception' with jaxb2Marshaller Bean .
Someone please help me what is going on.
1. I have spring-oxm-3.0, jaxb-api 2.2 ,jaxb-impl 2.2 api and tools.jar (some forums suggested) added.
2. Annotated Class -Person ( to persist) and Marshaller class OxMapper
3. Now in applicationcontext.xml - i added namespace on top and





Error i get is ---------



I tried so many variations like creation of marshaller bean using <bean> tag. But nothing helps.
Please somebody help me.
 
Atul Kotwale
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your configuration looks fine to me but in log you are getting class not found exception. It seems that some jars are missing. I would suggest to use maven for building project.
 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Just another question -
Could it e my bean class /entity class wrongly annotated leading to same BeanCreationException.
My entity is
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually annotate the getters not the setters, but like was already said that is not your problem. You are missing dependencies on the classpath. You have a ClassNotFound exception.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic