gpt4 book ai didi

scala - 喷雾路由模板不起作用

转载 作者:行者123 更新时间:2023-12-04 15:42:16 25 4
gpt4 key购买 nike

我尝试在 https://github.com/spray/spray-template 运行喷射模板。

我在第 5 步(启动应用程序)出现错误

[ERROR] [04/26/2015 12:49:18.613] [on-spray-can-akka.actor.default-dispatcher-4] [akka://on-spray-can/user/IO-HTTP/listener-0] 762
akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:164)
at akka.actor.ActorCell.create(ActorCell.scala:596)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:279)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at akka.dispatch.Mailbox.exec(Mailbox.scala:231)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 762
at spray.can.parsing.HttpHeaderParser.insert(HttpHeaderParser.scala:231)
at spray.can.parsing.HttpHeaderParser$.insertInGoodOrder$1(HttpHeaderParser.scala:422)
at spray.can.parsing.HttpHeaderParser$.apply(HttpHeaderParser.scala:429)
at spray.can.parsing.HttpRequestPartParser$.$lessinit$greater$default$3(HttpRequestPartParser.scala:28)
at spray.can.server.RequestParsing$.apply(RequestParsing.scala:36)
at spray.can.server.HttpServerConnection$.pipelineStage(HttpServerConnection.scala:217)
at spray.can.server.HttpListener.<init>(HttpListener.scala:36)
at spray.can.HttpManager.newHttpListener(HttpManager.scala:84)
at spray.can.HttpManager$$anonfun$receive$1$$anonfun$applyOrElse$1.apply(HttpManager.scala:76)
at spray.can.HttpManager$$anonfun$receive$1$$anonfun$applyOrElse$1.apply(HttpManager.scala:76)
at akka.actor.TypedCreatorFunctionConsumer.produce(Props.scala:343)
at akka.actor.Props.newActor(Props.scala:252)
at akka.actor.ActorCell.newActor(ActorCell.scala:552)
at akka.actor.ActorCell.create(ActorCell.scala:578)
... 9 more

Java 版本

java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

最佳答案

您遇到的问题是操作系统语言问题。

你应该将这两行添加到你的 build.sbt

fork in run := true

javaOptions in run ++= Seq("-Duser.language=en", "-Duser.country=US", "-Dfile.encoding=UTF-8")

添加后,问题就解决了。

关于scala - 喷雾路由模板不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29876405/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com