• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Error while exporting to PDF/Excel  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am using EJB3 and Weblogic 10 server.
While exporting the data to PDF, this error is thrown on the screen while exporting to PDF on IE screen
Caused by: java.io.NotSerializableException: java.io.ByteArrayOutputStream

full stacktrace is :

Error 500--Internal Server Error
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****
at weblogic.rmi.internal.CBVWrapper.copy(CBVWrapper.java:57)
at com.danzas.wms.service.item.ejb.ItemAvailabilitySessionEJB_tqtjo6_ItemAvailabilitySessionLocalImpl_CBV.exportItemAvailabilityData(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:69)
at $Proxy52.exportItemAvailabilityData(Unknown Source)
at com.danzas.wms.report.export.action.ExportBeanAction.getItemAvailabilityReport(Unknown Source)
at com.danzas.wms.report.export.action.ExportBeanAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.io.NotSerializableException: java.io.ByteArrayOutputStream
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at weblogic.rmi.extensions.server.CBVOutputStream.writeObject(CBVOutputStream.java:80)
at weblogic.rmi.internal.CBVWrapper.copy(CBVWrapper.java:49)
... 27 more

same error is thrown when i am exporting to Excel with POI jar. with the description
Caused by: java.io.NotSerializableException: org.apache.poi.hssf.usermodel.HSSFWorkbook

All the jars are in the classpath.

It would be great if someone can give any insight to this issue.

I appreciate your time and help.

 
Rancher
Posts: 42973
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How, exactly, are you going about exporting your data? POI doesn't use serialization. What library are you using for the PDF export - iText? That doesn't use serialization, either.
 
Kiran Bagul
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For excel generation i'm using POI 3.0 jar and for PDF its itext jar.
From database i'm fetching the records and exporting to Excel or PDF. Its a web application. The methods for converting are called from the method which return actionforward for JSP page.
 
Ulf Dittmer
Rancher
Posts: 42973
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That doesn't really answer my question. Somehow serialization gets involved, and some objects simply aren't serializable. Are you maybe putting objects in the session?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!