title: NoSuchMethodError with Fop library
body: <p>I want to display PDF file by using fop-1.1. jar and xmlgraphics-commons-1.5.jar based on JRE 1.6. But I have an exception as below:</p>
  
  <pre><code>EXCEPTION]
  java.lang.NoSuchMethodError: org.apache.xmlgraphics.xmp.Metadata.mergeInto(Lorg/apache/xmlgraphics/xmp/Metadata;)V
  at org.apache.fop.render.pdf.PDFRenderingUtil.renderXMPMetadata(PDFRenderingUtil.java:356)
  at org.apache.fop.render.pdf.PDFDocumentHandler.handleExtensionObject(PDFDocumentHandler.java:290)
  at org.apache.fop.render.intermediate.util.IFDocumentHandlerProxy.handleExtensionObject(IFDocumentHandlerProxy.java:197)
  at org.apache.fop.render.intermediate.IFRenderer.startPageSequence(IFRenderer.java:519)
  at org.apache.fop.area.RenderPagesModel.startPageSequence(RenderPagesModel.java:97)
  at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:104)
  at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
  at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128)
  at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
  at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
  at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261)
  at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:555)
  at letter_EN_Salaried.template$dot$0()
  at letter_EN_Salaried.applyTemplates()
  at letter_EN_Salaried.transform()
  at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:637)
  at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:758)
  at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:356)
  at com.demo.EmployeeProof.doOnNodeReady(EmployeeProof.java:150)
  </code></pre>
  
  <p>and java class:</p>
  
  <pre><code>HttpServletResponse response = request.getServletResponse(true);
  
  String strXSLPath = Property.strXSLPath;
  
  IJCOClientService clientService = (IJCOClientService) request
          .getService(IJCOClientService.KEY);
  
  
      poolEntry = clientService.getJCOClientPoolEntry("SAP_R3_PAYSTUB",
              request);
  
  
  
      this.tFactory = TransformerFactory.newInstance();
  
      this.fopFactory = FopFactory.newInstance();
  
      ByteArrayOutputStream out = new ByteArrayOutputStream();
  
      FOUserAgent userAgent = fopFactory.newFOUserAgent();
      userAgent.getRendererOptions().put(
              "encryption-params",
              new PDFEncryptionParams(null, "password", true, false,
                      false, false));
  
      Fop fop = fopFactory.newFop(org.apache.xmlgraphics.util.MimeConstants.MIME_PDF, userAgent, out);
  
      Source xsltSrc = null;
      xsltSrc = new StreamSource(strXSLPath
                      + "demo.xsl");
  
      Transformer transformer = this.tFactory.newTransformer(xsltSrc);
  
  
      Source src = new StreamSource(createXML(poolEntry, request));
  
      transformer.transform(src, res);
  
      response.setContentType("application/pdf");
      response.setContentLength(out.size());
  
      response.getOutputStream().write(out.toByteArray());
      response.getOutputStream().flush();
  </code></pre>
  
  <p>line 150 refer on log is </p>
  
  <pre><code>transformer.transform(src, res);
  </code></pre>
  
  <p>and class path:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="src" path="src.api"/&gt;
      &lt;classpathentry kind="src" path="src.core"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/prtapi.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/prttest.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/com.sap.portal.runtime.application.soap_api.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/activation.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/com.sap.security.api.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/jaxm-api.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/mail.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/saaj-api.jar"/&gt;
      &lt;classpathentry kind="var" path="LIB_HOME/sapxmltoolkit.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/com.sap.portal.runtime.application.jcoclient_api.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/com.sap.portal.runtime.application.jcoclient_core.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/prtapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/prtcoreservice.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/prtportalservice.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/sapjco.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/tc_sec_api.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxx/urlgeneratorapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/clientinfo.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/connectorimpl.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/jcoclientapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/landscapeapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/remote_client.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/umapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/usermanagementapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/wcmapi.jar"/&gt;
      &lt;classpathentry kind="lib" path="dist/External_Lib/SP18_libs/wcmutil.jar"/&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/SAP JVM 6 (61_REL i486 opt)"/&gt;
      &lt;classpathentry kind="lib" path="xxx/fop-1.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxxcommons-io-1.3.1.jar"/&gt;
      &lt;classpathentry kind="lib" path="xxxxmlgraphics-commons-1.5.jar"/&gt;
      &lt;classpathentry kind="output" path="classes.api"/&gt;
  &lt;/classpath&gt;
  </code></pre>
  
  <p>Researching on internet, I add particular fop-1.1.jar based on <a href="https://mvnrepository.com/artifact/org.apache.xmlgraphics/fop/1.1" rel="nofollow noreferrer">link</a></p>
  
  <p>but the issue still happens. Please advise me. </p>