Skip to content
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

Multiple errors on startup when attempting to integrate Atmosphere #694

Open
colindean opened this issue Aug 12, 2017 · 2 comments
Open

Comments

@colindean
Copy link

colindean commented Aug 12, 2017

I'm really hoping that I've just missed a step somewhere, but I'm having trouble enabling Atmosphere support. I'm new to Scalatra dev as well as Servlet dev and sbt. I've used Scala for ~4 years but have almost never touched sbt!

Logs and examples

I used this example to do it.

Notable things:

  1. Main errors:
    1. java.lang.NoSuchMethodError: org.eclipse.jetty.websocket.server.WebSocketServerFactory.<init>(Lorg/eclipse/jetty/websocket/api/WebSocketPolicy;)V
    2. java.lang.ClassNotFoundException: org.eclipse.jetty.continuation.ContinuationListener
  2. I have container in the scope for some of my dependencies, when it may not be necessary. I'm quite sure what it means.

I think the problem may be related to Atmosphere/atmosphere#2286 "Jetty Websocket support broken in 2.4.x for Jetty < 9.4", but I'm using Jetty 9.4.6.

I'm not quite sure what to try next beyond setting up the example and slowing bringing in my
few added dependencies.

@colindean
Copy link
Author

Here's a diff of the output of show runtime:fullClasspath from within sbt for my project and the example:

$ diff -u example-sorted.txt mine-sorted.txt
--- example-sorted.txt	2017-08-12 16:15:31.000000000 -0400
+++ mine-sorted.txt	2017-08-12 16:15:02.000000000 -0400
@@ -1,3 +1,5 @@
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.8.4/jackson-core-2.8.4.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.8.4/jackson-databind-2.8.4.jar)
@@ -5,7 +7,13 @@
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.8/paranamer-2.8.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.12/2.4.12/akka-actor_2.12-2.4.12.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/typesafe/config/1.3.0/config-1.3.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/com/vdurmont/semver4j/2.0.3/semver4j-2.0.3.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/eu/medsea/mimeutil/mime-util/2.1.3/mime-util-2.1.3.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/fr/hmil/roshttp_2.12/2.0.2/roshttp_2.12-2.0.2.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/io/monix/monix-eval_2.12/2.3.0/monix-eval_2.12-2.3.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/io/monix/monix-execution_2.12/2.3.0/monix-execution_2.12-2.3.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/io/monix/monix-reactive_2.12/2.3.0/monix-reactive_2.12-2.3.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/io/monix/monix-types_2.12/2.3.0/monix-types_2.12-2.3.0.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-pool2/2.3/commons-pool2-2.3.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/atmosphere/atmosphere-compat-jbossweb/2.0.1/atmosphere-compat-jbossweb-2.0.1.jar)
@@ -14,10 +22,12 @@
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/atmosphere/atmosphere-redis/2.4.2/atmosphere-redis-2.4.2.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/atmosphere/atmosphere-runtime/2.4.4/atmosphere-runtime-2.4.4.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/clapper/grizzled-slf4j_2.12/1.3.0/grizzled-slf4j_2.12-1.3.0.jar)
-[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-ast_2.12/3.5.2/json4s-ast_2.12-3.5.2.jar)
-[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-core_2.12/3.5.2/json4s-core_2.12-3.5.2.jar)
-[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-jackson_2.12/3.5.2/json4s-jackson_2.12-3.5.2.jar)
-[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-scalap_2.12/3.5.2/json4s-scalap_2.12-3.5.2.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/jctools/jctools-core/2.0.1/jctools-core-2.0.1.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-ast_2.12/3.5.0/json4s-ast_2.12-3.5.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-core_2.12/3.5.0/json4s-core_2.12-3.5.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-jackson_2.12/3.5.0/json4s-jackson_2.12-3.5.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/json4s/json4s-scalap_2.12/3.5.0/json4s-scalap_2.12-3.5.0.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.0/reactive-streams-1.0.0.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-java8-compat_2.12/0.8.0/scala-java8-compat_2.12-0.8.0.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.12/1.0.4/scala-parser-combinators_2.12-1.0.4.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6.jar)
@@ -31,6 +41,6 @@
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scalatra/scalatra-json_2.12/2.5.1/scalatra-json_2.12-2.5.1.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scalatra/scalatra-scalate_2.12/2.5.1/scalatra-scalate_2.12-2.5.1.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scalatra/scalatra_2.12/2.5.1/scalatra_2.12-2.5.1.jar)
-[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar)
+[info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar)
 [info] * Attributed(/Users/colin/.coursier/cache/v1/https/repo1.maven.org/maven2/redis/clients/jedis/2.7.3/jedis-2.7.3.jar)
-[info] * Attributed(/Users/colin/Source/volatile-deleteregularly/scalatra-website-examples/2.5/async/scalatra-atmosphere-example/target/scala-2.12/classes)
+[info] * Attributed(/Users/colin/Source/Arcadia/MACK/arcadia-cloud-status-api/target/scala-2.12/classes)

The only differences amount to obvious ones:

  • introduction of logback and its use of slf4j 1.7.25 instead of 1.7.21
  • introduction of semver4j
  • introduction of roshttp and its dependencies on monix and reactivestreams
  • use of an older version of json4s, which I'll fix presently

@colindean
Copy link
Author

And comparing coursierDependencyTree

--- dep-example.txt	2017-08-12 16:23:11.000000000 -0400
+++ dep-mine.txt	2017-08-12 16:22:48.000000000 -0400
@@ -1,18 +1,37 @@
-scalatra-atmosphere-example (configurations compile, compile-internal, optional, provided, runtime, runtime-internal, test, test-internal)
-├─ org.json4s:json4s-jackson_2.12:3.5.2
+arcadia-cloud-status-api (configurations compile, compile-internal, optional, provided, runtime, runtime-internal, test, test-internal)
+├─ com.vdurmont:semver4j:2.0.3
+├─ fr.hmil:roshttp_2.12:2.0.2
+│  ├─ io.monix:monix_2.12:2.3.0
+│  │  ├─ io.monix:monix-eval_2.12:2.3.0
+│  │  │  ├─ io.monix:monix-execution_2.12:2.3.0
+│  │  │  │  ├─ org.reactivestreams:reactive-streams:1.0.0
+│  │  │  │  └─ org.scala-lang:scala-library:2.12.2
+│  │  │  ├─ io.monix:monix-types_2.12:2.3.0
+│  │  │  │  └─ org.scala-lang:scala-library:2.12.2
+│  │  │  └─ org.scala-lang:scala-library:2.12.2
+│  │  ├─ io.monix:monix-execution_2.12:2.3.0
+│  │  ├─ io.monix:monix-reactive_2.12:2.3.0
+│  │  │  ├─ io.monix:monix-eval_2.12:2.3.0
+│  │  │  ├─ io.monix:monix-execution_2.12:2.3.0
+│  │  │  ├─ io.monix:monix-types_2.12:2.3.0
+│  │  │  ├─ org.jctools:jctools-core:2.0.1
+│  │  │  └─ org.scala-lang:scala-library:2.12.2
+│  │  └─ io.monix:monix-types_2.12:2.3.0
+│  └─ org.scala-lang:scala-library:2.12.2
+├─ org.json4s:json4s-jackson_2.12:3.5.0
 │  ├─ com.fasterxml.jackson.core:jackson-databind:2.8.4
 │  │  ├─ com.fasterxml.jackson.core:jackson-annotations:2.8.0
 │  │  └─ com.fasterxml.jackson.core:jackson-core:2.8.4
-│  ├─ org.json4s:json4s-core_2.12:3.5.2
+│  ├─ org.json4s:json4s-core_2.12:3.5.0
 │  │  ├─ com.thoughtworks.paranamer:paranamer:2.8
-│  │  ├─ org.json4s:json4s-ast_2.12:3.5.2
-│  │  │  └─ org.scala-lang:scala-library:2.12.2
-│  │  ├─ org.json4s:json4s-scalap_2.12:3.5.2
-│  │  │  └─ org.scala-lang:scala-library:2.12.2
-│  │  ├─ org.scala-lang:scala-library:2.12.2
+│  │  ├─ org.json4s:json4s-ast_2.12:3.5.0
+│  │  │  └─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
+│  │  ├─ org.json4s:json4s-scalap_2.12:3.5.0
+│  │  │  └─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
+│  │  ├─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
 │  │  └─ org.scala-lang.modules:scala-xml_2.12:1.0.6
 │  │     └─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
-│  └─ org.scala-lang:scala-library:2.12.2
+│  └─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
 ├─ org.scala-lang:scala-library:2.12.2
 ├─ org.scalatra:scalatra-atmosphere_2.12:2.5.+
 │  ├─ com.typesafe.akka:akka-actor_2.12:2.4.12
@@ -25,37 +44,36 @@
 │  ├─ org.atmosphere:atmosphere-compat-tomcat:2.0.1
 │  ├─ org.atmosphere:atmosphere-compat-tomcat7:2.0.1
 │  ├─ org.atmosphere:atmosphere-redis:2.4.2
-│  │  ├─ org.slf4j:slf4j-api:1.6.1 -> 1.7.21
+│  │  ├─ org.slf4j:slf4j-api:1.6.1 -> 1.7.25
 │  │  └─ redis.clients:jedis:2.7.3
 │  │     └─ org.apache.commons:commons-pool2:2.3
 │  ├─ org.atmosphere:atmosphere-runtime:2.4.4
-│  │  └─ org.slf4j:slf4j-api:1.7.7 -> 1.7.21
+│  │  └─ org.slf4j:slf4j-api:1.7.7 -> 1.7.25
 │  ├─ org.scala-lang:scala-library:2.12.1 -> 2.12.2
 │  └─ org.scalatra:scalatra-json_2.12:2.5.1
-│     ├─ org.json4s:json4s-core_2.12:3.5.0 -> 3.5.2
-│     │  ├─ com.thoughtworks.paranamer:paranamer:2.8
-│     │  ├─ org.json4s:json4s-ast_2.12:3.5.2
-│     │  ├─ org.json4s:json4s-scalap_2.12:3.5.2
-│     │  ├─ org.scala-lang:scala-library:2.12.2
-│     │  └─ org.scala-lang.modules:scala-xml_2.12:1.0.6
+│     ├─ org.json4s:json4s-core_2.12:3.5.0
 │     ├─ org.scala-lang:scala-library:2.12.1 -> 2.12.2
 │     └─ org.scalatra:scalatra_2.12:2.5.1
 │        ├─ com.googlecode.juniversalchardet:juniversalchardet:1.0.3
 │        ├─ eu.medsea.mimeutil:mime-util:2.1.3
-│        │  ├─ org.slf4j:slf4j-api:1.5.6 -> 1.7.21
+│        │  ├─ org.slf4j:slf4j-api:1.5.6 -> 1.7.25
 │        │  ├─ (excluded) log4j:log4j:1.2.14
 │        │  └─ (excluded) org.slf4j:slf4j-log4j12:1.5.6
 │        ├─ org.apache.commons:commons-lang3:3.5
 │        ├─ org.clapper:grizzled-slf4j_2.12:1.3.0
 │        │  ├─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
-│        │  └─ org.slf4j:slf4j-api:1.7.7 -> 1.7.21
+│        │  └─ org.slf4j:slf4j-api:1.7.7 -> 1.7.25
 │        ├─ org.scala-lang:scala-library:2.12.1 -> 2.12.2
 │        ├─ org.scala-lang.modules:scala-parser-combinators_2.12:1.0.4
 │        │  └─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
 │        ├─ org.scala-lang.modules:scala-xml_2.12:1.0.6
 │        ├─ org.scalatra:scalatra-common_2.12:2.5.1
 │        │  └─ org.scala-lang:scala-library:2.12.1 -> 2.12.2
-│        └─ org.slf4j:slf4j-api:1.7.21
+│        └─ org.slf4j:slf4j-api:1.7.21 -> 1.7.25
+├─ org.scalatra:scalatra-json_2.12:2.5.+ -> 2.5.1
+│  ├─ org.json4s:json4s-core_2.12:3.5.0
+│  ├─ org.scala-lang:scala-library:2.12.1 -> 2.12.2
+│  └─ org.scalatra:scalatra_2.12:2.5.1
 ├─ org.scalatra:scalatra-scalate_2.12:2.5.+
 │  ├─ org.scala-lang:scala-library:2.12.1 -> 2.12.2
 │  ├─ org.scalatra:scalatra_2.12:2.5.1
@@ -70,7 +88,7 @@
 │        ├─ org.scala-lang:scala-library:2.12.0 -> 2.12.2
 │        ├─ org.scala-lang.modules:scala-parser-combinators_2.12:1.0.4
 │        ├─ org.scala-lang.modules:scala-xml_2.12:1.0.6
-│        └─ org.slf4j:slf4j-api:1.7.21
+│        └─ org.slf4j:slf4j-api:1.7.21 -> 1.7.25
 └─ org.scalatra:scalatra_2.12:2.5.+ -> 2.5.1
    ├─ com.googlecode.juniversalchardet:juniversalchardet:1.0.3
    ├─ eu.medsea.mimeutil:mime-util:2.1.3
@@ -80,4 +98,4 @@
    ├─ org.scala-lang.modules:scala-parser-combinators_2.12:1.0.4
    ├─ org.scala-lang.modules:scala-xml_2.12:1.0.6
    ├─ org.scalatra:scalatra-common_2.12:2.5.1
-   └─ org.slf4j:slf4j-api:1.7.21
+   └─ org.slf4j:slf4j-api:1.7.21 -> 1.7.25

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

No branches or pull requests

2 participants