티스토리 뷰

When using this software with jdk1.5.0_04, an exception is thrown (java.lang.NoClassDefFoundError: org/apache/xpath/XPathAPI). This is because the org.apache.xpath.XPathAPI class was moved in JRE 1.5. There are two ways to solve this problem:

  1. Utilize a jar that containts the XPathAPI class (xalan-2.4.1.jar for instance). Add this jar to the CLASSPATH. The same type of approach can be used with older JREs that do not include the XPathAPI class. The disadvantage is that you are including functionality that is already available in the JRE.
  2. Alter the source code to remove the package qualification. The reference to org.apache.xpath.XPathAPI is changed to simply XPathAPI. (It is now found in com.sun.org.apache.xpath.internal.) This approach requires a separate jar to download, and is the option implemented for JRE 1.5 here.