Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » how to configure where BIRT cache is located
how to configure where BIRT cache is located [message #653193] Tue, 08 February 2011 19:16 Go to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
to configure where the "BirtDataTemp..." directories are created?
presently, by default, they are showing up in "/tmp" directory, but we
would like to locate then in a application specific area, somewhere
under "${birt home}" preferably.
Re: how to configure where BIRT cache is located [message #653202 is a reply to message #653193] Tue, 08 February 2011 20:51 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

John,

Currently this comes from either the engine config or the system property:
System.getProperty( "java.io.tmpdir" );

If using the api just do

EngineConfig config = new EngineConfig();
config.setTempDir("yourlocation");

If using the viewer set the system property above on the app server
startup or put script like this in a report's before factory (if its
changed once it will affect all other reports ran afterwards):

reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "yourlocation");

Jason

On 2/8/2011 2:16 PM, John Yotka wrote:
> we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
> to configure where the "BirtDataTemp..." directories are created?
> presently, by default, they are showing up in "/tmp" directory, but we
> would like to locate then in a application specific area, somewhere
> under "${birt home}" preferably.
Re: how to configure where BIRT cache is located [message #653491 is a reply to message #653202] Wed, 09 February 2011 22:40 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 2/8/2011 1:51 PM, Jason Weathersby wrote:
> John,
>
> Currently this comes from either the engine config or the system property:
> System.getProperty( "java.io.tmpdir" );
>
> If using the api just do
>
> EngineConfig config = new EngineConfig();
> config.setTempDir("yourlocation");
>
> If using the viewer set the system property above on the app server
> startup or put script like this in a report's before factory (if its
> changed once it will affect all other reports ran afterwards):
>
> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "yourlocation");
>
>
> Jason
>
> On 2/8/2011 2:16 PM, John Yotka wrote:
>> we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
>> to configure where the "BirtDataTemp..." directories are created?
>> presently, by default, they are showing up in "/tmp" directory, but we
>> would like to locate then in a application specific area, somewhere
>> under "${birt home}" preferably.
>
Thanks for the info, I'm trying to test, so first I wanted to validate
where the "BirtDataTemp..." folders where getting created on my test
system, before I implement the change. Now I can't seem to get the
folders to be created. I've run several reports and no instances of the
folders has shown up, but I have found old ones on my test system.
Under what conditions do these folders get created (again we are using
version 2.2.1)? Thanks again for your help.
Re: how to configure where BIRT cache is located [message #653693 is a reply to message #653202] Thu, 10 February 2011 17:24 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 2/8/2011 1:51 PM, Jason Weathersby wrote:
> John,
>
> Currently this comes from either the engine config or the system property:
> System.getProperty( "java.io.tmpdir" );
>
> If using the api just do
>
> EngineConfig config = new EngineConfig();
> config.setTempDir("yourlocation");
>
> If using the viewer set the system property above on the app server
> startup or put script like this in a report's before factory (if its
> changed once it will affect all other reports ran afterwards):
>
> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "yourlocation");
>
>
> Jason
>
> On 2/8/2011 2:16 PM, John Yotka wrote:
>> we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
>> to configure where the "BirtDataTemp..." directories are created?
>> presently, by default, they are showing up in "/tmp" directory, but we
>> would like to locate then in a application specific area, somewhere
>> under "${birt home}" preferably.
>
Jason,

We are not using the API so I've implemented this in a report script and
am getting an error, here is what I put into the "before factory" script:

reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "C:\birt\tmp");

and this is the error:

Caused by: org.mozilla.javascript.EcmaError: TypeError: getEngine is not
a function. (<inline>#1)

Is getEngine() not available in 2.2.1 or is it misspelled, or ...?
Re: how to configure where BIRT cache is located [message #653700 is a reply to message #653693] Thu, 10 February 2011 18:20 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Try:

reportContext.getReportRunnable().getReportEngine().getConfi g().setTempDir( "c:/test");

Jason

On 2/10/2011 12:24 PM, John Yotka wrote:
> On 2/8/2011 1:51 PM, Jason Weathersby wrote:
>> John,
>>
>> Currently this comes from either the engine config or the system
>> property:
>> System.getProperty( "java.io.tmpdir" );
>>
>> If using the api just do
>>
>> EngineConfig config = new EngineConfig();
>> config.setTempDir("yourlocation");
>>
>> If using the viewer set the system property above on the app server
>> startup or put script like this in a report's before factory (if its
>> changed once it will affect all other reports ran afterwards):
>>
>> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "yourlocation");
>>
>>
>>
>> Jason
>>
>> On 2/8/2011 2:16 PM, John Yotka wrote:
>>> we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
>>> to configure where the "BirtDataTemp..." directories are created?
>>> presently, by default, they are showing up in "/tmp" directory, but we
>>> would like to locate then in a application specific area, somewhere
>>> under "${birt home}" preferably.
>>
> Jason,
>
> We are not using the API so I've implemented this in a report script and
> am getting an error, here is what I put into the "before factory" script:
>
> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "C:\birt\tmp");
>
>
> and this is the error:
>
> Caused by: org.mozilla.javascript.EcmaError: TypeError: getEngine is not
> a function. (<inline>#1)
>
> Is getEngine() not available in 2.2.1 or is it misspelled, or ...?
Re: how to configure where BIRT cache is located [message #653726 is a reply to message #653700] Thu, 10 February 2011 20:25 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 2/10/2011 11:20 AM, Jason Weathersby wrote:
> Try:
>
> reportContext.getReportRunnable().getReportEngine().getConfi g().setTempDir( "c:/test");
>
>
> Jason
>
> On 2/10/2011 12:24 PM, John Yotka wrote:
>> On 2/8/2011 1:51 PM, Jason Weathersby wrote:
>>> John,
>>>
>>> Currently this comes from either the engine config or the system
>>> property:
>>> System.getProperty( "java.io.tmpdir" );
>>>
>>> If using the api just do
>>>
>>> EngineConfig config = new EngineConfig();
>>> config.setTempDir("yourlocation");
>>>
>>> If using the viewer set the system property above on the app server
>>> startup or put script like this in a report's before factory (if its
>>> changed once it will affect all other reports ran afterwards):
>>>
>>> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "yourlocation");
>>>
>>>
>>>
>>>
>>> Jason
>>>
>>> On 2/8/2011 2:16 PM, John Yotka wrote:
>>>> we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
>>>> to configure where the "BirtDataTemp..." directories are created?
>>>> presently, by default, they are showing up in "/tmp" directory, but we
>>>> would like to locate then in a application specific area, somewhere
>>>> under "${birt home}" preferably.
>>>
>> Jason,
>>
>> We are not using the API so I've implemented this in a report script and
>> am getting an error, here is what I put into the "before factory" script:
>>
>> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "C:\birt\tmp");
>>
>>
>>
>> and this is the error:
>>
>> Caused by: org.mozilla.javascript.EcmaError: TypeError: getEngine is not
>> a function. (<inline>#1)
>>
>> Is getEngine() not available in 2.2.1 or is it misspelled, or ...?
>
Jason, thanks that resolved the error. Now in my testing I don't seem
to be generating the "BirtDataTemp..." folders, I've run several reports
and no instances of the folders has shown up. I have old ones on my test
system. Under what conditions do these folders get created (again we are
using version 2.2.1)? Thanks again for your help.
Re: how to configure where BIRT cache is located [message #653728 is a reply to message #653726] Thu, 10 February 2011 20:34 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I believe these happen when you have large datasets that are cached to disk.

Jason

On 2/10/2011 3:25 PM, John Yotka wrote:
> On 2/10/2011 11:20 AM, Jason Weathersby wrote:
>> Try:
>>
>> reportContext.getReportRunnable().getReportEngine().getConfi g().setTempDir( "c:/test");
>>
>>
>>
>> Jason
>>
>> On 2/10/2011 12:24 PM, John Yotka wrote:
>>> On 2/8/2011 1:51 PM, Jason Weathersby wrote:
>>>> John,
>>>>
>>>> Currently this comes from either the engine config or the system
>>>> property:
>>>> System.getProperty( "java.io.tmpdir" );
>>>>
>>>> If using the api just do
>>>>
>>>> EngineConfig config = new EngineConfig();
>>>> config.setTempDir("yourlocation");
>>>>
>>>> If using the viewer set the system property above on the app server
>>>> startup or put script like this in a report's before factory (if its
>>>> changed once it will affect all other reports ran afterwards):
>>>>
>>>> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "yourlocation");
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Jason
>>>>
>>>> On 2/8/2011 2:16 PM, John Yotka wrote:
>>>>> we are using BIRT 2.2.1 due to Java 1.4 considerations, is there a way
>>>>> to configure where the "BirtDataTemp..." directories are created?
>>>>> presently, by default, they are showing up in "/tmp" directory, but we
>>>>> would like to locate then in a application specific area, somewhere
>>>>> under "${birt home}" preferably.
>>>>
>>> Jason,
>>>
>>> We are not using the API so I've implemented this in a report script and
>>> am getting an error, here is what I put into the "before factory"
>>> script:
>>>
>>> reportContext.getReportRunnable().getEngine().getConfig().se tTempDir( "C:\birt\tmp");
>>>
>>>
>>>
>>>
>>> and this is the error:
>>>
>>> Caused by: org.mozilla.javascript.EcmaError: TypeError: getEngine is not
>>> a function. (<inline>#1)
>>>
>>> Is getEngine() not available in 2.2.1 or is it misspelled, or ...?
>>
> Jason, thanks that resolved the error. Now in my testing I don't seem to
> be generating the "BirtDataTemp..." folders, I've run several reports
> and no instances of the folders has shown up. I have old ones on my test
> system. Under what conditions do these folders get created (again we are
> using version 2.2.1)? Thanks again for your help.
Re: how to configure where BIRT cache is located [message #726686 is a reply to message #653202] Mon, 19 September 2011 09:27 Go to previous messageGo to next message
CJ48  is currently offline CJ48 Friend
Messages: 4
Registered: September 2011
Junior Member
Hi,
I am new to birt. My application generates flat text files, and these flat text files are used by birt to generate excel files. But while generating these excel files
some temporary files are created in my system's default Temp folder. I have created an environment variable MY_TEMP and I have given it's value as 'D:\my_temp_dir'. I want birt to use this temp location instead of the default location, Thanx in advance.
Re: how to configure where BIRT cache is located [message #726783 is a reply to message #726686] Mon, 19 September 2011 14:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Are you running the reports with the Viewer or the RE API? If no temp
dir is set in the EngineConfig class the default system property
java.io.tmpdir is used.

Jason

On 9/19/2011 5:27 AM, CJ48 wrote:
> Hi,
> I am new to birt. My application generates flat text files, and these
> flat text files are used by birt to generate excel files. But while
> generating these excel files some temporary files are created in my
> system's default Temp folder. I have created an environment variable
> MY_TEMP and I have given it's value as 'D:\my_temp_dir'. I want birt to
> use this temp location instead of the default location, Thanx in advance.
Re: how to configure where BIRT cache is located [message #727143 is a reply to message #726783] Tue, 20 September 2011 14:08 Go to previous message
CJ48  is currently offline CJ48 Friend
Messages: 4
Registered: September 2011
Junior Member
Jason I used the following code in my application's BirtReportHelper.java:

EngineConfig config = new EngineConfig();
String sparkTemp = System.getenv( "SPARK_TEMP" );
config.setTempDir( sparkTemp );
It's now working for me. Thank you so much Jason.

But Jason what is the difference between running report with the viewer and with Report Engine API. I have ReportEngine and WebViewerExample folders in my deploy/BIRT location and one birt.war file. So I guess this application uses viewer. Thanks a lot again.
Previous Topic:dynamic image with Birt 3.7
Next Topic:How Do I Access Data Set Parameters From Scripted Data Source?
Goto Forum:
  


Current Time: Fri Apr 19 23:13:07 GMT 2024

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

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

Back to the top