2

I have been testing the application on my local jboss server EAP 7.0 and its work fine but when the same war is deployed on production it throws

Factory method 'jacksonObjectMapper' threw exception; nested exception is java.lang.ClassCastException: com.fasterxml.jackson.datatype.jdk8.Jdk8Module cannot be cast to com.fasterxml.jackson.databind.Module

Environment is same on both local and production, as per current analysis and R & D found this Exclude provided jackson version from JBoss 7 EAP

Stack: Java 1.8, Spring Boot

Can't R & D on production and issue is not replicating on test. Anything missing?

fawad
  • 141
  • 2
  • 19
  • *"Anything missing?"* How are we supposed to answer that without seeing your system, your code, your way of deployment or... anything else? – Ben Jun 20 '18 at 13:15
  • @Ben to me its seems like configuration issue ,we have been deploying the application through jboss admin panel. – fawad Jun 20 '18 at 13:22
  • Yes but we also don't have access to your configuration... we don't even know what your application does. We have zero knowledge about your problem, so how are we supposed to give you any better insight than coworkers or anyone else who *actually knows your project*? – Ben Jun 20 '18 at 13:23
  • does it seems to you that it can be resolved by excluding modules from jboss as mentioned in link i shared above – fawad Jun 20 '18 at 13:28

1 Answers1

4

I was able to resolve this error by adding in jboss-deployment-structure.xml

<module name="com.fasterxml.jackson.datatype.jackson-datatype-jdk8" />
<module name="com.fasterxml.jackson.datatype.jackson-datatype-jsr310" />

Antares42 answer in below mentioned reference helped me to solve the issue

Exclude provided jackson version from JBoss 7 EAP

fawad
  • 141
  • 2
  • 19