Locate a java class [message #650946] |
Thu, 27 January 2011 09:27 |
Dominik Missing name Messages: 7 Registered: November 2010 |
Junior Member |
|
|
Hi,
I currently open reports, that I have designed with Eclipse-BIRT-Report-Designer-Plugin, via WebViewer.display()
out of an RCP-application.
Up to now, I used a XML-File as datasource and everything worked fine.
Now I tried to use a java-class to deliver data.
The java-class is located in the same plugin as the report .
When I preview the result in the reportDesigner-Plugin for Eclipse, it is running, but when I start
the application, it seems that it does not find my java-class.
My dataset-open-script:
importPackage(Packages.com.test.reports.modelprovider);
count=0;
modelProvider = ModelProvider.getInstance();
modelData = modelProvider.getTestdata();
(comment: ModelProvider is singleton with public method "getInstance()")
Now to my question:
When I view the report out of my application, it seems to crash at the script-line:
modelProvider = ModelProvider.getInstance();
What do I have to do, to make the report find this class?
Thanks,
Dominik
PS: I use BIRT 2.6.1 and Eclipse 3.6
|
|
|
Re: Locate a java class [message #651076 is a reply to message #650946] |
Thu, 27 January 2011 17:01 |
|
Dominik,
Are you setting the parent classloader for the engine?
Take a look at this example:
http://www.birt-exchange.org/org/devshare/designing-birt-rep orts/889-rcp-app-with-birt-and-scripted-datasource/
Jason
On 1/27/2011 4:27 AM, Dominik wrote:
> Hi,
>
> I currently open reports, that I have designed with
> Eclipse-BIRT-Report-Designer-Plugin, via WebViewer.display()
> out of an RCP-application.
>
> Up to now, I used a XML-File as datasource and everything worked fine.
> Now I tried to use a java-class to deliver data.
> The java-class is located in the same plugin as the report .
>
> When I preview the result in the reportDesigner-Plugin for Eclipse, it
> is running, but when I start
> the application, it seems that it does not find my java-class.
>
>
> My dataset-open-script:
>
> importPackage(Packages.com.test.reports.modelprovider);
> count=0;
> modelProvider = ModelProvider.getInstance();
> modelData = modelProvider.getTestdata();
>
> (comment: ModelProvider is singleton with public method "getInstance()")
>
>
> Now to my question:
> When I view the report out of my application, it seems to crash at the
> script-line:
> modelProvider = ModelProvider.getInstance();
> What do I have to do, to make the report find this class?
>
> Thanks,
> Dominik
>
> PS: I use BIRT 2.6.1 and Eclipse 3.6
|
|
|
|
Powered by
FUDForum. Page generated in 0.04498 seconds