1

Current jetty version is 9.4.6, I tried to upgrade 9.4.44, I got the error. Could you please help me?

 WebAppContext:554 -Failed startup of context o.e.j.w.WebAppContext@163f1cd{passwd-change,/passwd-change,file:///run/opt/corp/gsec/7.0.0/java-service/gsec-jetty-base/temp/jetty-gsec-2443-passwd-change.war-_passwd-change-any-6326268666909012254.dir/webapp/,UNAVAILABLE}{/passwd-change.war} 

Caused by: java.lang.IllegalAccessError: tried to access method org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createInstance(Ljava/lang/Class;)Ljava/lang/Object; from class jetty.webapp.StandardDescriptorProcessor
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.newListenerInstance(StandardDescriptorProcessor.java:1945) ~[apacheds-service-2.0.0-M24.jar:2.0.0-M24] 
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1900) ~[apacheds-service-2.0.0-M24.jar:2.0.0-M24]
nur akkaya
  • 21
  • 5
  • current jetty version is 9.4.6, I tried to upgrade 9.4.44, I got the error. Could you please help me? – nur akkaya Jan 14 '22 at 20:03
  • It looks like you have an apacheds uber jar with jetty already included. How did you upgrade Jetty? details please. – Joakim Erdfelt Jan 15 '22 at 00:19
  • I removed old jetty-disturbition-9.4.6.zip file and added new jetty-distrubition-94.44.zip file to my project . Whe I started jetty, I got this error: Failed startup of context o.e.j.w.WebAppContext .. – nur akkaya Jan 17 '22 at 11:02

2 Answers2

0

The jetty files in your apacheds-service-2.0.0-M24.jar needs to be upgraded as well.

List the contents of the apacheds-service-2.0.0-M24.jar file and you'll see classes in the org.eclipse.jetty. namespace.

Those are conflicting with your efforts to upgrade Jetty via the jetty-distribution zip.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
0

I had a different setup that triggered a similar stacktrace: using cargo-maven2-plugin 16.1 in a spring 5 project, mvn cargo:run would fail because of a conflict with javafx.base-11.0.0-SNAPSHOT.jar files.

Upgrading to cargo-maven3-plugin 1.9.9 fixed the matter.

I'd encourage who ever uses cargo-maven2-plugin to migrate to cargo-maven3-plugin as the doc states:

Please be aware that the Maven 2 / Maven 3 plugin of Codehaus Cargo has been retired with our version 1.9.0 and has been superseded by a Maven 3 only plugin.

exaucae
  • 2,071
  • 1
  • 14
  • 24