Handler dispatch failed; nested exception is : org/json/JSONObject

时间:2025-04-02 22:50:09

Type Exception Report

Message Handler dispatch failed; nested exception is : org/json/JSONObject

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

: Handler dispatch failed; nested exception is : org/json/JSONObject
	(:978)
	(:897)
	(:970)
	(:861)
	(:635)
	(:846)
	(:742)
	(:52)
	(:197)
	(:107)

Root Cause

: org/json/JSONObject
	(:65)
	.invoke0(Native Method)
	(:62)
	(:43)
	(:498)
	(:205)
	(:133)
	(:116)
	(:827)
	(:738)
	(:85)
	(:963)
	(:897)
	(:970)
	(:861)
	(:635)
	(:846)
	(:742)
	(:52)
	(:197)
	(:107)

Root Cause

: 
	(:1285)
	(:1119)
	(:65)
	.invoke0(Native Method)
	(:62)
	(:43)
	(:498)
	(:205)
	(:133)
	(:116)
	(:827)
	(:738)
	(:85)
	(:963)
	(:897)
	(:970)
	(:861)
	(:635)
	(:846)
	(:742)
	(:52)
	(:197)
	(:107)
上面是报的错误信息,原因是项目是个maven工程,但我用org/json/JSONObject这个jar包时没有使用maven的数据仓库导入,而是右击工程在属性添加的,程序运行到使用org/json/JSONObject的地方就报错了,改为下面这种方式就可以了(版本自己订)。记录一下免得后期忘了
         	<dependency>
			<groupId></groupId>
			<artifactId>json</artifactId>
			<version>20160810</version>
		        </dependency>