Quarkus native 和 JasperReport 出错

问题描述 投票:0回答:0

我正在尝试将 JasperReports 包含在 Quarkus 本机服务 (GraalVM 21.3) 中。在配置文件中发现一些类后,我可以在本机模式下编译和运行应用程序。

https://es.quarkus.io/guides/writing-native-applications-tips

但是,当我尝试以这种方式加载我的 jrxml 时:

JasperCompileManager.compileReport(this.getClass().getClassLoader().getResourceAsStream("jasper/template.jrxml"));

这是我得到的错误:

...
023-05-10 13:26:55,789 DEBUG [net.sf.jas.eng.xml.BaseSaxParserFactory] (executor-thread-0) Instantiated SAX parser factory of type com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
2023-05-10 13:26:55,789 DEBUG [net.sf.jas.ext.DefaultExtensionsRegistry] (executor-thread-0) Loading registries for cache key jdk.internal.loader.ClassLoaders$AppClassLoader@483bf400
LogManager error of type FORMAT_FAILURE: Formatting error
Handler.reportError caught:

是的,没有别的。没有痕迹。只有那条消息。

Quarkus 版本:2.6.0

我不知道如何解决这个问题或在哪里可以找到有关该错误的任何线索。

提前致谢。

编辑(更多信息):

默认情况下没有堆栈跟踪,但覆盖后是跟踪:

Message is Formatting error
Package Name org.jboss.logmanager.handlers
ClassName org.jboss.logmanager.handlers.ConsoleHandler
java.lang.Thread.getStackTrace(Thread.java:528)
java.util.logging.Handler.reportError(Handler.java:18)
org.jboss.logmanager.ExtHandler.reportError(ExtHandler.java:332)
org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:45)
org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:66)
org.jboss.logmanager.ExtHandler.publishToNestedHandlers(ExtHandler.java:97)
io.quarkus.bootstrap.logging.QuarkusDelayedHandler.doPublish(QuarkusDelayedHandler.java:80)
org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:66)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:334)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:341)
org.jboss.logmanager.Logger.logRaw(Logger.java:750)
org.jboss.logmanager.Logger.log(Logger.java:708)
org.jboss.logging.JBossLogManagerLogger.doLogf(JBossLogManagerLogger.java:53)
org.jboss.logging.Logger.errorf(Logger.java:1743)
io.quarkus.vertx.http.runtime.QuarkusErrorHandler.handle(QuarkusErrorHandler.java:127)
io.quarkus.vertx.http.runtime.QuarkusErrorHandler.handle(QuarkusErrorHandler.java:30)
io.vertx.ext.web.impl.RouteState.handleFailure(RouteState.java:1199)
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:160)
io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:201)
io.vertx.ext.web.impl.RouterImpl.handleFailure(RouterImpl.java:253)
io.vertx.ext.web.impl.RouteState.handleFailure(RouteState.java:1199)
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:160)
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
io.vertx.ext.web.impl.RoutingContextImpl.doFail(RoutingContextImpl.java:604)
io.vertx.ext.web.impl.RoutingContextImpl.fail(RoutingContextImpl.java:192)
io.vertx.ext.web.impl.RoutingContextImpl.fail(RoutingContextImpl.java:181)
io.vertx.ext.web.impl.RoutingContextWrapper.fail(RoutingContextWrapper.java:100)
io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:158)
io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:91)
io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
java.lang.Thread.run(Thread.java:829)
com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:600)
com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Code is 5

覆盖 org.jboss.logmanager.handlers.WriterHandler 后:

RESTEASY002315: PathInfo: %s
023-05-10 13:26:55,789 DEBUG [net.sf.jas.eng.xml.BaseSaxParserFactory] (executor-thread-0) Instantiated SAX parser factory of type com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
2023-05-10 13:26:55,789 DEBUG [net.sf.jas.ext.DefaultExtensionsRegistry] (executor-thread-0) Loading registries for cache key 
jdk.internal.loader.ClassLoaders$AppClassLoader@483bf400
RoutingContext failure (500)
HTTP Request to %s failed, error id: %s
io.quarkus.vertx.http.runtime.QuarkusErrorHandler
LogManager error of type FORMAT_FAILURE: Formatting error
Handler.reportError caught:
jasper-reports native quarkus graalvm
© www.soinside.com 2019 - 2024. All rights reserved.