• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

issue with Spring OXM integartion with Spring MVC

 
Amitosh Mishra
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i am trying to configure the spring oxm in my test project

my pom file is like below


build is proper and i am able to see the spring-oxm-3.0.5.RELEASE.jar placed properly in generated war file.

but at application startup i am getting following error


I am not able to understand why this error is happenning.
please provide necessary help

Thanks in advance.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, there are parts you didn't post.

But the main cause is

"Caused by: java.lang.ClassNotFoundException: org.springframework.oxm.jaxb.Jaxb2Marshaller"

So that class is not in your classpath. That is all it ever means, so even if you think you see a jar file that would have that class, it doesn't. There is nothing in your classpath including jars that contain that class, otherwise the jvm would have found it. Maybe you have two versions of it in your classpath, that might cause the exception, but highly unlikely.

But why do you need JaxB, in your pom you only are looking for Jackson json library, I don't see a dependency on JAXB classes, or are they now part of the JDK?

Anyway, it needs that class cause you have a bean defined as marshaller in your dispatcher servlet configuration Spring xml file (Which is what you didn't post)

Mark
 
Amitosh Mishra
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark..
i have posted the pom and error stack trace let me know if you want some thing else also.
I am not clear what you are saying.
the class is present in war and i am able to navigate to the class also..
i am trying to run this on tomcat from eclipse.

Regards
Amitosh
 
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
Are you using STS or vanilla eclipse? Check your tomcat deploy directory for the correct lib. It must not be there if you are seeing this error. Often times you can clean this directory and re-publish and that will sometimes fix the problem.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic