Jetty+json-lib库抛异常的问题解决过程(java.lang.NoClassDefFoundError: net/sf/json/JSONObject)


| 
 1 
2 
3 
4 
5 
6 
7 
 | 
<dependency>        <groupId>net.sf.json-lib</groupId>        <artifactId>json-lib</artifactId>        <version>2.4</version>        <classifier>jdk15</classifier>        <scope>compile</scope>    </dependency> | 

3、解决方法(勾选后就不会抛异常了)

Jetty+json-lib库抛异常的问题解决过程(java.lang.NoClassDefFoundError: net/sf/json/JSONObject)的更多相关文章
- java.lang.ClassNotFoundException: net.sf.json.JSONArray,java.lang.NoClassDefFoundError: net/sf/json/JSONArray  jetty跑项目遇到的问题
		
2016-05-18 15:44:25 ERROR Dispatcher.error[user:|url:]:L38 - Dispatcher initialization failed Unable ...
 - 使用JSONObject遇到的问题,java.lang.NoClassDefFoundError: net/sf/json/JSONObject
		
先是报 java.lang.NoClassDefFoundError: net/sf/json/JSONObject 这个错误, 打开项目属性找到java build path中的libaries,找 ...
 - 记一次未解决的异常:java.lang.NoClassDefFoundError: net/sf/json/JSONObject
		
原因:Jetty会导致这个问题,Tomcat可以正常启动 一.异常产生现象 使用json-lib转换实体类/字符串,跑单元测试没问题,但是启动jetty后调用JSONArray.fromObjec ...
 - Java中使用json时java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher问题解决
		
下面代码: public static void main(String[] args) { JSONObject obj = new JSONObject(); obj.put("msg& ...
 - 异常:Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext
		
说明项目没有加载jar包 异常:Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplic ...
 - 异常:Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.log4jdbc.Properties
		
参考文章: 使用Log4jdbc-log4j2监听MyBatis中运行的SQL和Connection 使用 log4jdbc格式化输出SQL,maven配置如下: <dependency> ...
 - java.lang.ClassCastException: net.sf.json.JSONNull cannot be cast to net.sf.json.JSONObject的解决方法
		
报错情况已经说明了,在百度查了好几个解决方法,这里总结一下: 首先:加一个判断是否为空,再做操作 // 得到json串 String jsonString = UtilPOSTGET.UPost(FO ...
 - 【异常】Servlet.service() for servlet [springMvc] in context with path [/orderdishessystem] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ezmorph/M
		
今天做登录的时候,引入json-lib-2.1-jdk15.jar的包时,执行到JSONObject jsonObject = new JSONObject()对象就报标题的那个错. 原来是除了要导入 ...
 - 【异常】Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
		
原因:缺少aspect,AOP的maven坐标 导入maven坐标: <dependency> <groupId>org.springframework</groupId ...
 
随机推荐
- 【MVC 4】2.使用 Razor
			
作者:[美]Adam Freeman 来源:<精通ASP.NET MVC 4> Razor 是微软 MVC3 引入的视图引擎的名称,并在MVC 4 中进行了修订.视图引擎处理 A ...
 - Golang tool:include spider library,image library and some other db library such as mysql,redis,mogodb,hbase,cassandra
			
一.Go_tool This is a tool library for Golang.Dont't worry about not understant it! All comment writes ...
 - Flash Builder 找不到所需的 Adobe Flash Player
			
经测试该方法可用! http://bbs.9ria.com/thread-108472-1-1.html 最近重装了系统,flash开发工具也由flex换成了flash builder.调试时就出现了 ...
 - Jenkins遇到问题一:jenkins配置权限不对导致无法登陆或者空白页面解决办法
			
找到.jenkins/config.xml文件:替换为:1.<authorizationStrategy class="hudson.security.AuthorizationStr ...
 - 关于SVN版本分支合并的知识
			
分支的合并类型 合并的工作是把主干或者分支上合并范围内的所有改动列出,并对比当前工作副本的内容,由合并者手工修改冲突,然后提交到服务器的相应目录里.如果当前工作副本是主干,则合并的范围是分支上的改动, ...
 - 转: 在创业公司使用C++
			
from: http://oicwx.com/detail/827436 在创业公司使用C++ 2016-01-04开发资讯 James Perry和朋友创办了一家公司,主要是做基于云的OLAP多维数 ...
 - android ant 自动编译打包
			
http://www.cnblogs.com/tankaixiong/archive/2010/11/24/1887156.html
 - Genymotion出现unknown generic error和This may occur if you are using a proxy错误的解决方案
			
今天在实验室希望在Genymotion上多下载几个模拟器,需要重新登录帐号,却发现一个错误,叫做unknown generic error.前几天还出现过一个很诡异的问题.截图如下: . (1)unk ...
 - meate 标签使用介绍
			
//禁止浏览器从本地计算机的缓存中访问内容 <meta http-equiv="pragma" content="no-cache"> //清楚缓存 ...
 - memcached缓存知识简单梳理
			
memcached工作原理基本概念:slab,page,chunk.slab,是一个逻辑概念.它是在启动memcached实例的时候预处理好的,每个slab对应一个chunk size,也就是说不同s ...