Cannot use class from jackson .jar file

Hi all,

I'm developing a plugin for Team City and I wish to use org.springframework.web.servlet.view.json.MappingJacksonJsonView in a servlet to return some json. I've added jackson-core-asl-1.9.8.jar and jackson-mapper-asl-1.9.8.jar (which in particular contains org/codehaus/jackson/map/ObjectMapper.class) to the module's dependencies in IDEA and try to create it with
MappingJacksonJsonView view = new MappingJacksonJsonView();

Whilst the plugin compiles fine, when I attempt to fetch the json from the servlet using ajax I get a 500 error with the following at the top of the stack trace:
I get  java.lang.NoClassDefFoundError: org/codehaus/jackson/map/ObjectMapper.

Is there anyone who can give me a shove in the right direction please?



Comment actions Permalink


Seems like classloader hell issue.

You might need to put the jars directly into webapps\ROOT\WEB-INF\lib

Comment actions Permalink

Thanks for your reply, we have simplified our UI and avoided having to use external .jar files but thanks for your help!


Please sign in to leave a comment.