NoSuchMethodError (a Real Strange Solution with JasperReport)

2009 Oktober 9
by Putri Chairina

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 :

deprecated

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

Strange things do happen in proggramming, huh?!

Hmphhh…

2 Tanggapan leave one →
  1. 2009 November 17

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

    • 2009 November 17

      Hmm.. Thanks for correcting, kur.
      I need to learn A LOT from you. :D

Tinggalkan Balasan

Note: You can use basic XHTML in your comments. Your email address will never be published.

Berlangganan umpan komentar ini melalui RSS