websphere 7.0 の WEB-INF lib ディレクトリに fop.jar を含めましたClassNotFoundException
。Apache-FOP
ライブラリに xmlgraphics-commons-1.4.jar を追加すると、検証エラーがスローされます。
Caused by: java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=org/apache/fop/fo/ElementMappingRegistry, method=findFOMaker(Ljava/lang/String;Ljava/lang/String;Lorg/xml/sax/Locator;)Lorg/apache/fop/fo/ElementMapping$Maker;, pc=127
Caused by: java.lang.NoClassDefFoundError: org.apache.xmlgraphics.image.loader.ImageContext
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:274)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:768)
at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:687)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:510)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
at cat.gis.portal.servicehistory.controllers.EquipmentServiceHistoryDetailsViewController.generatePDF(EquipmentServiceHistoryDetailsViewController.java:281)
at cat.gis.portal.servicehistory.controllers.EquipmentServiceHistoryDetailsViewController.workOrderDetailsView(EquipmentServiceHistoryDetailsViewController.java:205)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:362)
at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:349)
at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleResource(AnnotationMethodHandlerAdapter.java:296)
at org.springframework.web.portlet.DispatcherPortlet.doResourceService(DispatcherPortlet.java:825)
... 119 more
Caused by: java.lang.ClassNotFoundException: org.apache.xmlgraphics.image.loader.ImageContext
at java.net.URLClassLoader.findClass(URLClassLoader.java:421)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:652)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:540)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:508)
at java.lang.ClassLoader.loadClass(ClassLoader.java:618)
... 137 more
アップデート
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output encoding="iso-8859-1" />
<xsl:template match ="services">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="service">
<fo:region-body></fo:region-body>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="service">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:table>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="solid 1px black"
text-align="center" font-weight="bold">
<fo:block>Service Id</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px black"
text-align="center" font-weight="bold">
<fo:block>Open Date</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px black"
text-align="center" font-weight="bold">
<fo:block>Close Date</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px black"
text-align="center" font-weight="bold">
<fo:block>Order Status</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px black"
text-align="center" font-weight="bold">
<fo:block>Description</fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px black"
text-align="center" font-weight="bold">
<fo:block>Repair Cost</fo:block>
</fo:table-cell>
</fo:table-row>
<xsl:for-each select="./service">
<fo:table-row>
<fo:table-cell border="solid 1px bold" text-align="center">
<fo:block><xsl:value-of select="serviceId" /></fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px bold" text-align="center">
<fo:block><xsl:value-of select="openDate" /></fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px bold" text-align="center">
<fo:block><xsl:value-of select="closeDate" /></fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px bold" text-align="center">
<fo:block><xsl:value-of select="orderStatus" /></fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px bold" text-align="center">
<fo:block><xsl:value-of select="description" /></fo:block>
</fo:table-cell>
<fo:table-cell border="solid 1px bold" text-align="center">
<fo:block><xsl:value-of select="repairCost" /></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>