1

我的代码适用于 aws-java-sdk-1.0 。我已经下载了 aws.java.sdk-1.6.4 的源代码,已经构建并将 jar 包含在我的项目中。

我得到一个空指针异常。

java.lang.NullPointerException
    at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:123)
    at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:86)
    at com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:34)
    at org.slideme.feed.model.business.catalog.store.DataStore.initAll(DataStore.java:215)
    at org.slideme.feed.web.Catalog.init(Catalog.java:65)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)

有人知道 1.0 和 1.6 之间发生了什么变化,例如 API 变化吗?

4

1 回答 1

2

After investigating the source code, it seems that it throws this exception because the property file com/amazonaws/sdk/versionInfo.properties doesn't have the property platform.

于 2013-11-05T19:02:38.767 回答