NoSuchMethodError (a Real Strange Solution with JasperReport)

One day, when I want to used JasperReport xls-exporter feature, I’ve got this kind of error :


java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFCell.getColoumnIndex()


My development environtment was :

  • JDK 1.6
  • Netbeans 6.5

This error was happened when I changed my JasperReport from POI-3.1 to POI-3.2, due to the exporting feature that I need. From POI-3.2, I’ve got the new feature that I want. But on the other hand, there are several functions that has been deprecated in the POI-3.2. Including the getCellNum(). This function has been changed to getColoumIndex().

So I switch the function. From getCellNum() to getColoumIndex(). But JasperReport seems to unrecognized this function. Strange, wasn’t it?

After several times searching on Google and trying some alternatives, I’ve get stucked! And then without any serious purpose, I wrote the depracated function, getCellNum(), right before the getColoumIndex() function. This is what I’ve done :


After that, I re-build the project. The error message has gone. And my website running well!

Strange things do happen in proggramming, huh?!


0 Replies to “NoSuchMethodError (a Real Strange Solution with JasperReport)”

  1. There’s no such strange thing in programming. When you think there is, you don’t understand well enough.

    1. Hmm.. Thanks for correcting, kur.
      I need to learn A LOT from you. 😀

Leave a Reply