YAHP转换器抛出Javax.xml.datatype.datatypeconfigurationException



i刚刚链接YAHP转换器,以PDF格式转换我的速度模板。当我打开Swagger运行API时,我所得到的只是:

There was an unexpected error (type=Internal Server Error, status=500).
javax.xml.datatype.DatatypeConfigurationException: Provider for class javax.xml.datatype.DatatypeFactory cannot be found

这是我的pom:

    <dependency>
        <groupId>com.google.code.maven-play-plugin.org.allcolor.yahp</groupId>
        <artifactId>yahp-internal</artifactId>
        <version>1.3</version>
    </dependency>
    <dependency>
        <groupId>org.xhtmlrenderer</groupId>
        <artifactId>core-renderer</artifactId>
        <version>R8pre2</version>
    </dependency>
    <dependency>
        <groupId>com.lowagie</groupId>
        <artifactId>itext</artifactId>
        <version>2.1.7</version>
    </dependency>
    <dependency>
        <groupId>jaxen</groupId>
        <artifactId>jaxen</artifactId>
        <version>1.1.1</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jtidy</groupId>
        <artifactId>jtidy</artifactId>
        <version>r938</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.maven-play-plugin.org.allcolor.shanidom</groupId>
        <artifactId>shani-parser</artifactId>
        <version>1.4.17-patched-yahp-1.3</version>
    </dependency>
    <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>2.0.2</version>
    </dependency>

我还没有在项目中的任何地方使用此类,我对在哪里添加依赖性的地方不知道。

试图谷歌搜索所有可能的解决方案,但这是徒劳的!

,这是2个令人沮丧的时间

我不知道这需要什么。请建议我解决方案

编辑这是我的堆栈跟踪:

java.util.ServiceConfigurationError: javax.xml.datatype.DatatypeFactory: Provider org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[na:1.8.0_151]
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[na:1.8.0_151]
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[na:1.8.0_151]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[na:1.8.0_151]
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[na:1.8.0_151]
at javax.xml.datatype.FactoryFinder$1.run(FactoryFinder.java:297) ~[na:1.8.0_151]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_151]
at javax.xml.datatype.FactoryFinder.findServiceProvider(FactoryFinder.java:292) ~[na:1.8.0_151]
at javax.xml.datatype.FactoryFinder.find(FactoryFinder.java:268) ~[na:1.8.0_151]
at javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:145) ~[na:1.8.0_151]
at javax.xml.bind.DatatypeConverterImpl.<clinit>(DatatypeConverterImpl.java:890) ~[na:1.8.0_151]
at javax.xml.bind.DatatypeConverter.initConverter(DatatypeConverter.java:140) ~[na:1.8.0_151]
at javax.xml.bind.DatatypeConverter.parseBase64Binary(DatatypeConverter.java:341) ~[na:1.8.0_151]
at io.jsonwebtoken.impl.Base64Codec.decode(Base64Codec.java:29) ~[jjwt-0.2.jar:0.2]
at io.jsonwebtoken.impl.DefaultJwtParser.setSigningKey(DefaultJwtParser.java:61) ~[jjwt-0.2.jar:0.2]
at com.wazootix.security.JwtTokenUtil.getClaimsFromToken(JwtTokenUtil.java:94) ~[classes/:na]
at com.wazootix.security.JwtTokenUtil.getUsernameFromToken(JwtTokenUtil.java:50) ~[classes/:na]
at com.wazootix.security.JwtAuthFilter.doFilterInternal(JwtAuthFilter.java:38) ~[classes/:na]

如果您检查yahp pom.xml,还有 xml-apis jar包括 javax.xml.datatype.DatatypeFactory类,您缺少

<dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>2.0.2</version>
    </dependency>

相关内容

  • 没有找到相关文章

最新更新