XMLBeans jar can't be signed when imported from custom class

∥☆過路亽.° 提交于 2019-12-05 10:25:12

There's a bug opened in XMLBEANS Jira that defines this issue. https://issues.apache.org/jira/browse/XMLBEANS-499 and one of the comments reports a fix. I've not tried it yet but am in the process of doing so. Check it out.

Updated: Resolved. In hindsight the resolution is obvious but painfully unnecessary if the .jar had been properly created. Unzip (I simply changed the .jar extension to .zip and proceeded) the .jar which will remove the duplicate .class files (8 in this case) then use the jar tool to recreate the .jar file. The command is: "jar cf (path)\xmlbeans-2.6.0.jar -C (unzipped folder path) ." Don't forget the period at the end of the command. Then I copied the new xmlbeans-2.6.0.jar into my lib directory and all is now well. Hope this helps someone else! :-)

If you are using maven you can try to unpack the xmlbeans dependency.

<executions>
<execution>
    <id>unpack-dependencies</id>
    <phase>package</phase>
    <goals>
        <goal>unpack</goal>
    </goals>
    <configuration>
        <artifactItems>
            <artifactItem>
                <groupId>org.apache.xmlbeans</groupId>
                <artifactId>xmlbeans</artifactId>
                <version>2.6.0</version>
                <type>jar</type>
                <overWrite>true</overWrite>
                <outputDirectory>${project.build.directory}/classes</outputDirectory>
                <excludes>**/*test.class</excludes>
            </artifactItem>
        </artifactItems>
    </configuration>
</execution>
</executions>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!