I am trying to create a new Scala project with Spray and Akka. I am using Scala 2.12.1 and my pom looks like this.
<dependencies>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.12</artifactId>
<version>2.4.16</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.enragedginger</groupId>
<artifactId>akka-quartz-scheduler_2.12</artifactId>
<version>1.6.0-akka-2.4.x</version>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-servlet</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>io.spray</groupId>
<artifactId>spray-routing</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.12</artifactId>
<version>2.4.16</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-http-spray-json_2.12</artifactId>
<version>10.0.5</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_2.12</artifactId>
<version>1.0.6</version>
</dependency>
</dependencies>
This pom builds a WAR file, but each time I try to deploy that WAR file onto a server I get the following error. I believe the dependencies I am using are compatible with Scala 2.12.1, can you all spot what's wrong?
java.lang.NoClassDefFoundError: scala/Product$class
at spray.http.Uri$Path$Empty$.<init>(Uri.scala:435)
at spray.http.Uri$Path$Empty$.<clinit>(Uri.scala)
at spray.http.Uri$Path$.<init>(Uri.scala:415)
at spray.http.Uri$Path$.<clinit>(Uri.scala)
at spray.servlet.ConnectorSettings$.fromSubConfig(ConnectorSettings.scala:52)