Note that there are some explanatory texts on larger screens.

plurals
  1. POClassNotFound exception using Jackson ObjectMapper
    primarykey
    data
    text
    <p>I have a Spring 3 MVC app that I am setting up some ajax actions for. My controller action looks like this:</p> <pre><code>@RequestMapping(value="add", method=RequestMethod.POST) @Secured("ROLE_USER") @ResponseStatus(HttpStatus.CREATED) public @ResponseBody Plan addPlan(@RequestBody Plan plan, Principal principal) { //Save the plan } </code></pre> <p>When I post the Plan data from my browser the app throws a ClassNotFound exception:</p> <pre><code>java.lang.ClassNotFoundException: org.joda.time.ReadableInstant not found by jackson-mapper-asl [176] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787) at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) </code></pre> <p>The Plan object itself does not contain any joda-date types. Though it contains a collection of objects that do. Originally I was pulling in the joda-date jar via my DOA jar but the error persists even if I add a direct dependency to my web project's pom.xml. I'm using the joda classes elsewhere in this project without any issue.</p> <p><strong>Additional information</strong> Here are the relevant dependencies from my web pom.xml:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;joda-time&lt;/groupId&gt; &lt;artifactId&gt;joda-time&lt;/artifactId&gt; &lt;version&gt;2.0&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt; &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt; &lt;version&gt;1.9.3&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt; &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt; &lt;version&gt;1.9.3&lt;/version&gt; &lt;/dependency&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload