Scala 2.6播放中的SAXNotRecognizedException

时间:2018-07-19 20:27:48

标签: scala playframework akka akka-http playframework-2.6

我正在从Play 2.5迁移到2.6,应用程序编译没有问题,但是当我启动Play时,出现了以下异常。错误提到AkkaHttpServer-Play 2.6中新的默认HTTP服务器。我尝试将来自Play网站的Akka HTTP服务器标准配置添加到application.conf中,但仍然出现相同的错误。

看着SAX Exception,它说有一个解析器无法识别的属性。有任何解决方法的想法吗?

  

play.api.UnexpectedException:意外   exception [ExceptionInInitializerError:null]           在play.core.server.DevServerStart $$ anon $ 1.reload(DevServerStart.scala:190)           在play.core.server.DevServerStart $$ anon $ 1.get(DevServerStart.scala:124)           在play.core.server.AkkaHttpServer.handleRequest(AkkaHttpServer.scala:202)           在play.core.server.AkkaHttpServer。$ anonfun $ createServerBinding $ 1(AkkaHttpServer.scala:117)           在akka.stream.impl.fusing.MapAsync $$ anon $ 25.onPush(Ops.scala:1194)           在akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:519)           在akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:482)           在akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:378)           在akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:585)           在akka.stream.impl.fusing.GraphInterpreterShell $ AsyncInput.execute(ActorGraphInterpreter.scala:469)   原因:java.lang.ExceptionInInitializerError :空           在play.core.server.DevServerStart $$ anon $ 1.reload(DevServerStart.scala:177)           在play.core.server.DevServerStart $$ anon $ 1.get(DevServerStart.scala:124)           在play.core.server.AkkaHttpServer.handleRequest(AkkaHttpServer.scala:202)           在play.core.server.AkkaHttpServer。$ anonfun $ createServerBinding $ 1(AkkaHttpServer.scala:117)           在akka.stream.impl.fusing.MapAsync $$ anon $ 25.onPush(Ops.scala:1194)           在akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:519)           在akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:482)           在akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:378)           在akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:585)           在akka.stream.impl.fusing.GraphInterpreterShell $ AsyncInput.execute(ActorGraphInterpreter.scala:469)   原因:org.xml.sax.SAXNotRecognizedException :   http://apache.org/xml/features/disallow-doctype-decl           在org.apache.xerces.parsers.AbstractSAXParser.setFeature(AbstractSAXParser.java:1508)           在org.apache.xerces.jaxp.SAXParserImpl.setFeatures(SAXParserImpl.java:145)           在org.apache.xerces.jaxp.SAXParserImpl。(SAXParserImpl.java:128)           在org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:112)           在org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:140)           在play.api.Play $。(Play.scala:58)           在play.api.Play $。(Play.scala)           在play.core.server.DevServerStart $$ anon $ 1.reload(DevServerStart.scala:177)           在play.core.server.DevServerStart $$ anon $ 1.get(DevServerStart.scala:124)           在play.core.server.AkkaHttpServer.handleRequest(AkkaHttpServer.scala:202)

1 个答案:

答案 0 :(得分:0)

经过长时间的尝试,我发现一个错误,将commons-dbcp的版本从1.2更改为1.4,可以解决此问题。错误消息似乎没有指向解决方案。