Jump to content
Changes to the Jaspersoft community edition download ×

NoClassDefFoundError


anu_spoo

Recommended Posts

Hi,

Caused by: java.lang.NoClassDefFoundError: org/apache/poi/hssf/util/HSSFColor$WHITE

 

Hi am trying to export the JasperPrint object to XLS format using the following code

 

 

public void doGenerateXLSReport(JasperPrint jasperPrint)

{

try

{

OutputStream ouputStream = new FileOutputStream(new File("C:/JrReports/Main.xls"));

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

 

JRXlsExporter exporterXLS = new JRXlsExporter();

 

exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT,jasperPrint);

exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM,byteArrayOutputStream);

exporterXLS.exportReport();

ouputStream.write(byteArrayOutputStream.toByteArray());

ouputStream.flush();

System.out.println("After XLS generation ");

ouputStream.close();

 

}

catch(Exception e)

{

e.printStackTrace();

}

 

 

}

 

I have placed required jar in the lib path also still am facing the following error can any body help ?

 

 

Error Stack trace..

 

EBCMException Caused by:

java.rmi.RemoteException: EJB Exception: ; nested exception is:

java.lang.NoClassDefFoundError: org/apache/poi/hssf/util/HSSFColor$WHITE

at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:102)

at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:296)

at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:263)

at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:140)

at com.db.ebcm.ejb.bcmdocument.BCMDocumentReport_64saob_EOImpl.getPDFDocument(BCMDocumentReport_64saob_EOImpl.java:110)

at com.db.ebcm.ejb.bcmdocument.BCMDocumentReport_64saob_EOImpl_WLSkel.invoke(Unknown Source)

at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)

at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)

at com.db.ebcm.ejb.bcmdocument.BCMDocumentReport_64saob_EOImpl_814_WLStub.getPDFDocument(Unknown Source)

at com.db.ebcm.bcmdocument.delegator.BCMDocReportDelegator.doGetPDFDocument(BCMDocReportDelegator.java:49)

at com.db.ebcm.bcmdocument.action.BCMDocumentAction.doGetPDFDocument(BCMDocumentAction.java:403)

at com.db.ebcm.bcmdocument.action.BCMDocumentAction.doSubmitBCMDocument(BCMDocumentAction.java:500)

at com.db.ebcm.bcmdocument.action.BCMDocumentAction.execute(BCMDocumentAction.java:97)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)

at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)

at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)

at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)

at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)

at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

at java.lang.Thread.startThreadFromVM(Unknown Source)

Caused by: java.lang.NoClassDefFoundError: org/apache/poi/hssf/util/HSSFColor$WHITE

at net.sf.jasperreports.engine.export.JRXlsExporter.<init>(JRXlsExporter.java:107)

at com.db.ebcm.bcmdocument.dao.BCMDocReportDAOImpl.doGenerateXLSReport(BCMDocReportDAOImpl.java:522)

at com.db.ebcm.bcmdocument.dao.BCMDocReportDAOImpl.getPDFDocument(BCMDocReportDAOImpl.java:132)

at com.db.ebcm.ejb.bcmdocument.BCMDocReportBean.getPDFDocument(BCMDocReportBean.java:27)

at com.db.ebcm.ejb.bcmdocument.BCMDocumentReport_64saob_EOImpl.getPDFDocument(BCMDocumentReport_64saob_EOImpl.java:100)

... 26 more

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...