• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

issue with Spring OXM integartion with Spring MVC

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic