title: JsonMappingException$Reference not found when calling a RESTful web service using JBoss 7 and RESTeasy
body: <p>I have created a RESTful web service producing JSON content with JAX-RS, it uses some JPA entities, it runs on JBoss 7.1.3.</p>
  
  <p>I get the following error message when calling this web service:</p>
  
  <blockquote>
    <p>13:23:11,834 ERROR
    [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/*****WebServices].[com.******.******.rest.config.ApplicationConfig]]
    (http-/127.0.0.1:8080-2) "Servlet.service()" for the servlet
    com.******.******.rest.config.ApplicationConfig threw an
    exception: java.lang.ClassNotFoundException:
    org.codehaus.jackson.map.JsonMappingException$Reference from [Module
    "org.codehaus.jackson.jackson-mapper-asl:main" from local module
    loader @6514af16 (roots:
    C:**********\jboss-as-7.1.3.Final-bundled4STR\modules)]  at
    org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
      at
    org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
      at
    org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
      at
    org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
      at
    org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
      at
    org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:166)
      at
    org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
      at
    org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
      at
    org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150)
      at
    org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)</p>
  </blockquote>
  
  <p>Before trying <a href="https://blog.avisi.nl/2013/05/07/jboss-as7-1-and-resteasy-upgrading-jackson/" rel="nofollow">this solution</a>, I replaced modules\org\codehaus\jackson\jackson-mapper-asl\main\jackson-mapper-asl-1.9.2.jar by a more recent version, I tried with the version 1.9.3 and with the version 1.9.7. It didn't help.</p>
  
  <p>I added org.codehaus.jackson.jackson-mapper-asl into jboss-deployment-structure.xml but it didn't solve my problem.</p>
  
  <p>I know that JBoss includes RESTeasy since its seventh version, at least one provider uses jackson: org.jboss.resteasy.resteasy-jackson-provider.</p>
  
  <p>This kind of error can happen when different versions of the same libraries are used to compile and to run a project but I don't find the culprit. I don't use jackson in my own code.</p>
  
  <p>Does this bug come from JBoss? Is it fixed in a later version? Switching to WildFly isn't an option.</p>