ResourceBundle not found during runtime [message #70654] |
Thu, 01 September 2005 07:29  |
Eclipse User |
|
|
|
Originally posted by: christian.rueedi.globus.ch
Hi there,
First of all, BIRT rocks!
I made a report which needs some internationalization now. I added a
resourceBundle mylabes.properties in the same dir as the
myreport.rptdesign file. During design time anything works fine including
preview. But not at runtime in my own webapp. I create the reports with
the Engine API. But no labels are printed anymore.
Where exactly does my .properties file has to lay?
In the same directory as the .rptdesign file or in the engine base path
(where the plugins dir is)
Thanks for any help...
|
|
|
|
Re: ResourceBundle not found during runtime [message #71009 is a reply to message #70748] |
Fri, 02 September 2005 00:10   |
Eclipse User |
|
|
|
I am having the same problem.
Scott, your solution does not work. I have put my property file in just
about every directory and it still does not work. I'm at a loss as to how
to get this to work. When I deploy the web viewer using the war file
supplised in the BIRT runtime download, I am able to get everything to work
by simply putting the property file in the same dir as the report file.
However, I have no idea why I cannot replicate this in my own application,
even when my application can access the property file just fine using the
ResourceBundle class.
Thanks for any help,
Andrew
"Scott Rosenbaum" <scottr@innoventsolutions.com> wrote in message
news:43174ECF.9000408@innoventsolutions.com...
> Chris,
>
> I think the problem is that you need to have the mylabes.properties in the
> class-path of the viewer web app. To do this, while running in Eclipse,
> you need to have a copy of your mylabes.properties in the following
> directory:
>
> ${ECLIPSE_HOME}\plugins\org.eclipse.birt.report.viewer_1.0.1 \birt\WEB-INF\classes
>
> Scott Rosenbaum
> BIRT PMC
>
> Chris wrote:
>
>> Hi there,
>>
>> First of all, BIRT rocks!
>>
>> I made a report which needs some internationalization now. I added a
>> resourceBundle mylabes.properties in the same dir as the
>> myreport.rptdesign file. During design time anything works fine including
>> preview. But not at runtime in my own webapp. I create the reports with
>> the Engine API. But no labels are printed anymore.
>>
>> Where exactly does my .properties file has to lay? In the same directory
>> as the .rptdesign file or in the engine base path (where the plugins dir
>> is)
>>
>> Thanks for any help...
|
|
|
|
|
|
|
Re: ResourceBundle not found during runtime [message #72563 is a reply to message #72457] |
Wed, 07 September 2005 14:31   |
Eclipse User |
|
|
|
Ok,
I found the problem. They are not looking in the classpath for the
resource file. Look in org.eclipse.birt.report.model.core.BundleHelper and
org.eclipse.birt.report.model.core.Module. It is looking only in the file
location of the report file. Ok, so it should work if you put it in the
same directory as the report file, but it doesn't. What's weird is that I
noticed that when I remove the resource file from my report but keep the
keys in the report file, I get a bunch of SEVERE logging messages that say:
Sep 7, 2005 1:56:29 PM
org.eclipse.birt.report.engine.executor.ReportItemExecutor
getLocalizedString
SEVERE: get resource error, resource key: label.grand.total Locale: en_US
The weird thing is that when I readd the resource file, I do not get the
errors, which I suppose tells me that it can find the resource file, but it
doesn't seem to find the keys. I'll keep investigating when I find the
time, but at least I got a start on it.....
Andrew
"Chris" <christian.rueedi@globus.ch> wrote in message
news:42f4c7653a93f7f69fa56d1e913d30f2$1@www.eclipse.org...
> Ok thanks!
>
> I'll do the same if I get further...
>
>
> Chris
>
|
|
|
Re: ResourceBundle not found during runtime [message #86600 is a reply to message #72563] |
Wed, 02 November 2005 09:39  |
Eclipse User |
|
|
|
Hi
I had the same problem and for me the following simple (simple doesn't
mean quickly found) solution works:
Use an absolute path for the .rptdesign file and put the resource files
in the same place.
I used to create my reports like this : RunReport myreport.rptdesign -p
This worked well until I started using localization.
With the following command I can create localized reports with the
birt engine: RunReport c:\templates\myreport.rptdesign -p
Cheers, michael
P.S. The RunReport class is the one from the birt homepage
(http://www.eclipse.org/birt/deploy/RunReport.java)
Andrew Berman schrieb:
> Ok,
>
> I found the problem. They are not looking in the classpath for the
> resource file. Look in org.eclipse.birt.report.model.core.BundleHelper and
> org.eclipse.birt.report.model.core.Module. It is looking only in the file
> location of the report file. Ok, so it should work if you put it in the
> same directory as the report file, but it doesn't. What's weird is that I
> noticed that when I remove the resource file from my report but keep the
> keys in the report file, I get a bunch of SEVERE logging messages that say:
>
> Sep 7, 2005 1:56:29 PM
> org.eclipse.birt.report.engine.executor.ReportItemExecutor
> getLocalizedString
> SEVERE: get resource error, resource key: label.grand.total Locale: en_US
>
> The weird thing is that when I readd the resource file, I do not get the
> errors, which I suppose tells me that it can find the resource file, but it
> doesn't seem to find the keys. I'll keep investigating when I find the
> time, but at least I got a start on it.....
>
> Andrew
>
>
> "Chris" <christian.rueedi@globus.ch> wrote in message
> news:42f4c7653a93f7f69fa56d1e913d30f2$1@www.eclipse.org...
>
>>Ok thanks!
>>
>>I'll do the same if I get further...
>>
>>
>>Chris
>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.53954 seconds