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 :

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…

Iklan

2 thoughts on “NoSuchMethodError (a Real Strange Solution with JasperReport)

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s