将 war 文件部署到 payara micro 时出错

error deploying war file to payara micro

我正在尝试追踪以下异常,运行 payara micro

java -jar payara-micro-5.182.jar --deplay mywar.war

这似乎是某种内部错误,关于我的应用程序的哪些部分可能导致此错误的一些指示会很有帮助。

[2018-07-17T15:04:27.730+0200] [] [?[1;92mINFO?[0m] [] [?[1;94mcom.bmw.pcc.configuration.ApplicationStartup?[0m] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1531832667730] [levelValue: 800] loading settings...  
[2018-07-17T15:04:28.827+0200] [] [?[1;92mINFO?[0m] [AS-WEB-GLUE-00172] [?[1;94mjavax.enterprise.web?[0m] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1531832668827] [levelValue: 800] Loading application [pcc] at [/]    
[2018-07-17T15:04:29.179+0200] [] [?[1;93mWARNING?[0m] [NCLS-CORE-00069] [?[1;94mjavax.enterprise.system.core?[0m] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1531832669179] [levelValue: 900] [[
  Exception while dispatching an event
java.lang.NullPointerException
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.visitProduces(ApplicationProcessor.java:315)
        at fish.payara.microprofile.openapi.impl.visitor.OpenApiWalker.processAnnotation(OpenApiWalker.java:217)
        at fish.payara.microprofile.openapi.impl.visitor.OpenApiWalker.processAnnotations(OpenApiWalker.java:193)
        at fish.payara.microprofile.openapi.impl.visitor.OpenApiWalker.processAnnotations(OpenApiWalker.java:206)
        at fish.payara.microprofile.openapi.impl.visitor.OpenApiWalker.accept(OpenApiWalker.java:173)
        at fish.payara.microprofile.openapi.impl.processor.ApplicationProcessor.process(ApplicationProcessor.java:157)
        at fish.payara.microprofile.openapi.impl.OpenApiService.createOpenApiDocument(OpenApiService.java:186)
        at fish.payara.microprofile.openapi.impl.OpenApiService.event(OpenApiService.java:151)
        at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)

也许我可以禁用OpenApi(假设它仅用于提供文档)

How do I disable it?

这是 5.182 中的已知问题,将在 5.183 中修复。在此之前,您可以使用 mp.openapi.scan.disable 属性 禁用 OpenAPI 扫描。例如:

java -jar -Dmp.openapi.scan.disable=true payara-micro.jar