在线程异常"主力" java.lang.NoClassDefFoundError的:组织/ codehaus /杰克逊/ JsonParseException [英] Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/JsonParseException

查看:485
本文介绍了在线程异常"主力" java.lang.NoClassDefFoundError的:组织/ codehaus /杰克逊/ JsonParseException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Twilio从我的web应用程序发送短信,我已经基本完成了整合。它发送短信,但正在生成一个错误,我不明白为什么。我已经包括这一 JSON 且该文件的JSON依赖链接但我仍然得到一个错误。哪些其他jar,我需要包括哪些内容?

I am using Twilio to send SMS messages from my web app and I have almost completed the integration. It's sending the SMS, but an error is being generated and I don't understand why. I have included a JSON dependency from this json and this file link but I'm still getting an error. Which other jar do I need to include?

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/JsonParseException
    at com.twilio.sdk.TwilioRestResponse.getParser(TwilioRestResponse.java:225)
    at com.twilio.sdk.TwilioRestResponse.toMap(TwilioRestResponse.java:243)
    at com.twilio.sdk.resource.list.SmsList.create(SmsList.java:70)
    at Example.main(Example.java:25)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.JsonParseException
    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 java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 4 more

加入

截图显示JSON 更新这是新screesnshot

screenshot showing json added Update this is the new screesnshot

推荐答案

您已经错过杰克逊核心asl.jar 1.9.13在你的项目。你可以利用这个Maven的POM依赖

You have missed jackson-core-asl.jar 1.9.13 in you project. You can make use of this Maven POM dependency

<dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-core-asl</artifactId>
    <version>1.9.13</version>
</dependency>

希望这能解决你的问题。勾选此链接了解详情。直接<一href="http://repo1.maven.org/maven2/org/$c$chaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar"相对=nofollow>的下载链接

类是present以下

Class is present in the jar Screen below

删除你的java-json.jar并添加杰克逊核心asl.jar

Remove your java-json.jar and add the jackson-core-asl.jar

这篇关于在线程异常&QUOT;主力&QUOT; java.lang.NoClassDefFoundError的:组织/ codehaus /杰克逊/ JsonParseException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆