NoClassDefFoundError: Failed to initialize OauthRawGcsServiceFactory in production

I am using appengine-sdk 1.9.3.

The devserver works fine in Eclipse and Ant.

When I deploy (upgrade) to appengine (production environment), I get this error:

event.getResults(): [<pre>Error for /p7/formPanelServlet
java.lang.NoClassDefFoundError: Could not initialize class
    com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory 
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:42) 
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:34)
at com.bitvisio.p7.server.FormPanelServlet.&lt;init&gt;(FormPanelServlet.java:27)

In FormPanelServlet.java:27 code:

private final GcsService gcsService = GcsServiceFactory
        .createGcsService(new RetryParams.Builder()
        .initialRetryDelayMillis(10)
        .retryMaxAttempts(10)  
        .totalRetryPeriodMillis(15000)
        .build());

I put the lib appengine-gcs-client-0.3.9.jar in war / WEB-INF / lib. I think there is a problem with this lib.

Thanks for the help.

+4
source share
3 answers

Maven Ivy . JAR war/WEB-INF/lib/ .classpath . Eclipse Google App Engine, API Google..., - Google Plugin Eclipse. Cloud Storage API Google Eclipse NoClassDefFoundError.

+2

. Ivy . ( Maven RELEASE) .

. , Google API - , .

, , , GCS , 1.9.3.

. , .

+1

,

  • google-api-services-storage-v1-rev78-1.22.0.jar

  • joda-time-2.94.jar

  • guava-19.0.jar

    jar jar- appengine-gcs-client.

    . jar , . enter image description here

+1
source

Source: https://habr.com/ru/post/1537104/


All Articles