Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:46:28+00:00 2026-06-15T13:46:28+00:00

I am using apache poi to open an existing excel file. public static int

  • 0

I am using apache poi to open an existing excel file.

public static int generateReport(Calendar csdate,Calendar cedate) throws Exception
{
     FileInputStream fileIn =null;
     FileOutputStream fileOut = null;
     int sum=0;//For calculating the total number of tickets
    final Workbook wb;
    fileIn =new FileInputStream("d:\\excelfiles\\TicketsReport.xlsm");
    wb = org.apache.poi.ss.usermodel.WorkbookFactory.create(fileIn);<-- Exception
    final Sheet sheet = wb.getSheet("Report");
    //rest of stuff
}

I have a servlet which takes the dates from an html page and call generateReport(). The problem is this program was running previously with same tomcat 6 version and servlet2.4 version.In eclipse there is no compile time error at the WorkbookFactory.create() line. Here’s the stack trace.

java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/WorkbookFactory
at ReportFromJira.generateReport(ReportFromJira.java:59)
at JiraReportServlet.doPost(JiraReportServlet.java:52)
at JiraReportServlet.doGet(JiraReportServlet.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)

When I manually explored the jar files I found out that.

poi-3.8-20120326.jar contains
org.apache.poi.ss.usermodel->Workbook.class file

and poi-ooxml-3.8-20120326.jar contains
org.apache.poi.ss.usermodel->WorkbookFactory.class file

I have both the jar files included in my class path.

any idea why the exception?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:46:29+00:00Added an answer on June 15, 2026 at 1:46 pm

    Just put one of the jars in the WEB-INF\lib of your WAR\EAR because that is where Tomcat Picks the jars from by default.

    Just including in eclipse project is not enough when tomcat is not being run though eclipse configuration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm able to create an excel file using apache poi. however, i want users
i want to read the 2010 excel file in java using apache poi api
I'm using Apache POI 3.6, I want to read an excel file which has
I have opened a large excel file as a Apache POI workbook (using VM
I've been using Apache POI for some time to read existing Excel 2003 files
While trying to open an excel using ApachePOI I get org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the
I am using Apache POI to parse excel file and to get values back
How to get the column names in an Excel file using Apache POI, to
I'm generating an excel file using Apache POI 3.8 , and have the need
I am writing an Excel File using Apache POI. I want to write in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.