Found the problem! Just in case anyone encountered the same problem.

The issue was that the the jerser-server (v2.31) had a dependancy on jetty-server (v9.4.27), and we were configured with jetty-server (v9.4.31).

Thank you all for your help.

------ Original Message ------
From: "Shaffin Bhanji" <[email protected]>
To: [email protected]; "JETTY user mailing list" <[email protected]>
Sent: 20/09/2020 3:53:42 PM
Subject: Re: [jetty-users] java.lang.NoClassDefFoundError: org/eclipse/jetty/util/Attributes$Wrapper

It worked at some point and then suddenly when I structured the folder holing the webapp I just started getting these errors. I am running jetty embedded, and launch both an angular web application (ContextHandler), and also a servlet (createServletContextHandler), and using adding them to a ContextHandlerCollection.


------ Original Message ------
From: [email protected]
To: "Shaffin Bhanji" <[email protected]>; "JETTY user mailing list" <[email protected]>
Sent: 20/09/2020 3:39:40 PM
Subject: re: [jetty-users] java.lang.NoClassDefFoundError: org/eclipse/jetty/util/Attributes$Wrapper

Hello



I use Jetty with Jersey, I have no such problems, you can have a look at my project, maybe it could help you:

https://sourceforge.net/projects/red-feed-aggregator/



I think that a dependency is missing in your pom file.



> Message du 20/09/20 21:10
> De : "Shaffin Bhanji" <[email protected]>
> A : [email protected]
> Copie à :
> Objet : [jetty-users] java.lang.NoClassDefFoundError: org/eclipse/jetty/util/Attributes$Wrapper
>
>
Hello,

I am new to Jetty and have seen some inconsistent behavior that I am struggling to find the cause. I am using the embedded jetty via a maven dependency file that is shown below. I am trying to use the the jersey container to support webservice annotations.

<?xml version="1.0" encoding="UTF-8"?>



org.eclipse.jetty
jetty-server
9.4.31.v20200723



org.eclipse.jetty
jetty-servlet
9.4.31.v20200723



org.glassfish.jersey.core
jersey-server
2.31



org.glassfish.jersey.containers
jersey-container-servlet-core
2.31



org.glassfish.jersey.containers
jersey-container-jetty-http
2.31



org.glassfish.jersey.media
jersey-media-moxy
2.31


org.glassfish.jersey.inject
jersey-hk2
2.31



com.google.code.gson
gson
2.8.6



commons-io
commons-io
2.8.0




I sometimes encounter no problems, and sometime struggle for with the following exception!

java.lang.NoClassDefFoundError: org/eclipse/jetty/util/Attributes$Wrapper
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:164) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:78) at org.eclipse.jetty.server.ResourceService.sendWelcome(ResourceService.java:436) at org.eclipse.jetty.server.ResourceService.doGet(ResourceService.java:251) at org.eclipse.jetty.server.handler.ResourceHandler.handle(ResourceHandler.java:256) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1377) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1292) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
    at org.eclipse.jetty.server.Server.handle(Server.java:501)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
    at java.lang.Thread.run(Thread.java:748)

Can anyone assist?

Thanks,
Shaffin.






_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to