小编use*_*232的帖子

java.lang.ClassCastException:org.json.JSONObject $ Null无法强制转换为java.lang.String

例外是java.lang.ClassCastException:org.json.JSONObject$Null无法投射到java.lang.String

Printthis>>>>>>userName=user1&passKey=12345678 POST Response Code :: 200

jsonObj>>>>>>>>>>>>>>>>>>{"response":{"roleTitle":"Parent","roleId":146,"passKey":"12345678","id":1,"userName":"user1"},"errorCode":null,"error":false,"message":null}

Jan 04, 2018 4:33:11 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [spring-dispatcher] in context with path [/balihans] threw exception [Request processing failed; nested exception is java.lang.ClassCastException: org.json.JSONObject$Null cannot be cast to java.lang.String] with root cause java.lang.ClassCastException: org.json.JSONObject$Null cannot be cast to java.lang.String at com.swasth.general.controller.SwasthController.postLogin(SwasthController.java:2274) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706) at …

spring json

-1
推荐指数
1
解决办法
4087
查看次数

标签 统计

json ×1

spring ×1