java.lang.NoClassDefFoundError: com/google/api/services/servicemanagement/ServiceManagement$Builder

2,878 views
Skip to first unread message

bml

unread,
Mar 1, 2021, 12:47:26 PM3/1/21
to Google App Engine
Hello all, running into the below problem. The odd thing is all was working then this started without any change to code.   This com/google/api/services/servicemanagement/ServiceManagement$Builder is a private class of GAE right?  I could try downgrading my version of endpoints-management-control-appengine-all but is anyone running into this ? Any suggestions much appreciated. Thanks!

Uncaught exception from servlet java.lang.NoClassDefFoundError: com/google/api/services/servicemanagement/ServiceManagement$Builder
at com.google.api.config.ServiceConfigSupplier.<init>(ServiceConfigSupplier.java:108)
at com.google.api.config.ServiceConfigSupplier.create(ServiceConfigSupplier.java:233)
at com.google.api.config.ServiceConfigFetcher.create(ServiceConfigFetcher.java:45)
at com.google.api.control.ServiceManagementConfigFilter$1.load(ServiceManagementConfigFilter.java:33)
at com.google.api.control.ConfigFilter.init(ConfigFilter.java:90)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:881)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.startWebapp(AppEngineWebAppContext.java:175)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doStart(AppEngineWebAppContext.java:120)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:240)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:178)
at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:120)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:772)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:735)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:705)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:261)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.google.api.services.servicemanagement.ServiceManagement$Builder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at com.google.apphosting.runtime.ApplicationClassLoader.findClass(ApplicationClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    
from pom file
```
<dependency>
    <groupId>com.google.endpoints</groupId>
    <artifactId>endpoints-framework</artifactId>
    <version>2.2.2</version>
</dependency>
<dependency>
    <groupId>com.google.endpoints</groupId>
    <artifactId>endpoints-management-control-appengine-all</artifactId>
    <version>1.0.14</version>
</dependency>

<dependency>
    <groupId>com.google.endpoints</groupId>
    <artifactId>endpoints-framework-auth</artifactId>
    <version>1.0.14</version>
</dependency>
<dependency>
    <groupId>com.google.firebase</groupId>
    <artifactId>firebase-admin</artifactId>
    <version>7.1.0</version>
</dependency>
<dependency>
    <groupId>com.google.endpoints</groupId>
    <artifactId>endpoints-framework-tools</artifactId>
    <version>2.2.2</version>
</dependency>
<dependency>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-api-1.0-sdk</artifactId>
    <version>1.9.83</version>
</dependency>```

My dependency tree is:

com.meety:meetings:war:0.1.0-SNAPSHOT
[INFO] +- com.google.endpoints:endpoints-framework:jar:2.2.2:compile
[INFO] |  +- com.google.guava:guava:jar:20.0:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.6:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] |  +- com.google.flogger:flogger:jar:0.3.1:compile
[INFO] |  +- com.google.http-client:google-http-client-jackson2:jar:1.25.0:compile
[INFO] |  +- com.google.api-client:google-api-client:jar:1.25.0:compile
[INFO] |  |  \- com.google.oauth-client:google-oauth-client:jar:1.25.0:compile
[INFO] |  +- com.google.api-client:google-api-client-appengine:jar:1.25.0:compile
[INFO] |  |  +- com.google.oauth-client:google-oauth-client-appengine:jar:1.25.0:compile
[INFO] |  |  |  \- com.google.oauth-client:google-oauth-client-servlet:jar:1.25.0:compile
[INFO] |  |  |     \- com.google.http-client:google-http-client-jdo:jar:1.25.0:compile
[INFO] |  |  +- com.google.api-client:google-api-client-servlet:jar:1.25.0:compile
[INFO] |  |  |  \- javax.jdo:jdo2-api:jar:2.3-eb:compile
[INFO] |  |  |     \- javax.transaction:transaction-api:jar:1.1:compile
[INFO] |  |  \- com.google.http-client:google-http-client-appengine:jar:1.25.0:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.9:compile
[INFO] |  |  \- io.swagger:swagger-annotations:jar:1.5.9:compile
[INFO] |  +- io.swagger:swagger-core:jar:1.5.9:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.5:compile
[INFO] |  |  |  \- joda-time:joda-time:jar:2.2:compile
[INFO] |  |  \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  +- org.slf4j:slf4j-nop:jar:1.7.21:compile
[INFO] |  \- com.google.flogger:flogger-system-backend:jar:0.3.1:runtime
[INFO] +- com.google.endpoints:endpoints-management-control-appengine-all:jar:1.0.14:compile
[INFO] +- com.google.endpoints:endpoints-framework-auth:jar:1.0.14:compile
[INFO] |  \- com.google.endpoints:endpoints-management-auth:jar:1.0.14:compile
[INFO] |     +- com.google.endpoints:endpoints-management-config:jar:1.0.14:compile
[INFO] |     +- com.google.endpoints:endpoints-management-control:jar:1.0.14:compile
[INFO] |     +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] |     \- org.bitbucket.b_c:jose4j:jar:0.6.4:compile
[INFO] +- com.google.firebase:firebase-admin:jar:7.1.0:compile
[INFO] |  +- com.google.api-client:google-api-client-gson:jar:1.30.10:compile
[INFO] |  |  \- com.google.http-client:google-http-client-gson:jar:1.36.0:compile
[INFO] |  +- com.google.http-client:google-http-client:jar:1.35.0:compile
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] |  |  +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  |  +- io.opencensus:opencensus-api:jar:0.24.0:compile
[INFO] |  |  \- io.opencensus:opencensus-contrib-http-util:jar:0.24.0:compile
[INFO] |  +- com.google.api:api-common:jar:1.9.2:compile
[INFO] |  |  +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] |  |  \- com.google.auto.value:auto-value-annotations:jar:1.7.2:compile
[INFO] |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.20.0:compile
[INFO] |  |  \- com.google.auth:google-auth-library-credentials:jar:0.20.0:compile
[INFO] |  +- com.google.cloud:google-cloud-storage:jar:1.110.0:compile
[INFO] |  |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  |  +- org.checkerframework:checker-compat-qual:jar:2.5.5:compile
[INFO] |  |  +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] |  |  +- com.google.apis:google-api-services-storage:jar:v1-rev20200430-1.30.9:compile
[INFO] |  |  +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] |  |  +- com.google.cloud:google-cloud-core:jar:1.93.6:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-common-protos:jar:1.18.0:compile
[INFO] |  |  +- com.google.cloud:google-cloud-core-http:jar:1.93.6:compile
[INFO] |  |  +- com.google.api:gax-httpjson:jar:0.74.0:compile
[INFO] |  |  +- com.google.api:gax:jar:1.57.0:compile
[INFO] |  |  +- io.grpc:grpc-context:jar:1.30.0:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-iam-v1:jar:0.13.0:compile
[INFO] |  |  +- com.google.protobuf:protobuf-java:jar:3.12.2:compile
[INFO] |  |  +- com.google.protobuf:protobuf-java-util:jar:3.12.2:compile
[INFO] |  |  \- org.threeten:threetenbp:jar:1.4.4:compile
[INFO] |  +- com.google.cloud:google-cloud-firestore:jar:1.35.0:compile
[INFO] |  |  +- com.google.cloud:google-cloud-core-grpc:jar:1.93.6:compile
[INFO] |  |  +- io.grpc:grpc-core:jar:1.30.0:compile
[INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] |  |  +- io.perfmark:perfmark-api:jar:0.19.0:runtime
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-cloud-firestore-admin-v1:jar:1.35.0:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-cloud-firestore-v1:jar:1.35.0:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-cloud-firestore-v1beta1:jar:0.88.0:compile
[INFO] |  |  +- io.opencensus:opencensus-contrib-grpc-util:jar:0.24.0:compile
[INFO] |  |  +- io.grpc:grpc-protobuf:jar:1.30.0:compile
[INFO] |  |  +- io.grpc:grpc-protobuf-lite:jar:1.30.0:compile
[INFO] |  |  +- org.codehaus.mojo:animal-sniffer-annotations:jar:1.18:runtime
[INFO] |  |  +- io.grpc:grpc-api:jar:1.30.0:compile
[INFO] |  |  +- com.google.api:gax-grpc:jar:1.57.0:compile
[INFO] |  |  +- io.grpc:grpc-auth:jar:1.30.0:compile
[INFO] |  |  +- io.grpc:grpc-netty-shaded:jar:1.30.0:compile
[INFO] |  |  +- io.grpc:grpc-alts:jar:1.30.0:compile
[INFO] |  |  +- io.grpc:grpc-grpclb:jar:1.30.0:compile
[INFO] |  |  +- org.conscrypt:conscrypt-openjdk-uber:jar:2.2.1:compile
[INFO] |  |  \- io.grpc:grpc-stub:jar:1.30.0:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] |  +- io.netty:netty-codec-http:jar:4.1.50.Final:compile
[INFO] |  |  +- io.netty:netty-common:jar:4.1.50.Final:compile
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.50.Final:compile
[INFO] |  |  \- io.netty:netty-codec:jar:4.1.50.Final:compile
[INFO] |  +- io.netty:netty-handler:jar:4.1.50.Final:compile
[INFO] |  |  \- io.netty:netty-resolver:jar:4.1.50.Final:compile
[INFO] |  \- io.netty:netty-transport:jar:4.1.50.Final:compile
[INFO] +- org.mozilla:rhino:jar:1.7.7.1:compile
[INFO] +- org.apache.bcel:bcel:jar:6.0:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] |  \- commons-io:commons-io:jar:2.2:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- org.json:json:jar:20160810:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.4:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.18:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.9.4:compile
[INFO] +- org.ow2.asm:asm:jar:5.2:compile
[INFO] +- org.ow2.asm:asm-util:jar:5.2:compile
[INFO] |  \- org.ow2.asm:asm-tree:jar:5.2:compile
[INFO] +- com.opencsv:opencsv:jar:5.2:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.10:compile
[INFO] |  +- org.apache.commons:commons-text:jar:1.8:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |  |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  \- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] +- com.graphql-java:graphql-java:jar:2020-12-21T21-14-06-a12f84b:compile
[INFO] |  +- com.graphql-java:java-dataloader:jar:2.2.3:compile
[INFO] |  \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] +- org.antlr:antlr4-runtime:jar:4.8:compile
[INFO] +- com.google.endpoints:endpoints-framework-tools:jar:2.2.2:compile
[INFO] |  \- com.google.appengine:appengine-tools-sdk:jar:1.9.60:compile
[INFO] +- com.google.appengine:appengine-api-1.0-sdk:jar:1.9.83:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.mockito:mockito-all:jar:2.0.2-beta:test

Olu

unread,
Mar 2, 2021, 5:04:09 PM3/2/21
to Google App Engine
Hello, 

The error seems to point to the Service Management API[1][2]. However, it is difficult to determine what may be causing this issue from the information provided. I encourage you to contact the GCP Support[3] or you can open a Private issue using the issue tracker link[4][5]. This way a GCP Support engineer would be able to work closely with you, collect Private Identifiable information such as your Project ID in order to review your application's configuration. Hence, help you to drive towards determining exactly the cause of the error. 

Rajesh Gupta

unread,
Mar 2, 2021, 11:57:13 PM3/2/21
to google-a...@googlegroups.com
Hello,

I am experiencing similar java.lang.NoClassDefFoundError error.  Its not the same class as you said, but it is one of my internal class.  
I was able to deploy the code a week ago, and the same code I am not able to deploy for the last two days.

I have opened a developer support ticket.

Has anyone recently deployed a java 8 app to the standard app engine?


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/6382ca99-98a4-409f-9cd3-aab6079b0434n%40googlegroups.com.


--
Rajesh
Field Service Software on Google Cloud Platform and Mobile


Olu

unread,
Mar 3, 2021, 10:52:37 AM3/3/21
to Google App Engine
Hello Rajesh,

Surely, reporting the issue by creating a Developer's Support ticket is a viable way to further evaluate this issue. The GCP Support Engineers would be able to check the details of the Logs and any underlying conditions or infrastructure, which may be causing the issue you reported.  

I have not attempted deploying a Java8 recently, certainly not this year, but is there any reason for asking about that?

bml

unread,
Mar 6, 2021, 12:08:38 PM3/6/21
to Google App Engine
Hi Rajesh

I was able to work around this by modifying my pom.  I first had to find where com/google/api/services/servicemanagement/ServiceManagement was then add to pom.  Then a couple more pom adjustments based on error messages.   Something on the backend for GAE must have happened, would be nice to know more about the deployment details of GAE.
Reply all
Reply to author
Forward
0 new messages