stream classdesc serialVersionUID = 406

0
By: Luiz Antonio Ramos Filho - luizrms stream classdesc serialVersionUID = 406 2003-07-31 08:30 When I try to generate my PDF using JSP I get this message: java.io.InvalidClassException: dori.jasper.engine.base.JRBaseReport; local class incompatible: stream classdesc serialVersionUID = 406, local class serialVersionUID = 500 The code I used is: <%@ page errorPage="error.jsp" %> <%@ page import="datasource.*" %> <%@ page import="dori.jasper.engine.*" %> <%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <% File reportFile = new File(application.getRealPath("/reports/etiquetas.jasper")); Map parameters = new HashMap(); byte[] bytes = JasperRunManager.runReportToPdf( reportFile.getPath(), parameters, new WebappDataSource() ); response.setContentType("application/pdf"); response.setContentLength(bytes.length); ServletOutputStream ouputStream = response.getOutputStream(); ouputStream.write(bytes, 0, bytes.length); ouputStream.flush(); ouputStream.close(); %> By: Gregory A. Swarthout - gswarthout RE: stream classdesc serialVersionUID = 406 2003-07-31 09:20 Sounds like you are trying to generate a report using a different version of Jasper than used to compile the report design. By: Luiz Antonio Ramos Filho - luizrms RE: stream classdesc serialVersionUID = 406 2003-07-31 09:24 I don t know how to compile without using iReport. Can you teach me? By: Gregory A. Swarthout - gswarthout RE: stream classdesc serialVersionUID = 406 2003-07-31 09:33 I personally do it as part of an Ant build process: <path id="reports.classpath"> <fileset dir="${jasperDir}/lib"/> <fileset dir="${jasperDir}/dist"/> </path> <taskdef name="jrc" classname="dori.jasper.ant.JRAntCompileTask"> <classpath refid="reports.classpath"/> </taskdef> <target name="compile-reports" depends="prepare"> <jrc destdir="${jasperOut}"> <src> <fileset dir="${jasperDefs}"> <include name="**/*.xml"/> </fileset> </src> <classpath refid="reports.classpath"/> </jrc> </target> By: Luiz Antonio Ramos Filho - luizrms RE: stream classdesc serialVersionUID = 406 2003-07-31 09:52 I think I could make it but it doesn t generate the PDF. It shows this: %PDF-1.4 %   0 obj <> stream xo  kT1  B 'ɏ .*z]O V*SPD bsp; "Izv.7 $; 0; eY   ag"   :| }n">u Û=9| .-" Y7/ Y   >  T^]D ||U    - 5     Óµ  V  ~Y > / G墺 { w     p;  )<_ [}   t; nbsp; ^  }~.2)  5 *[ß«S  `  -Y($"K'c 0Q^ +Q~>Qp '(X .o`" \"G q>'F"' bsp; 'È£.K D>?~    ;A" %a2?0,\"O?I" f quot; 'BH"?@o%2F0 '     r%9-69  >~D.?~A f>' A"' q#'    ' .È¢>A"  R"K)0? ?~ A   quot;X .,` |k&Q~ ; &2 ( Lp?O f, `  f  `\Y.{]0ZD .DA[^,-  , =+?o k  J  | 0?|   ä¯of|4C   y .9 $  "b o %?|t:      s BI _  _ %?|    9  _  _ %?|    9 $  B # J     V   .L!_ 5^| >M ndstream endobj 3 0 obj <> >> /MediaBox [0 0 1002 904] >> endobj 9 0 obj <> stream xo3R nbsp;  0Bii` 'Ë¥ `h 'Æ¥ '   ?* endstream endobj 8 0 obj <> >> /MediaBox [0 0 1002 904] >> endobj 10 0 obj [3 0 R /XYZ 0 916 0] endobj 11 0 obj [8 0 R /XYZ 0 916 0] endobj 4 0 obj <> /Widths [250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 667 0 0 667 0 0 0 389 0 0 0 0 0 0 611 0 0 556 0 722 0 0 0 0 0 0 0 0 0 0 0 500 556 444 556 444 0 0 0 278 0 0 278 0 0 500 0 0 0 0 333] >> endobj 5 0 obj <> /Widths [600 0 0 0 0 0 0 0 0 0 0 0 0 0 600 0 0 600 0 600 600 600 600 0 0 600 0 0 0 0 0 0 0 600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600 600 600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600] >> endobj 12 0 obj <> endobj 6 0 obj <> /Widths [363 0 0 0 0 0 363 363 363 363 363 363 363 363 363 363] >> endobj 2 0 obj <> endobj 1 0 obj <> endobj 13 0 obj <> endobj 14 0 obj <> endobj 15 0 obj <> endobj 16 0 obj <> endobj xref 0 17 0000000000 65535 f 0000003137 00000 n 0000003041 00000 n 0000001163 00000 n 0000001675 00000 n 0000002123 00000 n 0000002732 00000 n 0000000015 00000 n 0000001455 00000 n 0000001339 00000 n 0000001601 00000 n 0000001638 00000 n 0000002565 00000 n 0000003199 00000 n 0000003281 00000 n 0000003316 00000 n 0000003379 00000 n trailer <> startxref 3490 %%EOF And I get this error message: 2003-07-31 13:47:32,081 WARN [org.jboss.jbossweb] WARNING: Exception for /JReport/jsp/pdfLuiz.jsp java.lang.IllegalStateException at org.mortbay.jetty.servlet.ServletHttpResponse.getWriter(ServletHttpResponse. java:540) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:173) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:166) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:184) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFacto ryImpl.java:198) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.j ava:193) at org.apache.jsp.pdfLuiz_jsp._jspService(pdfLuiz_jsp.java:78) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 10) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl er.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext .java:507) at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) Thanks. By: Cesar A. Correia - cesarac RE: stream classdesc serialVersionUID = 406 2003-07-31 11:23 Hello, for compile whit iReport is very simple: exchange the jar package in directory lib of iReport from old version jasperreports-0.4.6.jar to jasperreports-0.5.0.jar.
2006 IR Open Discussion's picture
Joined: Aug 10 2006 - 3:29am
Last seen: 8 years 1 month ago

Answers:

No answers yet
Feedback
randomness