在Jenkins中构建Job时出现以下错误:
详细
Mode LastWriteTime Length Name
---- ------------- ------ --------
6/28/2016 3:40 PM Temp
Jenkins错误日志构建应用程序:“InvocationTargetException”
Processing main file...
Unable to start FOP:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.fop.cli.Main.startFOPWithDynamicClasspath(Main.java:133)
at org.apache.fop.cli.Main.main(Main.java:207)
Caused by: java.lang.NoClassDefFoundError: org/apache/xmlgraphics/image/loader/ImageContext
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.fop.cli.CommandLineOptions.<init>(CommandLineOptions.java:121)
at org.apache.fop.cli.Main.startFOP(Main.java:157)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.image.loader.ImageContext
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 19 more
fatal error: DocBook transformation failed.
答案 0 :(得分:0)
请在您的maven依赖项中包含xmlgraphics-commons-1.3.jar。
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
<version>1.3.1</version>
</dependency>