jar包调用使用时报错

来源:5-2 实现24小时天气预报查询功能

MingtaoYan

2021-09-24 16:43

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


写回答 关注

2回答

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

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

    慕仰0164...

    有解决办法嘛

    2022-05-05 13:23:54

    共 2 条回复 >

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

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

    Y_14

    int i = scanner.nextInt();你的是nextByte?

    2021-12-14 16:40:32

    共 1 条回复 >

Java入门第二季 升级版

课程升级!以终为始告别枯燥,在开发和重构中体会Java面向对象编程的奥妙

530559 学习 · 6091 问题

查看课程

相似问题