question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: org/eclipse/jetty/client/api/Response$Listener

See original GitHub issue

When using dropwizard 1.0.7 with jetty-proxy 9.3.9.v20160517 I am seeing a NoClassDefFoundError when instantiating the ProxyServlet.Transparent class.

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/client/api/Response$Listener
	at com.comcast.ace.ProxyServerApplication.addProxyServlet(ProxyServerApplication.java:52)
	at com.comcast.ace.ProxyServerApplication.lambda$addProxyServlets$0(ProxyServerApplication.java:45)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at com.comcast.ace.ProxyServerApplication.addProxyServlets(ProxyServerApplication.java:45)
	at com.comcast.ace.ProxyServerApplication.run(ProxyServerApplication.java:40)
	at com.comcast.ace.ProxyServerApplication.run(ProxyServerApplication.java:17)
	at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
	at io.dropwizard.cli.Cli.run(Cli.java:75)
	at io.dropwizard.Application.run(Application.java:79)
	at com.comcast.ace.ProxyServerApplication.main(ProxyServerApplication.java:20)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.client.api.Response$Listener
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 11 more

Upgrading to dropwizard 1.1 with jetty-proxy 9.4.2.v20170220 fixed the problem for me.

The issue can be reproduced from the following repository: https://github.com/rsb5003/proxy-server-test.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
joschicommented, Apr 3, 2017

Since using Dropwizard 1.1.x seems to work and a workaround is available for Dropwizard 1.0.x, we will not fix this nuisance in Dropwizard 1.0.x.

0reactions
rsb5003commented, Apr 3, 2017

@joschi I updated my test project with the <scope>compile</scope> as you recommended. That solved the problem with being able to instantiate the ProxyServlet.Transparent class!

Thanks for you help in looking into this problem! I think my team will likely upgrade to dropwizard 1.1.0 anyway, however this is great to know there is a possible solution while still using dropwizard 1.0.x

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - JettyReactiveClient NoClassDefFoundError in tests
1 Answer 1 ... That requires Jetty 11 specific behaviors. You cannot downgrade Jetty arbitrarily like that. As noted in the README for...
Read more >
Re: [jetty-users] java.lang.NoClassDefFoundError: org/eclipse ...
I am new to Jetty and have seen some inconsistent behavior that I am struggling to find the cause. I am using the...
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile...
Read more >
Resolve the "java.lang.ClassNotFoundException" in Spark on ...
This error occurs when either of the following conditions is true: The spark-submit job can't find the relevant files in the class path....
Read more >
org.eclipse.jetty.reactive.client.ReactiveRequest Maven ...
Charset; import java.util.function.BiFunction; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.api.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found