Add MethodNotFound exceptions to the faq

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@672230 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2008-06-27 10:12:11 +00:00
parent 591894c2f6
commit f5a1872e2b

View File

@ -20,6 +20,36 @@
<!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.1//EN" "./dtd/faq-v11.dtd"> <!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.1//EN" "./dtd/faq-v11.dtd">
<faqs title="Frequently Asked Questions"> <faqs title="Frequently Asked Questions">
<faq>
<question>
My code uses some new HSSF feature, compiles fine but fails when live with a "MethodNotFoundException"
</question>
<answer>
<p>You almost certainly have an older version of POI earlier
on your classpath. Quite a few runtimes and other packages
will ship an older version of POI, so this is an easy problem
to hit without realising.</p>
<p>The best way to identify the offending earlier jar file is
with a few lines of java. These will load one of the core POI
classes, and report where it came from.</p>
<source>
ClassLoader classloader = org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader();
URL res = classloader.getResource("org/apache/poi/poifs/filesystem/POIFSFileSystem.class">
String path = res.getPath();
System.out.println("Core POI came from " + path);
</source>
</answer>
</faq>
<faq>
<question>
My code uses the scratchpad, compiles fine but fails to run with a "MethodNotFoundException"
</question>
<answer>
<p>You almost certainly have an older version earlier on your
classpath. See the answer to the similar question above for
how to track this down.</p>
</answer>
</faq>
<faq> <faq>
<question> <question>
Why is reading a simple sheet taking so long? Why is reading a simple sheet taking so long?