title: How do I use FOP with Spring Boot without any Exceptions while starting the app?
body: <p>I have a problem while creating PDF from XML in Java with Apach FOP.</p>
  
  <p>I get a java.io.FileNotFoundException when Spring loads the context (by Start):</p>
  
  <pre><code> .   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v2.2.1.RELEASE)
  
  2019-12-06 15:08:26.995  INFO 8744 --- [           main] d.a.s.RestserviceVonKundeApplication     : Starting RestserviceVonKundeApplication on DESKTOP-JJCROQS with PID 8744 (D:\Workspace\ikar\build\classes\java\main started by annpo in D:\Workspace\ikar)
  2019-12-06 15:08:26.997  INFO 8744 --- [           main] d.a.s.RestserviceVonKundeApplication     : No ....
  ....
  ....
  2019-12-06 15:08:28.487  WARN 8744 --- [           main] o.a.tomcat.util.scan.StandardJarScanner  : Failed to scan [file:/C:/Users/annpo/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xercesImpl.jar] from classloader hierarchy
  
  java.io.FileNotFoundException: C:\Users\annpo\.gradle\caches\modules-2\files-2.1\xalan\xalan\2.7.2\d55d3f02a56ec4c25695fe67e1334ff8c2ecea23\xercesImpl.jar (Das System kann die angegebene Datei nicht finden)
      at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_191]
      at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:225) ~[na:1.8.0_191]
      at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:155) ~[na:1.8.0_191]
      at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:166) ~[na:1.8.0_191]
      at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:130) ~[na:1.8.0_191]
      at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:177) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
      at org.apache.tomcat.util.scan.JarFileUrlJar.&lt;init&gt;(JarFileUrlJar.java:65) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
      at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49) ~[tomcat-embed-core-
  
  2019-12-06 15:08:28.488  WARN 8744 --- [           main] o.a.tomcat.util.scan.StandardJarScanner  : Failed to scan [file:/C:/Users/annpo/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xml-apis.jar] from classloader hierarchy
  
  java.io.FileNotFoundException: C:\Users\annpo\.gradle\caches\modules-2\files-2.1\xalan\xalan\2.7.2\d55d3f02a56ec4c25695fe67e1334ff8c2ecea23\xml-apis.jar (Das System kann die angegebene Datei nicht finden)
      at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_191]
      at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:225) ~[na:1.8.0_191]
      at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:155) ~[na:1.8.0_191]
      at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:166) ~[na:1.8.0_191]
      at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:130) ~[na:1.8.0_191]
  ............
  .................
  ..................
  2019-12-06 15:08:28.489  WARN 8744 --- [           main] o.a.tomcat.util.scan.StandardJarScanner  : Failed to scan [file:/C:/Users/annpo/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/serializer.jar] from classloader hierarchy
  
  java.io.FileNotFoundException: C:\Users\annpo\.gradle\caches\modules-2\files-2.1\xalan\xalan\2.7.2\d55d3f02a56ec4c25695fe67e1334ff8c2ecea23\serializer.jar (Das System kann die angegebene Datei nicht finden)
      at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_191]
      at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:225) ~[na:1.8.0_191]
      at java.util.zip.ZipFile.&lt;init&gt;(ZipFile.java:155) ~[na:1.8.0_191]
      at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:166) ~[na:1.8.0_191]
      at java.util.jar.JarFile.&lt;init&gt;(JarFile.java:130) ~[na:1.8.0_191]
      at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:177) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
  
  ...................
  ....................
  .................
  </code></pre>
  
  <p>My the whole Gradle file looks like:</p>
  
  <pre><code>plugins {
      id 'org.springframework.boot' version '2.2.1.RELEASE'
      id 'io.spring.dependency-management' version '1.0.8.RELEASE'
      id 'java'
  }
  
  group = 'de.anna.springboot.ikar'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = '1.8'
  
  configurations {
      developmentOnly
      runtimeClasspath {
          extendsFrom developmentOnly
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
  
      implementation "org.springframework.boot:spring-boot-starter-data-jpa"
      implementation "org.springframework.boot:spring-boot-starter-web"
      implementation "org.springframework.boot:spring-boot-starter-web-services"
      implementation "org.springframework.boot:spring-boot-starter-tomcat"
      compile "org.apache.tomcat.embed:tomcat-embed-jasper"
      compile "javax.servlet:jstl:1.2"
      compile "com.h2database:h2"
      testImplementation('org.springframework.boot:spring-boot-starter-test') {
          exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
      }
      compile "org.apache.tiles:tiles-core:3.0.8"
      compile "org.apache.tiles:tiles-api:3.0.8"
      compile "org.apache.tiles:tiles-servlet:3.0.8"
      compile "org.apache.tiles:tiles-jsp:3.0.8"
      compile "org.apache.tiles:tiles-request-api:1.0.6"
      compile "org.apache.xmlgraphics:fop:2.3"
      compile "junit:junit:4.12"
      compile "org.wiztools:xsd-gen:0.2.1"
      compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.10'
  }
  
  test {
      useJUnitPlatform()
  }
  
  </code></pre>
  
  <p>What do I do wrong?
  Maybe should I use another Library to create PDF.
  I presume something is not correct with gradle dependences.</p>