scala - java.lang.VerifyError Incompatible argument to function -
i getting strange error sbt run
spray example app wrote, compiles fine, , error on personal computer because works fine on computer.
here's think relevant source, it's template code spray sample code don't think it's cause.
package spray.examples import akka.actor.{actorsystem, props} import akka.io.io import spray.can.http object boot extends app { implicit val system = actorsystem() // handler actor replies incoming httprequests val handler = system.actorof(props[demoserviceactor], name = "handler") io(http) ! http.bind(handler, interface = "localhost", port = 8080) }
here's stack trace
uncaught error thread [default-akka.actor.default-dispatcher-3] shutting down jvm since 'akka.jvm-exit-on-fatal-error' enabled actorsystem[default] java.lang.verifyerror: (class: spray/can/server/httplistener, method: <init> signature: (lakka/actor/actorref;lspray/can/http$bind;lspray/can/httpext$settings;)v) incompatible argument function @ spray.can.httpmanager$$anonfun$receive$1$$anonfun$applyorelse$1.apply(httpmanager.scala:65) @ spray.can.httpmanager$$anonfun$receive$1$$anonfun$applyorelse$1.apply(httpmanager.scala:65) @ akka.actor.creatorfunctionconsumer.produce(props.scala:369) @ akka.actor.props.newactor(props.scala:323) @ akka.actor.actorcell.newactor(actorcell.scala:534) @ akka.actor.actorcell.create(actorcell.scala:560) @ akka.actor.actorcell.invokeall$1(actorcell.scala:425) @ akka.actor.actorcell.systeminvoke(actorcell.scala:447) @ akka.dispatch.mailbox.processallsystemmessages(mailbox.scala:262) @ akka.dispatch.mailbox.run(mailbox.scala:218) @ akka.dispatch.forkjoinexecutorconfigurator$akkaforkjointask.exec(abstractdispatcher.scala:386) @ scala.concurrent.forkjoin.forkjointask.doexec(forkjointask.java:260) @ scala.concurrent.forkjoin.forkjoinpool$workqueue.runtask(forkjoinpool.java:1339) @ scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool.java:1979) @ scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread.java:107)
as indicated in comments, classpath
issue don't know how debug that. coincidentally, or not, happened after upgraded stock mac os x java 6 java 7, have java 7 on both machines. insights appreciated.
in case might help, here's classpath
dump sbt console
, it's same compile , runtime
list(attributed(/users/bob/projects/spray-file-upload/target/scala-2.10/classes), attributed(/users/bob/.sbt/0.12.4/boot/scala-2.10.2/lib/scala-library.jar), attributed(/users/bob/.ivy2/cache/com.typesafe.akka/akka-actor_2.10/jars/akka-actor_2.10- 2.2.0.jar), attributed(/users/bob/.ivy2/cache/com.typesafe/config/bundles/config-1.0.2.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray-json_2.10/jars/spray-json_2.10-1.2.5.jar), attributed(/users/bob/.ivy2/cache/org.parboiled/parboiled-scala_2.10/bundles/parboiled- scala_2.10-1.1.5.jar), attributed(/users/bob/.ivy2/cache/org.parboiled/parboiled- core/bundles/parboiled-core-1.1.5.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray- can/jars/spray-can-1.2-m8.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray- io/jars/spray-io-1.2-m8.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray- util/jars/spray-util-1.2-m8.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray- http/jars/spray-http-1.2-m8.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray- httpx/jars/spray-httpx-1.2-m8.jar), attributed(/users/bob/.ivy2/cache/org.jvnet.mimepull/mimepull/jars/mimepull-1.9.2.jar), attributed(/users/bob/.ivy2/cache/io.spray/spray-routing/jars/spray-routing-1.2-m8.jar), attributed(/users/bob/.ivy2/cache/com.chuusai/shapeless_2.10/jars/shapeless_2.10-1.2.4.jar))
if cares try fresh compile java 7 , sbt run
, feel free grab repo.
unfortunately, 1.2-m8 not compatible akka 2.2.0 final. either use akka 2.2.0-rc1 or upgrade more recent nightly build of spray 1.2.
update: also, final version has been released, can use version 1.2.0 latest akka 2.2.3.
Comments
Post a Comment