java.lang.NoClassDefFoundError:com/fasterxml/jackson/databind/JsonMappingException
at com.sitech.boss.uniimpl.recharge.model.BaseMsgQryIn.generateJSONString(BaseMsgQryIn.java:28)
at com.sitech.echd.esb.AbstractUniBase.callJsonEsbBefore(AbstractUniBase.java:218)
at com.sitech.echd.esb.AbstractUniBase.callEsbBefore(AbstractUniBase.java:108)
at com.sitech.echd.esb.AbstractUniBase.callEsb(AbstractUniBase.java:90)
at com.sitech.echd.esb.AbstractUniBase.callEsb(AbstractUniBase.java:65)
at com.sitech.boss.service.recharge.BaseMsgQryServiceImpl.qryBaseMsg(BaseMsgQryServiceImpl.java:49)
at com.sitech.boss.rest.recharge.BaseMsgQryRest.execute(BaseMsgQryRest.java:44)
Caused by :java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.JsonMappingException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)
at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89)
... 55 more
调用JSONUtil.toJSON将JavaBean转换为JSON时报错
原因:错误信息中指明了异常的路径com/fasterxml/jackson/databind/JsonMappingException,应该是jackson-databind.jar这个包的版本问题,将版本由2.5.0换为2.5.1后解决。
Caused by :java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.JsonMappingException