workqueue-1”java.lang.nullpointerexception中的scala playfw apachecxf/exception

tpgth1q7  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(178)

使用带有scala/playfw和sbt的web服务(soap)时播放soap(插件)
插件.sbt

resolvers += Resolver.url("play-sbt-plugins", url("https://dl.bintray.com/playframework/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.sbt" % "sbt-play-soap" % "1.2.0")

构建.sbt

WsdlKeys.wsdlTasks in Compile := Seq(
   WsdlKeys.WsdlTask(url("https://example.com/Service?wsdl"), packageName = Some("com.example.service"))
)
WsdlKeys.futureApi := WsdlKeys.ScalaFutureApi

任务内(scala)

class ExampleTask @Inject()(implicit ec: ExecutionContext, actorSystem: ActorSystem, cxf: ApacheCxfBus, conf: Configuration) {
    actorSystem.scheduler.scheduleAtFixedRate(initialDelay = 5.seconds, interval = 10.minutes) { () =>
        val service = new com.example.service.Service(cxf, conf).getData // <- Error Line
        service.map(response => {
           // db operations
        })
    }
}

在向soap发出请求的过程中,没有任何原因或顺序地发生以下错误。
错误不在特定的顺序和条件中。它随时都可能发生。
在重复请求期间,错误发生的频率会增加。
org.apache.cxf.endpoint.clientimpl$2.onmessage(clientimpl)上的线程“default-workqueue-1”java.lang.nullpointerexception中出现异常。java:521)在org.apache.cxf.transport.http.httpconduction$wrappedoutputstream$1.run(httpconduction)上。java:1201)在org.apache.cxf.workqueue.automaticworkqueueimpl$3.run(automaticworkqueueimpl。java:412)在java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor。java:1149)在java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor。java:624)位于org.apache.cxf.workqueue.automaticworkqueueimpl$awqthreadfactory$1.run(automaticworkqueueimpl。java:345)在java.lang.thread.run(线程。java:748)
cxf版本(已测试):3.1.5-3.4.0-3.4.3
jdk版本(已测试):8、11
版本差异并没有解决问题。
我对这个常见问题的广泛研究并没有得出一个健康的结论。
我想征求对这个问题感兴趣和有意见的人的意见。谢谢。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题