Home » Archived » BIRT » Error on DataSetCache: There is an error in saving files of data set cache
Error on DataSetCache: There is an error in saving files of data set cache [message #1385560] |
Mon, 09 June 2014 13:26 |
andy Moses Messages: 26 Registered: November 2013 |
Junior Member |
|
|
Anyone has quick idea on below error?
I am using Birt report engine in java (1.6) to invoke a birt report design file which query against DB.
- There is an error in saving files of data set cache.
/var/tmp/DataEnginead56140e_c47333_7/DataSetCacheObject_53162667_8/data.data (No such file or directory)
data.engine.datasetcache.save.error ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There is an error in saving files of data set cache.
the eclipse birt library used in java are:
org.eclipse.birt runtime 4.3.1
org.eclipse.core runtime 3.9.0
The tool to create birt report design file is:
birt-rcp-report-designer version 4_2_2
The error appeared on the birt report itself, which part of it rendered and part of it has above error messages.
The error occurred on one machine but not happen on another machine.
The error seems disappeared after a few days some times, it happened occasionally.
When the error occurred, it seems the /var/tmp still have several Gigs free space so it may not be disk space not enough issue.
Anyone has seen this error before? Really appreciate if any input.
[Updated on: Mon, 09 June 2014 20:31] Report message to a moderator
|
|
| | | | | | | | | | | | |
Re: Error on DataSetCache: There is an error in saving files of data set cache [message #1385939 is a reply to message #1385876] |
Thu, 12 June 2014 11:25 |
andy Moses Messages: 26 Registered: November 2013 |
Junior Member |
|
|
Michael, could you make some quick comments on below approaches on whether they might fix the data set cache error when you have time? Thank you!
1) Data Set Cache Control config on report design
http://www.eclipse.org/birt/phoenix/project/notable4.2.php#jump_11
report design file has "Needs Cache for Data Engine" set config, which can decide whether the data engine caches a data set. by default, it's true
2) in java code, config app context to set the cache
config.getAppContext().put(EngineConstants.APPCONTEXT_DATASET_CACHE_OPTION,false);
config.getAppContext().put(DataEngine.DATA_SET_CACHE_ROW_LIMIT, 0)
3) switch the birt enginer library from current 4.3.1 to 4.2.2 (4.2.2 seems to be same version as the RCP designer). Could this switch help? I noticed some user had 3.7 engine library also reported similar error before.
In my report, the data set is not bound to more than one report; There's no any above - average or advanced features used, no filter , or not any scripts used such as do after or beforeOpen script. The report is mostly a quite basic report which drag result set field on report page.
What puzzled me is that the DataSetCache error is not reproducible whenever I want, even I could make change, but I am not sure if the change is the real fix.
[Updated on: Thu, 12 June 2014 11:27] Report message to a moderator
|
|
| |
Re: Error on DataSetCache: There is an error in saving files of data set cache [message #1385995 is a reply to message #1385939] |
Thu, 12 June 2014 18:41 |
|
andy Moses wrote on Thu, 12 June 2014 06:25Michael, could you make some quick comments on below approaches on whether they might fix the data set cache error when you have time? Thank you!
1) Data Set Cache Control config on report design
http://www.eclipse.org/birt/phoenix/project/notable4.2.php#jump_11
report design file has "Needs Cache for Data Engine" set config, which can decide whether the data engine caches a data set. by default, it's true
2) in java code, config app context to set the cache
config.getAppContext().put(EngineConstants.APPCONTEXT_DATASET_CACHE_OPTION,false);
config.getAppContext().put(DataEngine.DATA_SET_CACHE_ROW_LIMIT, 0)
3) switch the birt enginer library from current 4.3.1 to 4.2.2 (4.2.2 seems to be same version as the RCP designer). Could this switch help? I noticed some user had 3.7 engine library also reported similar error before.
In my report, the data set is not bound to more than one report; There's no any above - average or advanced features used, no filter , or not any scripts used such as do after or beforeOpen script. The report is mostly a quite basic report which drag result set field on report page.
What puzzled me is that the DataSetCache error is not reproducible whenever I want, even I could make change, but I am not sure if the change is the real fix.
Unfortunately, I don't know that any of those would solve the issue. For the first one, you don't have multiple elements using the same dataSet, so that should never come into play. For number two, I'd probably say the same thing. For the third one, I only suggested this for if there were a bug in 4.3 that was causing this issue. In searching, I have seen instances of this error in versions from 2.1 to 2.5 to 4.3, now. All of them have been different at least slightly which means it may be tough to pinpoint what the issue is, especially since you say it's intermittent as it is.
It would be nice if you could put together a report design that I could run that you run into this issue with so I could test on it. I know that might be difficult though, given the intermittent nature of the issue. If we don't find the problem soon, you should definitely log a bug for it.
Michael
Developer Evangelist, Silanis
|
|
|
Re: Error on DataSetCache: There is an error in saving files of data set cache [message #1386198 is a reply to message #1385995] |
Sat, 14 June 2014 18:32 |
andy Moses Messages: 26 Registered: November 2013 |
Junior Member |
|
|
Thank you, Michael. There seems to be have a way to avoid the dataset cache error:
it's the "Needs Cache for Data Engine" property for data set's advanced option in report design, as mentioned in below link
http://www.eclipse.org/birt/phoenix/project/notable4.2.php#jump_11
What made me think above might avoid the dataset error was below:
The temp folder for dataset cache data is default "java.io.tmpdir" system property ( /var/tmp on linux and windows's temp folder under AppData/Local). In the java code which generating the birt report, I changed the temp folder system property to an non-exist folder by adding below line when initializing birt config environement:
System.setProperty("java.io.tmpdir","z:\\tmp"); //z:\\tmp does not exist.
I made code to run the birt environement each time when a birt report get created. Then I noticed quite a few error like below showed up on the birt report page
Data (id = 1785):
+ There is an error in saving files of data set cache.
z:\tmp\DataEnginef5117a8e_b09be7_4\DataSetCacheObject_45844129_3\data.data (The system cannot find the path specified)
After seeing the error, I used RCP birt report design to change the dataset property "Needs Cache for Data Engine" from true (which is default) to false. Then I refresh the page, the error disappeared.
Another property could have turn on or off the dataset cache is some line as below in java code when initializing birt environement.
engineConfig.getAppContext().put(DataEngine.DATA_SET_CACHE_ROW_LIMIT, "1000");
Although using custom temp folder can reproduce the dataset cache error, for some reason, I didn't notice the dataset folder or cache data get created in my local machine's DEFAULT temp folder when a birt report rendered. This is still a puzzle to me. That's one reason I did not reproduce the dataset cache error previously. At that time, the engineConfig only get configured once, not per report generation, even with "Needs Cache for Data Engine" set to true. After adding DataEngine.DATA_SET_CACHE_ROW_LIMIT line into java code , I saw the dataset cache folder get created immediately.
But it seems the "Needs Cache for Data Engine" has precedence over the DataEngine.DATA_SET_CACHE_ROW_LIMIT java line setting since when I set row limit to be 0 (disable cache) and set "Needs Cache for Data Engine" to true, I could see the cache error, which mean the birt engine still attempted to cache the dataset.
There's another DataEngine.MEMORY_DATA_SET_CACHE which save cache to memoery instead of hard disk temp folder. Setting this Memory cache option will make the DATA_SET_CACHE_ROW_LIMIT void or useless.
I did above on my local machine only and hopefully that "Needs Cache for Data Engine" is the way to turn off dataset Cache which I don't need.
[Updated on: Sat, 14 June 2014 18:45] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Apr 25 07:41:52 GMT 2024
Powered by FUDForum. Page generated in 0.03966 seconds
|