2016-06-28 106 views
-1

收到以下錯誤而詹金斯建設工作:無法啓動FOP在詹金斯

詳細

Mode  LastWriteTime  Length Name        
----  -------------  ------ --------  
6/28/2016 3:40 PM   Temp 

詹金斯錯誤日誌建築中的應用 「的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
  1. 請在您的Maven依賴項中包含xmlgraphics-commons-1.3.jar。

    <dependency> 
    <groupId>org.apache.xmlgraphics</groupId> 
    <artifactId>xmlgraphics-commons</artifactId> 
    <version>1.3.1</version> 
    </dependency>