New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocketTransport class not found error during cometd servlet initialization #732

Closed
sara-github opened this Issue Jul 13, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@sara-github

sara-github commented Jul 13, 2017

Hi,

I need one help regarding starting Bayeux server with webscoket as transport. While the cometd servlet is getting initialized, the following error is seen: It is not able to pick up the WebScoketTransport class.

2017-07-13 15:16:05.632:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@30b6ffe0{/cb,jetty/webapps/cb/,UNAVAILABLE}{jetty\webapps\cb}
MultiException[java.lang.NoClassDefFoundError: org/cometd/websocket/server/common/AbstractWebSocketTransport, java.lang.NoClassDefFoundError: org/cometd/websocket/server/WebSocketTransport]
      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:715)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:788)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
      at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
      at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
      at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
      at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:437)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
      at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
      at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
      at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
      at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
      at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
      at org.eclipse.jetty.server.Server.start(Server.java:452)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:419)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
Suppressed: 
      |java.lang.NoClassDefFoundError: org/cometd/websocket/server/WebSocketTransport
      |     at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      |     at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:637)
      |     at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:421)
      |     at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744)
      |     at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
      |     at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
      |     at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
      |     at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:788)
      |     at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
      |     at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
      |     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      |     at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
      |     at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
      |     at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
      |     at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
      |     at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
      |     at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:437)
      |     at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
      |     at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
      |     at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
      |     at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
      |     at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
      |     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      |     at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
      |     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      |     at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
      |     at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
      |     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      |     at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
      |     at org.eclipse.jetty.server.Server.start(Server.java:452)
      |     at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
      |     at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      |     at org.eclipse.jetty.server.Server.doStart(Server.java:419)
      |     at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      |     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      |     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      |     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      |     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      |     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      |     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      |     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      |     at java.lang.reflect.Method.invoke(Unknown Source)
      |     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
      |     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
      |     at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
      |     at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Caused by: 
java.lang.NoClassDefFoundError: org/cometd/websocket/server/common/AbstractWebSocketTransport
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
      at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
      at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:637)
      at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:421)
      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:744)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:788)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
      at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
      at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
      at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
      at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:437)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
      at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
      at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
      at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
      at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
      at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
      at org.eclipse.jetty.server.Server.start(Server.java:452)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:419)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

Can someone help?
Below are the versions:
java 1.8
cometd 3.1.1
jetty - 9.4.1.v20170120
servlet - 3.1
bayeux - 3.1.1

Can someone help?

@sara-github

This comment has been minimized.

Show comment
Hide comment
@sara-github

sara-github Jul 14, 2017

This is the the exact error I got at the time of servlet initialization:

JSR 356 WebSocket classes available, but org.cometd.websocket.server.WebSocketTransport unavailable: JSR 356 WebSocket transport disabled

sara-github commented Jul 14, 2017

This is the the exact error I got at the time of servlet initialization:

JSR 356 WebSocket classes available, but org.cometd.websocket.server.WebSocketTransport unavailable: JSR 356 WebSocket transport disabled

@sbordet

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Jul 14, 2017

Member

Looks like you have a classpath issue, some jar is missing, most notably cometd-java-websocket-common-server-<version>.jar, which should be a transitive dependency of cometd-java-websocket-javax-server-<version>.jar.
Double check you dependency/classpath.

Member

sbordet commented Jul 14, 2017

Looks like you have a classpath issue, some jar is missing, most notably cometd-java-websocket-common-server-<version>.jar, which should be a transitive dependency of cometd-java-websocket-javax-server-<version>.jar.
Double check you dependency/classpath.

@sbordet

This comment has been minimized.

Show comment
Hide comment
@sbordet

sbordet Oct 13, 2017

Member

@sara-github is this resolved for you ?

Member

sbordet commented Oct 13, 2017

@sara-github is this resolved for you ?

@sbordet sbordet closed this Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment