问答详情
源自:5-2 实现24小时天气预报查询功能

jar包调用使用时报错

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: ognl.OgnlException: source is null for getProperty(null, "showapi_res_body")

at com.imooc.weather.impl.WeatherUtilsImpl.w24h(WeatherUtilsImpl.java:82)

at com.ymt.weather.Application.main(Application.java:24)

Caused by: java.lang.RuntimeException: ognl.OgnlException: source is null for getProperty(null, "showapi_res_body")

at com.imooc.weather.impl.WeatherUtilsImpl.getValue(WeatherUtilsImpl.java:34)

at com.imooc.weather.impl.WeatherUtilsImpl.w24h(WeatherUtilsImpl.java:63)

... 1 more

Caused by: ognl.OgnlException: source is null for getProperty(null, "showapi_res_body")

at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2410)

at ognl.ASTProperty.getValueBody(ASTProperty.java:114)

at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)

at ognl.SimpleNode.getValue(SimpleNode.java:258)

at ognl.ASTChain.getValueBody(ASTChain.java:141)

at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)

at ognl.SimpleNode.getValue(SimpleNode.java:258)

at ognl.Ognl.getValue(Ognl.java:467)

at ognl.Ognl.getValue(Ognl.java:569)

at ognl.Ognl.getValue(Ognl.java:539)

at com.imooc.weather.impl.WeatherUtilsImpl.getValue(WeatherUtilsImpl.java:31)

... 2 more


提问者:MingtaoYan 2021-09-24 16:43

个回答

  • 慕标3378659
    2022-01-24 18:26:18

    阿里云换接口了。。。。给的jar包里的接口不对了

  • 慕仰7716079
    2021-10-28 22:06:23

    我们的错误是一样的http://img4.mukewang.com/617aae5c00015c4e12410632.jpg