Looks like a try & failure for drop-in replacement. If a newer version of an API is not fully binary backwards compatible in terms of package structure, class names and method signatures, and one replaces an older API version by this newer API version, one gets "ClassDefNotFound" or "NoSuchMethod" type of exceptions.
This may e. g. happen with code compiled for Java 1.3 against the Java 1.4 runtime when using StringBuffer.append(StringBuffer): This signature is explicitly available in Java 1.4+ and thus a matching method call is compiled into the Java 1.3 byte code, but in a Java 1.3 RE this method is not available because in Java 1.3 StringBuffer.append(Object) is used for that purpose. The result is a NoSuchMethodError at runtime. Thus recompile your code against the new lib version, and you will immediately find deprecations and removed methods and constants. If the "client" code accessing POI is not editable for you because it is a library which you use as a third-party lib only, than chances are that you will not be able to update POI in your project without changing or updating this "POI client" lib also. :-( --cg > -----Original Message----- > From: Sander Ruitenbeek [mailto:[email protected]] > Sent: Thursday, March 12, 2009 12:21 PM > To: POI Users List > Subject: RE: removeRow() > > Hi, > > Looks like you have conflicting versions in your classpath. Did you > remove the old jars? > > Met vriendelijke groet / Kind regards, > > Sander Ruitenbeek > Developer > Quality On-Line > > Tel.: +31 (0)53-4809090 > [email protected] > www.qualityonline.nl > > Disclaimer: http://www.qualityonline.nl/disclaimer > > -----Original Message----- > From: Princess [mailto:[email protected]] > Sent: donderdag 12 maart 2009 11:44 > To: POI user > Subject: removeRow() > > HSSFSheet Sheet = wb.getSheetAt(0); > HSSFRow row = Sheet.getRow(i); > if (row != null ){ > Sheet.removeRow(row); > } > this code worked fine with POI.3.0.2-Final > > With POI 3.5-beta5 throws the following error > > java.lang.NoSuchMethodError: > org.apache.poi.hssf.usermodel.HSSFSheet.removeRow(Lorg/apache/poi/ss/use > rmodel/Row > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > !DSPAM:49b8f057326661377030032! > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
