Hi, I'm trying to build a rest server with akka-http, but I'm having trouble getting anything to run. I'm still trying to get the tutorials to run, but I'm stuck. What am I missing? Any help would be appreciated. Here's what I tried:
Clone the akka repository: cd ~/workspace git clone https://github.com/akka/akka.git Find the example servers: cd ~/workspace/akka/akka-docs/rst/java/code/docs/http/javadsl/server Use jar-files that maven has downloaded previously, and make a classpath string from them: JARS=".:$(find ~/.m2/repository/{com/typesafe/,org/scala-lang/} -name \*.jar|tr '\n' ':'|sed 's/:$//')" echo $JARS|sed "s#$HOME#~#g" These results in: .:~/.m2/repository/com/typesafe/akka/akka-actor_2.11/2.4.9/akka-actor_2.11-2.4.9.jar:~/.m2/repository/com/typesafe/akka/akka-parsing_2.11/2.4.9/akka-parsing_2.11-2.4.9.jar:~/.m2/repository/com/typesafe/akka/akka-http-core_2.11/2.4.9/akka-http-core_2.11-2.4.9.jar:~/.m2/repository/com/typesafe/akka/akka-stream_2.11/2.4.9/akka-stream_2.11-2.4.9.jar:~/.m2/repository/com/typesafe/akka/akka-http-experimental_2.11/2.4.9/akka-http-experimental_2.11-2.4.9.jar:~/.m2/repository/com/typesafe/ssl-config-core_2.11/0.2.1/ssl-config-core_2.11-0.2.1.jar:~/.m2/repository/com/typesafe/ssl-config-akka_2.11/0.2.1/ssl-config-akka_2.11-0.2.1.jar:~/.m2/repository/com/typesafe/config/1.3.0/config-1.3.0.jar:~/.m2/repository/org/scala-lang/modules/scala-java8-compat_2.11/0.7.0/scala-java8-compat_2.11-0.7.0.jar:~/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar:~/.m2/repository/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar Compile the HighLevelServerExample: /usr/lib/jvm/java-8-openjdk-amd64/bin/javac -classpath ".:$JARS" HighLevelServerExample.java Execute it from the right directory: cd ~/workspace/akka/akka-docs/rst/java/code/ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -classpath ".:$JARS" akka.Main docs.http.javadsl.server.HighLevelServerExample Which gives me: Exception in thread "main" java.lang.ClassCastException: interface akka.actor.Actor is not assignable from class docs.http.javadsl.server.HighLevelServerExample at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(ReflectiveDynamicAccess.scala:23) at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(ReflectiveDynamicAccess.scala:20) at scala.util.Try$.apply(Try.scala:192) at akka.actor.ReflectiveDynamicAccess.getClassFor(ReflectiveDynamicAccess.scala:20) at akka.Main$.main(Main.scala:32) at akka.Main.main(Main.scala) -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.