2

私はgwt2.4、jre7、およびGAE 1.7.3.in開発モードで作業していますが、コードは正常に動作していますが、アプリエンジンにアプリをアップロードすると、次のエラーが発生します

 java.lang.ExceptionInInitializerError
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:277)
at com.wa.gwtamazon.server.UploadServiceImpl.amazonConfig(UploadServiceImpl.java:124)
at com.wa.gwtamazon.server.UploadServiceImpl.doPost(UploadServiceImpl.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:100)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:447)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:703)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:338)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:330)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)


Nested in java.lang.ExceptionInInitializerError:
java.lang.NullPointerException
at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils.java:124)
at com.amazonaws.util.VersionInfoUtils.getUserAgent(VersionInfoUtils.java:86)
at com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:31)
at com.amazonaws.services.s3.AmazonS3Client.<init>(AmazonS3Client.java:277)
at com.wa.gwtamazon.server.AmazonService.uploadFileToAmazone(AmazonService.java:50)
at com.wa.gwtamazon.server.AmazonService.doPost(AmazonService.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:100)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:447)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:703)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:338)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:330)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)

私も次のリンクで解決策を見つけていますが、それでも機能しませんでした

( http://code.google.com/p/googleappengine/issues/detail?id=8166 )

4

2 に答える 2

3

//編集: 彼は次の XML を自分のファイルに追加しappengine-web.xmlて動作させました:

<system-properties> 
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> 
    <property name="os.name" value="Linux" /> 
    <property name="os.version" value="6.1" /> 
    <property name="java.vm.name" value="Java HotSpot(TM) Client VM" /> 
    <property name="java.vm.version" value="23.5-b02" /> 
    <property name="user.language" value="en" /> 
    <property name="user.region" value="us" /> 
</system-properties>

Google App Engine の制限 (スレッドなしなど) のため、Amazon ライブラリは使用できません。しかし、あなたを助けるはずのいくつかの解決策があります:

[1] http://socialappdev.com/using-amazon-s3-with-google-app-engine-02-2011

[2] https://github.com/handstandtech/s3-simple-appengine

GAE Java SDKでGoogle Cloud Storageを使用しませんか? GCS API は S3 API とほぼ同じです。

于 2013-02-06T12:09:36.503 に答える
2

app エンジンが os.name、os.version、java.vm.name などの値を取得できなかった場合があるため、appengine-web.xml ファイルで手動で指定する必要があります

<system-properties>

<property name="os.name" value="Linux" />
<property name="os.version" value="6.1" />

<property name="java.vm.name" value="Java HotSpot(TM) Client VM" />
<property name="java.vm.version" value="23.5-b02" />

<property name="user.language" value="en" />
<property name="user.region" value="us" />

于 2013-02-09T10:49:07.030 に答える