Skip to content
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

Failed startup of context c.g.g.d.s.j.WebAppContextWithReload #2192

Closed
vkvelu opened this issue Feb 10, 2018 · 4 comments
Closed

Failed startup of context c.g.g.d.s.j.WebAppContextWithReload #2192

vkvelu opened this issue Feb 10, 2018 · 4 comments

Comments

@vkvelu
Copy link

vkvelu commented Feb 10, 2018

Hi:
I need help with an issue I have no idea how to resolve. Your help will be greatly appreciated.

I just added log4j2 jars (log4j-api-2.10.0.jar, log4j-core-2.10.0.jar) to my Web app and it started running into this problem in my dev. Later I added log4j-web-2.10.0.jar and tried, it still fails with the same message.

Here's my environment:

  1. IDE: Eclipse Oxygen2
  2. JDK: 1.8.0_162
  3. Jetty (embedded in Eclipse): jetty-9.2.z-SNAPSHOT
  4. OS: Win 10 (64bit)
  5. Framework: GWT 2.8.2

Stack trace (partial):

[WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@3a24f397{/,file:<project_path>/war/,STARTING}{<project_path>\war}
MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:<project_path>/war/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:<project_path>/war/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:<project_path>/war/WEB-INF/lib/log4j-api-2.10.0.jar]
	at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:536)
	at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447)
	at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:479)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1337)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
	.
	.
	.
Caused by: MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:<project_path>/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:<project_path>/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:<project_path>/WEB-INF/lib/log4j-api-2.10.0.jar]
	at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:899)
	at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
	at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
	at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
@joakime
Copy link
Contributor

joakime commented Feb 10, 2018

This is related to your use of a JEP-238 Multi-Release JAR.

Notice the path ..

META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class

Issue #1797 is where this was first reported and fixed.
It was fixed for ...

  • jetty-9.3.22.v20171030 - 30 October 2017
  • jetty-9.4.8.v20171121 - 21 November 2017

Since Jetty 9.2.x is end of life, there will be no backport to support JEP-238 on Jetty 9.2.x.

Your choices are to upgrade to one of the supported versions listed above, or downgrade your version of log4j to one that does not use JEP-238 Multi-Release JAR Files.

@joakime joakime closed this as completed Feb 10, 2018
@joakime
Copy link
Contributor

joakime commented Feb 10, 2018

Also of note, the log4j JEP-238 Multi-Release JAR file you are using is also a Java 9 JPMS module.

The presence module-info.class indicates that.
Support in Jetty to ignore module-info.class during bytecode scanning was fixed in Issue #1692

@diskostu
Copy link

Your choices are to upgrade to one of the supported versions listed above, [...]

How can I force GWT 2.8.2 to use Jetty 9.4.x? I just tried to update the dependencies manually, but really, I landed in dependency hell and gave up.
Is there a simple way to set the desired version of Jetty, like in Vaadin, for example?

@joakime
Copy link
Contributor

joakime commented May 14, 2020

@diskostu you might want to update to GWT 2.9.0

See: https://groups.google.com/forum/#!topic/google-web-toolkit/kXWfvW9X0pI

It's available on Maven Central as well - https://search.maven.org/artifact/com.google.gwt/gwt/2.9.0/pom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants