Maven / Jetty / Cause: Class name which was explicitly given in configuration using ‘implementation’ attribute: ‘org.mortbay.jetty.bio.SocketConnector’ cannot be loaded
Case
My project is deployed via Maven on a Jetty 6 server. I have to upgrade the server to Jetty 7.
(BTW: notice that the plugin maven-jetty-plugin
was renamed as jetty-maven-plugi
n)
I get this error:
[java] Cause: Class name which was explicitly given in configuration using ‘implementation’ attribute: ‘org.mortbay.jetty.bio.SocketConnector’ cannot be loaded[/java]
Quick fix
org.mortbay.jetty.bio.SocketConnector
was removed from Jetty with the release 7. To fix the issue, use a more recent implementation. For instance, replace this block:
[xml]<connector implementation="org.mortbay.jetty.bio.SocketConnector">[/xml]
with that one:
[xml]<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">[/xml]