Struts has detected an unhandled exception

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
  1. not a file
  2. java.lang.reflect.InvocationTargetException
  3. org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException
  4. org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException
File:weibo4j/http/PostParameter.java
Line number:93

Stacktraces

org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException
 
org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.reflect.InvocationTargetException
    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:243)
    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
    org.apache.struts2.json.JSONWriter.add(JSONWriter.java:329)
    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:228)
    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:165)
    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:131)
    org.apache.struts2.json.JSONWriter.write(JSONWriter.java:99)
    org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:112)
    org.apache.struts2.json.JSONResult.execute(JSONResult.java:198)
 
java.lang.IllegalStateException: not a file
    
    
    weibo4j.http.PostParameter.getContentType(PostParameter.java:93)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
 
一个困扰了我一天的问题,终究解决了,脑袋都大了,还睡觉那么完,就是没有给某个实体类初始化,不仅要把数据处理层初始化,每一个设置值的实体类也要初始化,否则这个问题就一直干扰着你。
PS:调试方式:eg:http://localhost:8080/weibo.com/user!userinfoJson.action
就可以看见完整的报错原因了,你必须把struts的调试模式打开
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值