Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Locate a java class
Locate a java class [message #650946] Thu, 27 January 2011 09:27 Go to next message
Dominik Missing name is currently offline Dominik Missing nameFriend
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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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
Re: Locate a java class [message #651257 is a reply to message #651076] Fri, 28 January 2011 15:22 Go to previous message
Dominik Missing name is currently offline Dominik Missing nameFriend
Messages: 7
Registered: November 2010
Junior Member
Jason,

no I didn´t and that was my problem.
Now its working.

Thanks a lot,
Dominik
Previous Topic:Birt Integration
Next Topic:Reading delimited data from web
Goto Forum:
  


Current Time: Thu Apr 25 11:26:53 GMT 2024

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

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

Back to the top