Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Javascript Error testing report using BIRT Viewer 3.7(Javascript Error testing report using BIRT Viewer 3.7)
Javascript Error testing report using BIRT Viewer 3.7 [message #752762] Wed, 26 October 2011 10:07 Go to next message
paula.mcdowell is currently offline paula.mcdowell
Messages: 16
Registered: June 2011
Junior Member
I've created my rptdesign in Eclipse Indigo with Birt 3.7 and Tomcat 7. I have 7 class files that I've exported into a jar. To test, I created a Dynamic Web Project in Eclipse, dropped the jar in the WEB-INF/lib directory, and placed my rptdesign under the Webcontent folder. This method works fine.

My teammate has concerns that my jar is not portable. Next I try testing it outside of Eclipse using Birth Viewer 3.7. I drop the same jar under the WEB-INF/lib directory, and put the rptdesign in the project root, ie. ${tomcat installation dir}/webapps/BIRT/report.rptdesign. For some reason, I get a javascript error: init is not defined on the rptdesign.

Anyone know the issue here?

Thank you for your time and consideration,
Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #752776 is a reply to message #752762] Wed, 26 October 2011 10:10 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

What are the 7 classes? Are you implementing event handlers?

Jason

On 10/26/2011 10:07 AM, paula.mcdowell wrote:
> I've created my rptdesign in Eclipse Indigo with Birt 3.7 and Tomcat 7.
> I have 7 class files that I've exported into a jar. To test, I created a
> Dynamic Web Project in Eclipse, dropped the jar in the WEB-INF/lib
> directory, and placed my rptdesign under the Webcontent folder. This
> method works fine.
>
> My teammate has concerns that my jar is not portable. Next I try testing
> it outside of Eclipse using Birth Viewer 3.7. I drop the same jar under
> the WEB-INF/lib directory, and put the rptdesign in the project root,
> ie. ${tomcat installation dir}/webapps/BIRT/report.rptdesign. For some
> reason, I get a javascript error: init is not defined on the rptdesign.
>
> Anyone know the issue here?
>
> Thank you for your time and consideration,
> Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #752852 is a reply to message #752762] Wed, 26 October 2011 10:43 Go to previous messageGo to next message
paula.mcdowell is currently offline paula.mcdowell
Messages: 16
Registered: June 2011
Junior Member
Hi, Jason. Thanks for your quick response.

3 of the classes are Event Handlers. 2 are used for Scripted Data Sets. The other event handler overrides the beforeFactory method. These 3 event handler classes use the other 4 for business logic, validation, etc.

Thank you. Any thoughts?

-Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #752901 is a reply to message #752852] Wed, 26 October 2011 11:02 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Paula,

My guess would be that some class that one of your classes depends on is
not being found. That is a guess though. Can you post the complete error?

Jason

On 10/26/2011 10:43 AM, paula.mcdowell wrote:
> Hi, Jason. Thanks for your quick response.
>
> 3 of the classes are Event Handlers. 2 are used for Scripted Data Sets.
> The other event handler overrides the beforeFactory method. These 3
> event handler classes use the other 4 for business logic, validation, etc.
>
> Thank you. Any thoughts?
>
> -Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #753010 is a reply to message #752901] Wed, 26 October 2011 11:53 Go to previous messageGo to next message
paula.mcdowell is currently offline paula.mcdowell
Messages: 16
Registered: June 2011
Junior Member
Jason,
I created a new rptdesign and this resolved the Javascript error. I created a new file, and copied sections from the old rptdesign over to the newly created one. I tested and verified each section before adding more content. Kind of painful and I still don't understand the issue.

When I selected all the XML source and attempted to past in the new file, I still got the error when I tried to test. Weird.

But now I'm getting an error that says
Could not initialize class error . . . in my scripted dataset event handler. Does Birt have issues with initializing Java classes at runtime? I override the open() and immediately create one of my business objects.

Thank you for your time,
Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #753350 is a reply to message #753010] Wed, 26 October 2011 15:27 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Paula,

You can select both report designs in the navigator and then right click
and choose to compare with each other to find the difference.

Should not have a problem initializing external classes as long as they
are on the classpath. Is this in the deployed viewer?

Jason

On 10/26/2011 11:53 AM, paula.mcdowell wrote:
> Jason,
> I created a new rptdesign and this resolved the Javascript error. I
> created a new file, and copied sections from the old rptdesign over to
> the newly created one. I tested and verified each section before adding
> more content. Kind of painful and I still don't understand the issue.
>
> When I selected all the XML source and attempted to past in the new
> file, I still got the error when I tried to test. Weird.
>
> But now I'm getting an error that says
> Could not initialize class error . . . in my scripted dataset event
> handler. Does Birt have issues with initializing Java classes at
> runtime? I override the open() and immediately create one of my business
> objects.
>
> Thank you for your time,
> Paula
>
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #754246 is a reply to message #753010] Tue, 01 November 2011 11:50 Go to previous messageGo to next message
paula.mcdowell is currently offline paula.mcdowell
Messages: 16
Registered: June 2011
Junior Member
Jason,
Yes. I was using the Birt-Viewer for my testing. I'm not having the class initialization issue anymore. I must have been having some "flaky" environment issues last week. Not to mention that I was moving from Birt 2.6 to Birt 3.7. Right now, I'm still scratching my head as to what was happening. I do notice my Tomcat server complaining of a memory leak. Have you seen this before:

SEVERE: The web application [/Birt] appears to have started a thread named [Thread-12] but has failed to stop it. This is very likely to create a memory leak.

Thank you,
Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #754602 is a reply to message #754246] Thu, 03 November 2011 09:16 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Is this the same issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=339191

Jason

On 11/1/2011 11:50 AM, paula.mcdowell wrote:
> Jason,
> Yes. I was using the Birt-Viewer for my testing. I'm not having the
> class initialization issue anymore. I must have been having some "flaky"
> environment issues last week. Not to mention that I was moving from Birt
> 2.6 to Birt 3.7. Right now, I'm still scratching my head as to what was
> happening. I do notice my Tomcat server complaining of a memory leak.
> Have you seen this before:
>
> SEVERE: The web application [/Birt] appears to have started a thread
> named [Thread-12] but has failed to stop it. This is very likely to
> create a memory leak.
>
> Thank you,
> Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #754629 is a reply to message #754602] Thu, 03 November 2011 12:28 Go to previous messageGo to next message
paula.mcdowell is currently offline paula.mcdowell
Messages: 16
Registered: June 2011
Junior Member
Yes, Jason. This appears to be my issue with regards to the hanging threads. Thank you. I review this more in depth.

Also, I just created a new test environment. This environment will be used to verify our reports before installing for client acceptance testing. I again, get the javascript error that is the original subject of this ticket. The rptdesign file tests fine in my local environment after I recreated it as detailed in this ticket. Once I move it to the new environment, the browser error console displays a javascript error "init is not defined". This concerns me of course. I don't want to have resolve this same issue every time I migrate up to the next environment.

I have simple javascript in my rptdesign. I believe this is causing the initial heartburn when I migrate to a new environment. When I remove the javascript, the report displays fine. When I re-add the javascript, the report still works. It appears to only have an issue with the javascript upon initial installation to the new environment.

Does anyone know of any known issues? Or even better a resolution to fix other than removing the javascript permanently?

Thank you for your time,
Paula
Re: Javascript Error testing report using BIRT Viewer 3.7 [message #755256 is a reply to message #754629] Mon, 07 November 2011 14:55 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

What JavaScript do you have in the report?

Jason

On 11/3/2011 12:28 PM, paula.mcdowell wrote:
> Yes, Jason. This appears to be my issue with regards to the hanging
> threads. Thank you. I review this more in depth.
>
> Also, I just created a new test environment. This environment will be
> used to verify our reports before installing for client acceptance
> testing. I again, get the javascript error that is the original subject
> of this ticket. The rptdesign file tests fine in my local environment
> after I recreated it as detailed in this ticket. Once I move it to the
> new environment, the browser error console displays a javascript error
> "init is not defined". This concerns me of course. I don't want to have
> resolve this same issue every time I migrate up to the next environment.
>
> I have simple javascript in my rptdesign. I believe this is causing the
> initial heartburn when I migrate to a new environment. When I remove the
> javascript, the report displays fine. When I re-add the javascript, the
> report still works. It appears to only have an issue with the javascript
> upon initial installation to the new environment.
>
> Does anyone know of any known issues? Or even better a resolution to fix
> other than removing the javascript permanently?
>
> Thank you for your time,
> Paula
Previous Topic:Connection exeptions
Next Topic:Rebranding the RCP Version of the BIRT Report Designer?
Goto Forum:
  


Current Time: Tue Jul 22 17:23:48 EDT 2014

Powered by FUDForum. Page generated in 0.08059 seconds