[NETCONF-953] Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory Created: 08/Feb/23 Updated: 26/Feb/23 Resolved: 26/Feb/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.6, 5.0.3 |
| Type: | Bug | Priority: | Highest |
| Reporter: | Ivan Hrasko | Assignee: | Ruslan Kashapov |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt, regression | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
You will get response 500, see attached karaf.log.
|
| Comments |
| Comment by Robert Varga [ 09/Feb/23 ] |
|
Hmm: Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.server.WebSocketServerFactory cannot be found by org.opendaylight.netconf.restconf-nb_5.0.2.SNAPSHOT at org.eclipse.osgi.internal.loader.BundleLoader.generateException(BundleLoader.java:541) ~[?:?] at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:536) ~[?:?] at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:416) ~[?:?] at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:168) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at java.lang.Class.forName0(Native Method) ~[?:?] at java.lang.Class.forName(Class.java:467) ~[?:?] at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:48) ~[bundleFile:9.4.50.v20221201] ... 36 more in the context of: java.lang.RuntimeException: Unable to load org.eclipse.jetty.websocket.server.WebSocketServerFactory at org.eclipse.jetty.websocket.servlet.WebSocketServletFactory$Loader.load(WebSocketServletFactory.java:54) ~[bundleFile:9.4.50.v20221201] at org.eclipse.jetty.websocket.servlet.WebSocketServlet.init(WebSocketServlet.java:140) ~[bundleFile:9.4.50.v20221201] at javax.servlet.GenericServlet.init(GenericServlet.java:180) ~[bundleFile:4.0.4] at org.ops4j.pax.web.service.spi.servlet.OsgiInitializedServlet.init(OsgiInitializedServlet.java:68) ~[bundleFile:?] at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345) ~[bundleFile:9.4.50.v20221201] feels like a Jetty-side issue in OSGi context: Class.forName() is run-of-the mill instantiation. If jetty.websocket.server wants to be found by that call, it should be attaching as a fragment to jetty.websocket.server.
On the other hand, restconf-nb is the context bundle and hence it should be doing one of:
Since this is static wiring, we should be okay with former, as it should be immediately satisfied. Still on the first hand |
| Comment by Ruslan Kashapov [ 15/Feb/23 ] |
|
issue is caused by unsatisfied dependency on jetty's websocket-server bundle, |