-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JAVA 21 - GWT 2.12.0 - Unable to get known Configuration java.util.ServiceConfigurationError #300
Comments
You are including Using the flag |
@lachlan-roberts thanks for your comment. I have changed this It shows the same error on the staging environment, but it works correctly when run locally. I also tried excluding these, but the following error is shown when running GWT Super Dev locally. This is the error: |
I don't think excluding the Jetty dependencies is the right thing to do. But now I think that might actually be a separate issue to the original stacktrace.
Can please you do a Jetty Server Dump and post the results here. |
@lachlan-roberts |
Hi, If your source code uses import com.google.appengine.api.* (i.e if you are using the AppEngine APIs), you need to use appengine-web.xml. A few questions from me: With our bundled Jetty server supporting GAE APIs. we do use a strongly isolated class loader for the application code, so we do not expose Jetty internal classes (or a very small set, that we put in the runtime-shared-*.jar ).... |
Ho, I see you are not including the GAE api jars in your web-inf/lib (dump file), so you can probably swich to app.yaml configuration. If you want to keep appengine-web.xml, you can refer to this working SpringBoot war code sample using latest Springboot: https://github.com/ludoch/appengine-spring-boot and study the dependencies in the pom.xml file. |
I looked at the transitive dependencies from GWT to Jetty, and it does not see very correct, as it mixes Jetty9 and Jetty12 jars and might be using way to much Jetty dependencies without real specified needs. Those extra jars conflict with our bundled Jetty runtime. for references, these are the deps I see coming from gwt-dev:
|
@ludoch Yes, I am upgrading to Java 21 with appengine.use.EE8 and the project was working before on java 17 without any problem. And you are right there are conflict jars versions of the jetty in gwt-dev as your last comment and I think the problem coming from that. |
So gwt-dev is not really ready for Jetty12 used in our java21 runtime... |
I think it is unrelated to the gwt-dev dependency, in the jetty-dump.txt there was no gwt-dev in WEB-INF/lib and the I tried adding most of these jars in my WEB-INF/lib and I could not see any @ibrahimali123 could you please provide a simplified project to reproduce this? |
Hi @ibrahimali123 Could you please share your GCP project ID? We can take a look at the logs from our end? |
FYI, I cannot repro with a sample from the gwt download zip (DynaTableRf which has a pom and adding appengine extra files and config with updating pom to latest everything) The sample pom.xml has
What would you need a -dev in prod? See the scope for the sample. Could you add a simple repro app source with maven pom so we can study the issue more? |
Hi, Anyway you can share more information regarding your pom.xml, your dependencies and possibly the source code handler that triggers this exception? |
My Project is running locally correctly, but it gives me this error in the Google app engine logs staging and is not working. I don't know what this error means.
Unable to get known Configuration java.util.ServiceConfigurationError: at org.eclipse.jetty.util.ServiceLoaderSpliterator$ServiceProvider.get(ServiceLoaderSpliterator.java:101) at org.eclipse.jetty.ee8.webapp.Configurations.lambda$getKnown$0(Configurations.java:77) at org.eclipse.jetty.util.ServiceLoaderSpliterator.tryAdvance(ServiceLoaderSpliterator.java:46) at java.base/java.util.Spliterator.forEachRemaining(Spliterator.java:332) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at org.eclipse.jetty.ee8.webapp.Configurations.getKnown(Configurations.java:75) at org.eclipse.jetty.ee8.webapp.WebAppContext.preConfigure(WebAppContext.java:447) at org.eclipse.jetty.ee8.webapp.WebAppContext.doStart(WebAppContext.java:500) at com.google.apphosting.runtime.jetty.ee8.AppEngineWebAppContext.doStart(AppEngineWebAppContext.java:237) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113) at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491) at org.eclipse.jetty.server.handler.ContextHandler.lambda$doStart$0(ContextHandler.java:754) at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1452) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:754) at org.eclipse.jetty.ee8.nested.ContextHandler$CoreContextHandler.doStart(ContextHandler.java:2269) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.addManaged(ContainerLifeCycle.java:482) at org.eclipse.jetty.server.handler.HotSwapHandler.setHandler(HotSwapHandler.java:74) at com.google.apphosting.runtime.jetty.AppVersionHandler.ensureHandler(AppVersionHandler.java:97) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:235) at com.google.apphosting.runtime.RequestRunner.dispatchServletRequest(RequestRunner.java:349) at com.google.apphosting.runtime.RequestRunner.dispatchRequest(RequestRunner.java:234) at com.google.apphosting.runtime.RequestRunner.run(RequestRunner.java:200) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:273) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.util.ServiceConfigurationError: org.eclipse.jetty.ee8.webapp.Configuration: org.eclipse.jetty.ee8.webapp.WebAppConfiguration not a subtype at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) at org.eclipse.jetty.util.ServiceLoaderSpliterator.tryAdvance(ServiceLoaderSpliterator.java:37) ... 25 more
I am using gwt-dev 2.12.0 (the latest one) and using jetty-ee8
Here is my appengine-web.xml:
<property name="appengine.use.EE8" value="true"/>
This is a sample from the dependency tree:
+- org.gwtproject:gwt-dev:jar:2.11.0:compile | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile | +- com.google.code.gson:gson:jar:2.6.2:compile | +- org.ow2.asm:asm:jar:9.2:compile | +- org.ow2.asm:asm-util:jar:9.2:compile | | +- org.ow2.asm:asm-tree:jar:9.2:compile | | \- org.ow2.asm:asm-analysis:jar:9.2:compile | +- org.ow2.asm:asm-commons:jar:9.2:compile [INFO] | +- colt:colt:jar:1.2.0:compile [INFO] | +- commons-collections:commons-collections:jar:3.2.2:compile [INFO] | +- commons-io:commons-io:jar:2.4:compile [INFO] | +- com.ibm.icu:icu4j:jar:63.1:compile [INFO] | +- tapestry:tapestry:jar:4.0.2:compile [INFO] | +- org.eclipse.jetty:jetty-webapp:jar:9.4.44.v20210927:compile [INFO] | | +- org.eclipse.jetty:jetty-xml:jar:9.4.44.v20210927:compile [INFO] | | \- org.eclipse.jetty:jetty-servlet:jar:9.4.44.v20210927:compile [INFO] | | +- org.eclipse.jetty:jetty-security:jar:9.4.44.v20210927:compile [INFO] | | | \- org.eclipse.jetty:jetty-server:jar:9.4.44.v20210927:compile [INFO] | | \- org.eclipse.jetty:jetty-util-ajax:jar:9.4.44.v20210927:compile [INFO] | +- org.eclipse.jetty:jetty-servlets:jar:9.4.44.v20210927:compile [INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:9.4.44.v20210927:compile [INFO] | | +- org.eclipse.jetty:jetty-http:jar:9.4.44.v20210927:compile [INFO] | | +- org.eclipse.jetty:jetty-util:jar:9.4.44.v20210927:compile [INFO] | | \- org.eclipse.jetty:jetty-io:jar:9.4.44.v20210927:compile [INFO] | +- org.eclipse.jetty:jetty-annotations:jar:9.4.44.v20210927:compile [INFO] | | +- org.eclipse.jetty:jetty-plus:jar:9.4.44.v20210927:compile [INFO] | | | \- org.eclipse.jetty:jetty-jndi:jar:9.4.44.v20210927:compile [INFO] | | \- javax.annotation:javax.annotation-api:jar:1.3.2:compile [INFO] | \- org.eclipse.jetty:apache-jsp:jar:9.4.44.v20210927:compile [INFO] | +- org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1.2:compile [INFO] | \- org.mortbay.jasper:apache-jsp:jar:8.5.70:compile [INFO] | +- org.mortbay.jasper:apache-el:jar:8.5.70:compile [INFO] | \- org.eclipse.jdt:ecj:jar:3.19.0:compile
The text was updated successfully, but these errors were encountered: