Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Problem deploying script data source report(Report works in Eclipse, fails with web viewer)
Problem deploying script data source report [message #874135] Sun, 20 May 2012 03:10 Go to next message
Robert Waltz is currently offline Robert WaltzFriend
Messages: 7
Registered: July 2009
Junior Member
I've been working on this for a while without success.

I can create a report and deploy it to the web viewer when it has a DB data source (Postgresql).
I can create a report and preview it in the report design eclipse view - this report has a script based data source/set.
When I go to deploy the script based report to the web viewer I get the following error :

Error evaluating Javascript expression. Script engine error: Function importClass must be called with a class; had "[JavaPackage org.parmenion.edison.datasource.VolatilityDataSource]" instead. (/report/data-sets/script-data-set[@id="31"]/method[@name="open"]#1)


I call importClass initially because importPackage broke the preview in eclipse. If I edit the deployed XXX.rptdesign file to call importPackage it can't find the VolatilityDataSource, though I've exported my jar file to the WEB-INF/lib.

Thanks in advance
Re: Problem deploying script data source report [message #874898 is a reply to message #874135] Mon, 21 May 2012 17:47 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

In the preview when you used importPackage, where was the jar?

Jason

On 5/19/2012 11:10 PM, Robert Waltz wrote:
> I've been working on this for a while without success.
>
> I can create a report and deploy it to the web viewer when it has a DB
> data source (Postgresql).
> I can create a report and preview it in the report design eclipse view -
> this report has a script based data source/set.
> When I go to deploy the script based report to the web viewer I get the
> following error :
>
> Error evaluating Javascript expression. Script engine error: Function
> importClass must be called with a class; had "[JavaPackage
> org.parmenion.edison.datasource.VolatilityDataSource]" instead.
> (/report/data-sets/script-data-set[@id="31"]/method[@name="open"]#1)
>
>
> I call importClass initially because importPackage broke the preview in
> eclipse. If I edit the deployed XXX.rptdesign file to call importPackage
> it can't find the VolatilityDataSource, though I've exported my jar file
> to the WEB-INF/lib.
>
> Thanks in advance
Re: Problem deploying script data source report [message #875243 is a reply to message #874898] Tue, 22 May 2012 11:58 Go to previous messageGo to next message
Robert Waltz is currently offline Robert WaltzFriend
Messages: 7
Registered: July 2009
Junior Member
the code for the scripted data source resides in a different project - I build a jar in the /bin folder of that project and I've pointed my reporting project's class path to it.

I've tried several different ways when deploying - I've put the jar in WEB-INF/lib of the viewer, I've put it in the viewer's /scriptlib and I've built a /bin in the viewer and stuck it there - all with the same results.

I've tried running the report by calling the BIRT viewer with a "frameset" parameter and with a "run" parameter (to view via html) and I was getting different results for a while, but I now get the very unhelpful "problem running the report" error.

I've sort of run out of testing ideas...

Thanks

Re: Problem deploying script data source report [message #875399 is a reply to message #875243] Tue, 22 May 2012 17:05 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

In the designer, if you have a java project and a report project, just
add the java project to the classpath of the birt project using the
method described here:

http://birtworld.blogspot.com/2009/12/birt-designer-classpath-changes.html

That should take care of the designer. Once you deploy the report you
should be able to export your jar and add it to the web-inf/lib of the
viewer and it should work.

Jason

On 5/22/2012 7:58 AM, Robert Waltz wrote:
> the code for the scripted data source resides in a different project - I
> build a jar in the /bin folder of that project and I've pointed my
> reporting project's class path to it.
>
> I've tried several different ways when deploying - I've put the jar in
> WEB-INF/lib of the viewer, I've put it in the viewer's /scriptlib and
> I've built a /bin in the viewer and stuck it there - all with the same
> results.
>
> I've tried running the report by calling the BIRT viewer with a
> "frameset" parameter and with a "run" parameter (to view via html) and I
> was getting different results for a while, but I now get the very
> unhelpful "problem running the report" error.
>
> I've sort of run out of testing ideas...
>
> Thanks
>
>
Re: Problem deploying script data source report [message #875400 is a reply to message #875399] Tue, 22 May 2012 17:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

BTW use the add projects button, not the jar.

Jason


On 5/22/2012 1:05 PM, Jason Weathersby wrote:
> In the designer, if you have a java project and a report project, just
> add the java project to the classpath of the birt project using the
> method described here:
>
> http://birtworld.blogspot.com/2009/12/birt-designer-classpath-changes.html
>
> That should take care of the designer. Once you deploy the report you
> should be able to export your jar and add it to the web-inf/lib of the
> viewer and it should work.
>
> Jason
>
> On 5/22/2012 7:58 AM, Robert Waltz wrote:
>> the code for the scripted data source resides in a different project - I
>> build a jar in the /bin folder of that project and I've pointed my
>> reporting project's class path to it.
>>
>> I've tried several different ways when deploying - I've put the jar in
>> WEB-INF/lib of the viewer, I've put it in the viewer's /scriptlib and
>> I've built a /bin in the viewer and stuck it there - all with the same
>> results.
>>
>> I've tried running the report by calling the BIRT viewer with a
>> "frameset" parameter and with a "run" parameter (to view via html) and I
>> was getting different results for a while, but I now get the very
>> unhelpful "problem running the report" error.
>>
>> I've sort of run out of testing ideas...
>>
>> Thanks
>>
>>
>
Re: Problem deploying script data source report [message #876471 is a reply to message #875399] Thu, 24 May 2012 17:14 Go to previous messageGo to next message
Robert Waltz is currently offline Robert WaltzFriend
Messages: 7
Registered: July 2009
Junior Member
I do appreciate your attention, Jason. The code in the designer works (I've referenced the source, previously, as a project, that worked, I changed to basing it on the jar in hopes of mimic-ing the deployment environment better)

I understand moving the report to the web viewer and moving the jar to the WEB-INF/lib directory should work. But as I posted, it doesn't, and I'm plumb out of ideas on what to test or check to make it work.
Re: Problem deploying script data source report [message #876551 is a reply to message #876471] Thu, 24 May 2012 20:25 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If you are using importPackage, when you deploy the viewer you get an
error? Can you check the viewer log and see if anything shows up? Does
your jar depend on other jars that are not available?

Jason

On 5/24/2012 1:14 PM, Robert Waltz wrote:
> I do appreciate your attention, Jason. The code in the designer works
> (I've referenced the source, previously, as a project, that worked, I
> changed to basing it on the jar in hopes of mimic-ing the deployment
> environment better)
>
> I understand moving the report to the web viewer and moving the jar to
> the WEB-INF/lib directory should work. But as I posted, it doesn't, and
> I'm plumb out of ideas on what to test or check to make it work.
Previous Topic:Not able to Install BIRT 3.7.2 on JVM 64 bit
Next Topic:ReferenceError: "BarSeriesImpl" is not defined. at line X of chart script:''
Goto Forum:
  


Current Time: Tue Apr 23 14:17:54 GMT 2024

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

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

Back to the top