ptlvash / indic-jasper

Automatically exported from code.google.com/p/indic-jasper
0 stars 1 forks source link

Error Loading Object While calling JRLoader(sourceFile) #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1.Including jasperreports-3.5.1.jar in the class path instead of    
jasperreports-1.0.0.jar

2. Replacing import net.sf.jasperreports.engine.export.JRPdfExporter; 
   with import in.cdac.ilcg.jasperreports.pdfexporter.JRPdfExporter; 

3. Including OpenOffice Libraries in the class path.

What is the expected output? What do you see instead?
Instead of the generated report,getting "Error Loading Object from file" 
in the browser.No error in the console.

What version of the product are you using? On what operating system?
Product :JDK 1.4,
         jasperreports-3.5.1.jar 
         and apache-ant-1.7.0 to compile JRXML 
OS      : Microsoft Windows XP Professional

Please provide any additional information below.

We need to generate the pdf for indic scripts.We are using Jasper Reports 
and trying to generate the pdf using OpenOffice API.

Getting "Error Loading Object from file"  while calling loadObject method 
from JRLaoder class.As per the below code snippet

JasperReport jasperReport = (JasperReport)JRLoader.loadObject(sourceFile);

and 

The Apllication works fine if v use 

import net.sf.jasperreports.engine.export.JRPdfExporter;

and inlcuding only jasperreports-1.0.0.jar and excluding Open Office 
libraries from the class path.

Original issue reported on code.google.com by poornima...@gmail.com on 10 May 2010 at 7:46

GoogleCodeExporter commented 8 years ago
You need to update JDK version, because annotations are not supported in JDK 
1.4.

You have to rebuild JasperReports source by including the source in our 
patch(please
follow the Installation steps given in our home page), if you have done it 
already
check for folder names "in" and "OOO" in your jasperreports.jar for the 
confirmation.

Original comment by laxman.c...@gmail.com on 10 May 2010 at 8:29

GoogleCodeExporter commented 8 years ago
By Removing annotations from the source can we use JDK 1.4?

I have done the installation as per steps specified in the Home page.

"Rebuild JasperReports source by including the source in our patch!" I didnt 
get 
what exactly u mean.can u pls elobarate on the same.

Original comment by poornima...@gmail.com on 10 May 2010 at 9:04

GoogleCodeExporter commented 8 years ago
I have rebuilt the jasper reports in the  following way..

1. I  removed the annotation from the patch, I compiled using jdk1.4. I had 
merge 
the class files to the existing jasperreports-3.5.1.jar.

2. I compiled  the ".jrxml" files from Jasper Reports root folder using the new 
jar 
file.

Stil i m facing the same prob. 

Please rectify me if I'm wrong..

Original comment by poornima...@gmail.com on 10 May 2010 at 9:52

GoogleCodeExporter commented 8 years ago
Can you please upload your jasperreports.jar file?

Original comment by laxman.c...@gmail.com on 10 May 2010 at 11:36

GoogleCodeExporter commented 8 years ago
Pls find the attached.

Original comment by poornima...@gmail.com on 10 May 2010 at 12:13

Attachments:

GoogleCodeExporter commented 8 years ago
I'm getting the error in the console.pls find the attachd screen shot for the 
same.it may require to suggest the solution.

Original comment by poornima...@gmail.com on 10 May 2010 at 12:38

Attachments:

GoogleCodeExporter commented 8 years ago
There is a patch update 1.1, please check with the new source.

(Make sure your application is running with jasperreports 3.5.1 without 
including our
patch)

Original comment by laxman.c...@gmail.com on 11 May 2010 at 7:01

GoogleCodeExporter commented 8 years ago
Application is not running with jasperreports 3.5.1...The application is 
working 
fine only with jasperreports-1.0.0.

Do we need to redevelope all the reports with jasperreports 3.5.1 ?

Original comment by poornima...@gmail.com on 11 May 2010 at 9:08

GoogleCodeExporter commented 8 years ago
Try reporting the problem in Jasperreports mailing list, you may get a quick 
fix.

Original comment by laxman.c...@gmail.com on 11 May 2010 at 9:30

GoogleCodeExporter commented 8 years ago
I updated all of our JRXML files which is developed using iReport 2.0.1 by 
loading 
and saving in iReport 3.0.0 to use the new format.then 
I rebuilt the jasperreports with jasperreports 3.5.1.jar in the classpath.

Now the Application is working fine

But i have problem in running the application including your patch.kindly 
suggest 
how fix the problem(Error loading object from file error).

any other configuration need to be done to include yor patch? 

Original comment by poornima...@gmail.com on 12 May 2010 at 7:49

GoogleCodeExporter commented 8 years ago
The Error loading object problem is now replaced by the below error :

java.lang.NoSuchMethodError: 
in.cdac.ilcg.jasperreports.pdfexporter.JRPdfExporter.resetExportContext()V
        at in.cdac.ilcg.jasperreports.pdfexporter.JRPdfExporter.exportReport
(JRPdfExporter.java:421)
        at com.crimsonlogic.legal.esi.report.util.ReportBiz.streamReportToBrowser
(ReportBiz.java:808)
        at com.crimsonlogic.legal.esi.report.util.ReportBiz.streamGeneratedReport
(ReportBiz.java:728)
        at com.crimsonlogic.legal.esi.report.util.ReportBiz.generateReport
(ReportBiz.java:337)
        at com.crimsonlogic.legal.esi.report.servlet.ReportServlet.doGet
(ReportServlet.java:109)
        at com.crimsonlogic.legal.esi.report.servlet.ReportServlet.doPost
(ReportServlet.java:55)
        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:971)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:402)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
        at com.aesinfotech.sessiontracker.SessionTrackingFilter.doFilter
(SessionTrackingFilter.java:198)
        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
        at 
com.crimsonlogic.legal.esi.useradmin.servlet.UserAdminFilterServlet.doFilter
(UserAdminFilterServlet.java:167)

        at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
(WebAppServletContext.java:6356)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:317)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3635)
        at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2585)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>

The method resetExportContext() is present in the JRAbstractExporter class 
which is 
extended by JRPdfExporter.

we are not getting wats is the cause.it would be very helpful if u could 
provide 
some suggestions to resoleve the same.

Thanks.

Original comment by poornima...@gmail.com on 12 May 2010 at 1:19

GoogleCodeExporter commented 8 years ago
resetExportContext() method is declared as a protected method in 
JRAbstractExporter
and which is extended by the the JRPdfExporter class. So you can access the
resetExportContext() withing the JRPdfExporter class and within the package, 
but not
out side the package.

Original comment by laxman.c...@gmail.com on 13 May 2010 at 5:26

GoogleCodeExporter commented 8 years ago
I 'm accessing within JRPdfExporter class only..in the same package too..

Original comment by poornima...@gmail.com on 13 May 2010 at 9:41

GoogleCodeExporter commented 8 years ago
There are 2 questions. I'm not clear with the problem.
1) Are you modifying JRPdfExporter?
If you are modifying JRPdfExporter class file in
"in/cdac/ilcg/jasperreports/pdfexporter"then it is perfectly valid to access the
function inside the JRPdfExporter class.      or

2)Is your application importing JRPdfExporter class and then you are trying to 
access
resetExportContext() function?
If it is so then it is not possible.

Original comment by laxman.c...@gmail.com on 13 May 2010 at 12:01

GoogleCodeExporter commented 8 years ago
1. No I didn't modify the JRPdfExporter..As i thought its the replacement for 
old 
JRPdfExporter class to support indic scripts in jasper.

2. As suggested in the home page,
 In my java application file,i replaced JRPdfExporter import
statement  net.sf.jasperreports.engine.export.JRPdfExporter; 

with import in.cdac.ilcg.jasperreports.pdfexporter.JRPdfExporter; 

do we need to incorporate our logic in JRPdfExporter class  to generate the 
report? 

Original comment by poornima...@gmail.com on 13 May 2010 at 12:24

GoogleCodeExporter commented 8 years ago
No need to write your logic inside JRPdfExporter class, but where are you 
accessing
resetExportContext() function?

Original comment by laxman.c...@gmail.com on 13 May 2010 at 1:26

GoogleCodeExporter commented 8 years ago
That method is getting called in one of the finally black in the JRPdfExporter 
class.

I am not accessing that method anywhere else..

Original comment by poornima...@gmail.com on 13 May 2010 at 1:31

GoogleCodeExporter commented 8 years ago
Hi laxman,

The error :
java.lang.NoSuchMethodError:in.cdac.ilcg.jasperreports.pdfexporter.JRPdfExporter
.rese
tExportContext() was throwing bcoz of the jdk versions incompability.

the same is resolved, 
after converting the jasperreports3.5.1 project source(jdk1.5 compiled) to 
jdk1.4 
compiled source and all other related jars to the jdk1.4 compatible.
and 
Adding those jars to the class path.

Thanks for your time and suggestions. 

Original comment by poornima...@gmail.com on 19 May 2010 at 6:54