简体   繁体   中英

SAXNotRecognizedException in Play for Scala 2.6

I'm migrating from Play 2.5 to 2.6, the application compiles with no issues, but when I start Play I get the exception below. The error mentions AkkaHttpServer - the new default HTTP server in Play 2.6. I tried adding to application.conf the Akka HTTP server standard configuration taken from Play's website but I still get the same error.

Looking at the SAX Exception it says that there's a property not recognized by the parser. Any ideas how to fix this?

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

After long hours of trial an error, I discovered that changing the version of commons-dbcp from 1.2 to 1.4 fixed the problem. The error message doesn't seem to point to the resolution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM