Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Calling Java from Javascript/ Debugging(Calling JAva from Javascript/ Debugging)
Calling Java from Javascript/ Debugging [message #808220] Mon, 27 February 2012 14:48 Go to next message
Christoph Kiehn is currently offline Christoph KiehnFriend
Messages: 8
Registered: January 2012
Junior Member
Hi,

I encounterd the following problems:

First:
I use the Rhino framework to call Java classes from javaScript in BIRT/Eclipse.
If I run my report in the Preview I get a runtime error:
Wrapped java.lang.ArrayIndexOutOfBoundsException...

But if I try to debug the code everything works well and calculates the required result. I don't obtain the error message.
Can anyone explain to me why I don't obtain the exception when I'm debugging?

Second:
I tried to log from my java classes using: System.out.println("...")
But I can't see the log messages when I use the Preview.
When I debug the code the log messages appear in the console window of eclipse.
I startet the "eclipsec" console version.
Logging from javascript works well with results in the console.

Best regards
Christoph


Re: Calling Java from Javascript/ Debugging [message #808559 is a reply to message #808220] Mon, 27 February 2012 22:35 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

BIRT already includes Rhino. Are you including another version of Rhino?

Scott wrote a blog post on a method to do logging:
http://birtworld.blogspot.com/2010/01/quick-and-dirty-logging.html
Another option is to just create your own log:

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/myeventslog.txt", true ) );
out.println( "Testing");
out.close();

Jason


On 2/27/2012 9:48 AM, Christoph Kiehn wrote:
> Hi,
>
> I encounterd the following problems:
>
> First:
> I use the Rhino framework to call Java classes from javaScript in
> BIRT/Eclipse.
> If I run my report in the Preview I get a runtime error:
> Wrapped java.lang.ArrayIndexOutOfBoundsException...
>
> But if I try to debug the code everything works well and calculates the
> required result. I don't obtain the error message.
> Can anyone explain to me why I don't obtain the exception when I'm
> debugging?
>
> Second:
> I tried to log from my java classes using: System.out.println("...")
> But I can't see the log messages when I use the Preview. When I debug
> the code the log messages appear in the console window of eclipse.
> I startet the "eclipsec" console version.
> Logging from javascript works well with results in the console.
>
> Best regards
> Christoph
>
>
>
Previous Topic:List Reports available on Report Viewer
Next Topic:BIRT Viewer license
Goto Forum:
  


Current Time: Fri Mar 29 14:53:02 GMT 2024

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

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

Back to the top