使用YAHP时,SAXParserFactory.newInstance()选择org.allcolor.xml.parser.CShaniSaxParser作为记录器(但另一个HTML至Pdf转换器)

时间:2018-10-05 10:25:57

标签: java spring-boot logging

我正在使用YAHP将html转换为pdf。在eclipse中执行时,其工作正常。在我使用gradle构建项目并执行jar之后,收到以下错误。

12:17:29,322 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/sheljith/pjcts/convertion/lib/logback.xml]
12:17:30,813 |-ERROR in ch.qos.logback.core.joran.event.SaxEventRecorder@2e4553 - Unexpected exception while parsing XML document. java.lang.NullPointerException
        at java.lang.NullPointerException
        at      at org.xml.sax.helpers.LocatorImpl.<init>(Unknown Source)
        at      at ch.qos.logback.core.joran.event.SaxEvent.<init>(SaxEvent.java:31)
        at      at ch.qos.logback.core.joran.event.StartEvent.<init>(StartEvent.java:27)
        at      at ch.qos.logback.core.joran.event.SaxEventRecorder.startElement(SaxEventRecorder.java:106)
        at      at org.allcolor.xml.parser.CShaniSaxParser.parseStartTag(CShaniSaxParser.java:1393)
        at      at org.allcolor.xml.parser.CXmlParser.parseSTARTTag(CXmlParser.java:1405)
        at      at org.allcolor.xml.parser.CXmlParser.parse(CXmlParser.java:682)
        at      at org.allcolor.xml.parser.CShaniSaxParser.parse(CShaniSaxParser.java:767)
        at      at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at      at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:59)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:141)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:103)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at      at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
        at      at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
        at      at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
        at      at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at      at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
        at      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
        at      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
        at      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)

在谷歌搜索之后,我发现这是因为登录使用了SAXParserFactory.newInstance(),它选择了org.allcolor.xml.parser.CShaniSaxParser。现在不确定如何解决此问题。我无法避免登录。

任何帮助将不胜感激!谢谢

0 个答案:

没有答案