This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Spring and the fly likes issue with Spring OXM integartion with Spring MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "issue with Spring OXM integartion with Spring MVC" Watch "issue with Spring OXM integartion with Spring MVC" New topic

issue with Spring OXM integartion with Spring MVC

Amitosh Mishra
Ranch Hand

Joined: Feb 11, 2010
Posts: 49
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

Joined: Feb 05, 2001
Posts: 17271

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)


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

Joined: Feb 11, 2010
Posts: 49
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.

Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

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.


[How To Ask Questions][Read before you PM me]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: issue with Spring OXM integartion with Spring MVC
It's not a secret anymore!