-
1. Re: NoSuchMethodError when accessing library class.
peterj Apr 24, 2009 9:07 AM (in response to leomrlima)Perhaps at runtime you are picking up a stray version of the POI JAR file. Try this: add the "-verbose:class" JVM option to JAVA_OPTS in run.bat (Windows) or run.conf (Linux). Redirect stdout and stderr to a file (you will get a lot of output). When you runn, each time a class is loaded the JVM will tell you which JAR file contains the class. This should help you locate the offending JAR file.
-
2. Re: NoSuchMethodError when accessing library class.
leomrlima Apr 24, 2009 1:19 PM (in response to leomrlima)PeterJ, thanks for your reply.
I enabled the option. The output confirmed that the correct .jar is being used:
[Loaded org.apache.poi.hssf.usermodel.HSSFCell from file:/data/jboss/server/default/lib/poi-3.5-beta5.jar]
...
java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFCell.setCellValue(Lorg/apache/poi/hssf/usermodel/HSSFRichTextString;)V
So, any more ideas, please?
Thanks in advance,
Leonardo. -
3. Re: NoSuchMethodError when accessing library class.
peterj Apr 24, 2009 1:39 PM (in response to leomrlima)Which class is making this call (if you would have posted the full exception stack trace I would know this...)? Where did it get loaded from?
Both the callee class, and the HSSFCell class, at compile time, agreed on the signature of the setCellValue() method or else the compiler would have complained. Thus one of those classes is now incorrect.
Another possibility is that the JAR file is corrupted. Try using javap or a decompiler to view the signature for the setCellValue method.