Jump to content
Changes to the Jaspersoft community edition download ×

java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFSheet.addMergedRegion(Lorg/apache/poi/hssf/util/Region;)


n.manivel1911

Recommended Posts

Hi Guys,

am using poi-3.2-FINAL-20081019.jar currently in my project. Recently facing the below issue when trying to build an excel CSV format report in my project

java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFSheet.addMergedRegion(Lorg/apache/poi/hssf/util/Region;)

Can anyone help?

Below is the code snippet

import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.*;
String reportId = "BLRFORD";
HSSFWorkbook workbook = new HSSFWorkbook();
            HSSFSheet sheet = workbook.createSheet(reportId);
Region cellRegion1 = new Region(1, (short)3, 1, (short)4); 
            Region cellRegion2 = new Region(2, (short)3, 2, (short)4); 
            Region cellRegion3 = new Region(3, (short)3, 3, (short)4); 
            sheet.addMergedRegion(cellRegion1);

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

Link to comment
Share on other sites

Hello,

 

The java.lang.NoSuchMethodError error means that the studio is not able to find the jar in the classpath of the project. The error has two possibilities - 

  1. Either method definition doesn't exist
  2. If method definitions exist, then they might have incompatible changes i.e. you might be using a different version of jar/class during runtime.

Hence, please check if the jar exists in the classpath of the project or if there is any compatibility change. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...