Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Report API is caching results
Report API is caching results [message #261003] Fri, 09 November 2007 00:31 Go to next message
Andrew Berman is currently offline Andrew BermanFriend
Messages: 10
Registered: July 2009
Junior Member
I have done multiple searches on this and nothing seems to really have a
definitive answer on how to get rid of caching. I am using version 2.2.1
of BIRT. When I run multiple reports in succession using the API, the
first report's data exists in the remaining reports. The only thing I
have found is from Jason which says: "Are you rewriting the rptdocument?
Dataset results get cached in the rptdocument. Try deleting the report
document or using a different name."

I have no idea what it means to delete the report document. What report
document? I'm not creating anything. The pertaining lines of my code to
open and run the report are below:

runnable = engine.openReportDesign(resource.getInputStream());
IRunAndRenderTask runAndRenderTask =
engine.createRunAndRenderTask(runnable);
runAndRenderTask.run();
runAndRenderTask.close();

Does anyone know how to get rid of this caching? Thank you for any help
you can provide!

Andrew
Re: Report API is caching results [message #261057 is a reply to message #261003] Fri, 09 November 2007 17:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Andrew,

Caching should be disabled by default. Can you post the code and the
report?

Thanks

Jason

Andrew wrote:
> I have done multiple searches on this and nothing seems to really have a
> definitive answer on how to get rid of caching. I am using version
> 2.2.1 of BIRT. When I run multiple reports in succession using the API,
> the first report's data exists in the remaining reports. The only thing
> I have found is from Jason which says: "Are you rewriting the
> rptdocument? Dataset results get cached in the rptdocument. Try
> deleting the report document or using a different name."
> I have no idea what it means to delete the report document. What report
> document? I'm not creating anything. The pertaining lines of my code
> to open and run the report are below:
>
> runnable = engine.openReportDesign(resource.getInputStream());
> IRunAndRenderTask runAndRenderTask =
> engine.createRunAndRenderTask(runnable);
> runAndRenderTask.run(); runAndRenderTask.close();
>
> Does anyone know how to get rid of this caching? Thank you for any help
> you can provide!
>
> Andrew
>
Re: Report API is caching results [message #261096 is a reply to message #261003] Fri, 09 November 2007 23:20 Go to previous messageGo to next message
Gary Xue is currently offline Gary XueFriend
Messages: 193
Registered: July 2009
Senior Member
Andrew,
Do you mean that you always get the same data from multiple runs of the same
report, even when the data source changes? This really shouldn't happen
because BIRT does not cache data set data unless you specifically turn it
on. Just to be sure, try the following diagnostic steps:
(1) Open your Java temp file directory (where java.io.temp points to; this
is usually your user temp file directory). Clear this directory as much as
you can.
(2) Run your report design once
(3) Delete any files/folders in the temp file directory that may have been
created after step (2)
(4) Run the report again - do you still see stale data?

If deleting the temp files resolve your problem, please open a Bugzilla so
we can look into this.

--
Gary Xue [Actuate Corporation | BIRT Committer]
Get BIRT Tips at: http://birt-exchange.com/


"Andrew" <atberman@yahoo.com> wrote in message
news:8d328685687158d768051a3f2f96a0ab$1@www.eclipse.org...
>I have done multiple searches on this and nothing seems to really have a
>definitive answer on how to get rid of caching. I am using version 2.2.1
>of BIRT. When I run multiple reports in succession using the API, the
>first report's data exists in the remaining reports. The only thing I have
>found is from Jason which says: "Are you rewriting the rptdocument?
>Dataset results get cached in the rptdocument. Try deleting the report
>document or using a different name."
> I have no idea what it means to delete the report document. What report
> document? I'm not creating anything. The pertaining lines of my code to
> open and run the report are below:
>
> runnable = engine.openReportDesign(resource.getInputStream());
> IRunAndRenderTask runAndRenderTask =
> engine.createRunAndRenderTask(runnable);
> runAndRenderTask.run(); runAndRenderTask.close();
>
> Does anyone know how to get rid of this caching? Thank you for any help
> you can provide!
>
> Andrew
>
Re: Report API is caching results [message #261104 is a reply to message #261057] Sat, 10 November 2007 00:10 Go to previous messageGo to next message
Andrew Berman is currently offline Andrew BermanFriend
Messages: 10
Registered: July 2009
Junior Member
Jason,

Thanks for the quick reply. I actually cannot attach the report as it does
show the data structure for a project for my company. The code is pretty
much what I've attached aside from some parameters I pass along. I am
using Spring integration as per this url
(http://blog.xebia.com/2006/08/29/reporting-the-eclipse-way/) so that code
is pretty much what he has to set up BIRT. Here is the bulk of my report
API code:

IReportRunnable runnable = null;
try {
runnable = engine.openReportDesign(resource.getInputStream());
} catch (EngineException e) {
throw new ReportException(
"There was a problem opening the report design. Please see
the author of the report.",
e);
} catch (IOException e) {
throw new ReportException(
"Problem locating the report. Please make sure it is in the
classpath.",
e);
}

if (runnable != null) {
IRunAndRenderTask runAndRenderTask = engine
.createRunAndRenderTask(runnable);
RenderOption renderOption = new RenderOption();
renderOption.setOutputFormat(BirtReportOutputType
.getBirtReportOutputType(type).getType());
renderOption.setOutputStream(ostream);
runAndRenderTask.setRenderOption(renderOption);
runAndRenderTask.setParameterValues(parameters);
try {
runAndRenderTask.run();
} catch (EngineException e) {
throw new ReportException(
"The report failed to run. Please see the log files for
more information",
e);
}

runAndRenderTask.close();
}
Re: Report API is caching results [message #261108 is a reply to message #261096] Sat, 10 November 2007 00:13 Go to previous messageGo to next message
Andrew Berman is currently offline Andrew BermanFriend
Messages: 10
Registered: July 2009
Junior Member
Hi Gary,

What is happening is that I am running the report multiple times and
changing the parameters each time, not the datasource itself. The
parameters do include the jdbc info, but they also include other things
that just change the resultset.

I'll give the temp dir stuff a shot.

Thanks,

Andrew
Re: Report API is caching results [message #261112 is a reply to message #261108] Sat, 10 November 2007 00:16 Go to previous messageGo to next message
Andrew Berman is currently offline Andrew BermanFriend
Messages: 10
Registered: July 2009
Junior Member
One more thing, if I run my standalone program once for the report and
then let everything shutdown and the program quit, and then run the report
again it works. The problem is when I run multiple reports in succession
within the same run of my program. Hopefully that makes sense....

Thanks again,

Andrew
Re: Report API is caching results [message #261119 is a reply to message #261108] Sat, 10 November 2007 19:37 Go to previous messageGo to next message
Gary Xue is currently offline Gary XueFriend
Messages: 193
Registered: July 2009
Senior Member
Andrew,
One more thing to try - add a few data items to the report to dump the
values of all your report parameters. Check them to make sure the report is
receiving the correct parameter values.

--
Gary Xue [Actuate Corporation | BIRT Committer]
Get BIRT Tips at: http://birt-exchange.com/


"Andrew" <atberman@yahoo.com> wrote in message
news:f2eb03a720123b87da8e9fed26c301a2$1@www.eclipse.org...
> Hi Gary,
>
> What is happening is that I am running the report multiple times and
> changing the parameters each time, not the datasource itself. The
> parameters do include the jdbc info, but they also include other things
> that just change the resultset.
>
> I'll give the temp dir stuff a shot.
>
> Thanks,
>
> Andrew
>
Re: Report API is caching results [message #261133 is a reply to message #261112] Mon, 12 November 2007 06:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: msjackson1019.gmail.com

Are you using crosstabs/cubes in these reports? I am having the same
problem as you, but it is only with the cubes in my reports. There is a
bugzilla entry related to this issue, although it's not very descriptive:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=208511
Re: Report API is caching results [message #261196 is a reply to message #261096] Mon, 12 November 2007 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: msjackson1019.gmail.com

Gary,
I tried your suggestions to delete the temporary files and folders created
by BIRT after running my report the first time, but I ran into some errors
when I tried to run the second time.

Here is the information it logs when I try to run the second time (after
clearing my temp folder):

Nov 12, 2007 8:38:04 AM org.eclipse.birt.data.engine.impl.DataEngineImpl
<init>
INFO: Data Engine starts up
Nov 12, 2007 8:38:04 AM
org.eclipse.birt.data.engine.odaconsumer.ConnectionManager
addProfileProviderService( Map )
INFO: Added default property service:
org.eclipse.datatools.connectivity.oda.profile.connectionPro pertyService
Nov 12, 2007 8:38:05 AM
org.eclipse.birt.report.engine.data.dte.DteDataEngine doPrepareQuery
SEVERE: There is an error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
There is an error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
org.eclipse.birt.report.data.adapter.api.AdapterException: There is an
error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
There is an error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
at
org.eclipse.birt.report.data.adapter.impl.DataRequestSession Impl.prepare(DataRequestSessionImpl.java:476)
at
org.eclipse.birt.report.engine.data.dte.DteDataEngine.doPrep areQuery(DteDataEngine.java:100)
at
org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.p repare(AbstractDataEngine.java:138)
at
org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:94)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:59)
at
org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplciateReportExecutor.execute(SuppressDuplciateReportExec utor.java:51)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportExecutor.execute(WrappedReportExecutor.java:59)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:138)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:68)
at com.boeing.engine.ReportRunner.runReport(ReportRunner.java:1 80)
at
com.boeing.rmi.ReportEngineImpl.executeReport(ReportEngineIm pl.java:149)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.ja va:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspo rt.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCP Transport.java:701)
at java.lang.Thread.run(Thread.java:534)
Nov 12, 2007 8:38:05 AM
org.eclipse.birt.data.engine.odaconsumer.ConnectionManager
addProfileProviderService( Map )
INFO: Added default property service:
org.eclipse.datatools.connectivity.oda.profile.connectionPro pertyService
Nov 12, 2007 8:38:05 AM
org.eclipse.birt.report.engine.data.dte.DteDataEngine doExecuteQuery
SEVERE: There is an error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
Nov 12, 2007 8:38:05 AM
org.eclipse.birt.report.engine.data.dte.DteDataEngine doExecuteCube
SEVERE: There is an error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
There is an error in saving files of data set cache.
C:\Documents and Settings\myuserid\Local
Settings\Temp\BirtDataTemp11948772926810\session_11948772926 960\data.data
(The system cannot find the path specified)
Nov 12, 2007 8:38:05 AM
org.eclipse.birt.report.item.crosstab.core.re.executor.Cross tabReportItemExecutor
execute
SEVERE: The cube result for crosstab is invalid(=null).
Nov 12, 2007 8:38:05 AM org.eclipse.birt.data.engine.impl.DataEngineImpl
shutdown
INFO: Data engine shuts down


I then restarted my report server and ran the report. This time I just
deleted the files inside of the BirtDataTemp...\session... folders and
re-ran the report. This seemed to work and the data from the second run
was correct. This definitely seems like a bug to me.

Thanks,
Erica Jackson
Re: Report API is caching results [message #261228 is a reply to message #261196] Mon, 12 November 2007 15:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: msjackson1019.gmail.com

I did some further checking and it seems that the problem is not with
cubes, but with multiple data sets. I have a report with a cube that only
has one data set, so I tested it and it seems to be working fine. I also
have a report without any cubes with multiple datasets and I am noticing
the same problem of the data not refreshing with this report.

I did notice there is a method that deletes the temporary files in the
DataEngineImpl class. It looks like it only deletes one folder, even
though when you have multiple data sets, it creates a temporary folder for
each dataset.
Re: Report API is caching results [message #261265 is a reply to message #261228] Mon, 12 November 2007 19:19 Go to previous messageGo to next message
Gary Xue is currently offline Gary XueFriend
Messages: 193
Registered: July 2009
Senior Member
Erica,
Can you open a Bugzilla and attach a report design that can demonstrate the
problem?

thanks,

--
Gary Xue [Actuate Corporation | BIRT Committer]
Get BIRT Tips at: http://birt-exchange.com/


"Erica Jackson" <msjackson1019@gmail.com> wrote in message
news:995121af4948d2b60e9e866731345878$1@www.eclipse.org...
>I did some further checking and it seems that the problem is not with
>cubes, but with multiple data sets. I have a report with a cube that only
>has one data set, so I tested it and it seems to be working fine. I also
>have a report without any cubes with multiple datasets and I am noticing
>the same problem of the data not refreshing with this report.
> I did notice there is a method that deletes the temporary files in the
> DataEngineImpl class. It looks like it only deletes one folder, even
> though when you have multiple data sets, it creates a temporary folder for
> each dataset.
Re: Report API is caching results [message #261289 is a reply to message #261228] Tue, 13 November 2007 08:21 Go to previous messageGo to next message
Lin Zhu is currently offline Lin ZhuFriend
Messages: 72
Registered: July 2009
Member
Hi Erica,

We do have data caching bug when multiple data sets are used in the cube.
However when the cube only involves one data set, or no cube exists in the
report design, I cannot reproduce the problem.

Is that possible for you to attach the report design that has multiple data
set w/o cube?

Thanks.
Liin

"Erica Jackson" <msjackson1019@gmail.com> wrote in message
news:995121af4948d2b60e9e866731345878$1@www.eclipse.org...
>I did some further checking and it seems that the problem is not with
>cubes, but with multiple data sets. I have a report with a cube that only
>has one data set, so I tested it and it seems to be working fine. I also
>have a report without any cubes with multiple datasets and I am noticing
>the same problem of the data not refreshing with this report.
> I did notice there is a method that deletes the temporary files in the
> DataEngineImpl class. It looks like it only deletes one folder, even
> though when you have multiple data sets, it creates a temporary folder for
> each dataset.
Re: Report API is caching results [message #261293 is a reply to message #261003] Tue, 13 November 2007 08:24 Go to previous messageGo to next message
Lin Zhu is currently offline Lin ZhuFriend
Messages: 72
Registered: July 2009
Member
Hi Andrew,

BIRT does have cache problem when deal with report design that includes cube
definition that refer multiple data set. Is that the nature of your report
design that of problem? If this is the case then it has already been
addressed by this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=208511 .

Thanks.
Lin

"Andrew" <atberman@yahoo.com> wrote in message
news:8d328685687158d768051a3f2f96a0ab$1@www.eclipse.org...
>I have done multiple searches on this and nothing seems to really have a
>definitive answer on how to get rid of caching. I am using version 2.2.1
>of BIRT. When I run multiple reports in succession using the API, the
>first report's data exists in the remaining reports. The only thing I have
>found is from Jason which says: "Are you rewriting the rptdocument?
>Dataset results get cached in the rptdocument. Try deleting the report
>document or using a different name."
> I have no idea what it means to delete the report document. What report
> document? I'm not creating anything. The pertaining lines of my code to
> open and run the report are below:
>
> runnable = engine.openReportDesign(resource.getInputStream());
> IRunAndRenderTask runAndRenderTask =
> engine.createRunAndRenderTask(runnable);
> runAndRenderTask.run(); runAndRenderTask.close();
>
> Does anyone know how to get rid of this caching? Thank you for any help
> you can provide!
>
> Andrew
>
Re: Report API is caching results [message #261365 is a reply to message #261293] Wed, 14 November 2007 06:35 Go to previous messageGo to next message
Andrew Berman is currently offline Andrew BermanFriend
Messages: 10
Registered: July 2009
Junior Member
Yes, that is the problem. I am using a cube. Is there any estimation on
when this will be fixed. I mean, it literally makes BIRT useless to me
and I'm going to have to switch to a new reporting package.

Thanks,

Andrew
Re: Report API is caching results [message #261592 is a reply to message #261228] Sat, 17 November 2007 01:09 Go to previous message
Andrew Berman is currently offline Andrew BermanFriend
Messages: 10
Registered: July 2009
Junior Member
Yes, this seems to be the issue. I have confirmed this as well. Has a
bug been opened yet?
Previous Topic:groupped grand total
Next Topic:crosstab - dynamically hide dimension levels
Goto Forum:
  


Current Time: Thu Apr 25 14:13:04 GMT 2024

Powered by FUDForum. Page generated in 0.04267 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top