Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » WebViewer NullPointerException when using global variables
WebViewer NullPointerException when using global variables [message #539156] Wed, 09 June 2010 18:45 Go to next message
Laurent Marchal is currently offline Laurent MarchalFriend
Messages: 91
Registered: July 2009
Member
After creating a Report Variable from the Outline I am getting a
NullPointerException error when running BIRT with the WebViewer.

It runs fine when viewing as doc, PDF, html, etc., except for the Web
Viewer.

eclipse Galileo: Build id: 20100218-1602
BIRT Version: 2.5.2.v20090925-7l9V7YFT0z0-DX3kf8ShK8
BIRT Build id: v20100210-0630


XML Source:
<property name="pageVariables">
<variable-element name="rptAUX_Category">
<expression name="value" type="javascript">BirtStr.trim("")</expression>
<property name="type">report</property>
</variable-element>
</property>
Re: WebViewer NullPointerException when using global variables [message #539183 is a reply to message #539156] Wed, 09 June 2010 21:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Laurent,

I just tried to reproduce this with 2.5.2 and it did not fail. I just
used a blank report added the page report variable and added the
variable to the master page. Can you try this as well?

Jason

On 6/9/2010 2:45 PM, Laurent Marchal wrote:
> After creating a Report Variable from the Outline I am getting a
> NullPointerException error when running BIRT with the WebViewer.
>
> It runs fine when viewing as doc, PDF, html, etc., except for the Web
> Viewer.
>
> eclipse Galileo: Build id: 20100218-1602
> BIRT Version: 2.5.2.v20090925-7l9V7YFT0z0-DX3kf8ShK8
> BIRT Build id: v20100210-0630
>
>
> XML Source:
> <property name="pageVariables">
> <variable-element name="rptAUX_Category">
> <expression name="value" type="javascript">BirtStr.trim("")</expression>
> <property name="type">report</property>
> </variable-element>
> </property>
Re: WebViewer NullPointerException when using global variables [message #635913 is a reply to message #539156] Thu, 28 October 2010 15:17 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
We are having the same issue. However, we have been able to narrow it down to only files that contain a library. You do not have to be using anything from the library on the report, it's just the existence of the library.

As Laurent mentions, the error only happens in the webviewer.

Can you retry your blank report scenario using a library and advise as to whether or not you can reproduce the issue?

Thanks
Re: WebViewer NullPointerException when using global variables [message #635930 is a reply to message #635913] Thu, 28 October 2010 15:33 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is the library referenced in the report at all?
Do you have a resource folder set in the web.xml?

Jason

On 10/28/2010 11:17 AM, birtdevsatwork@gmail.com wrote:
> We are having the same issue. However, we have been able to narrow it
> down to only files that contain a library. You do not have to be using
> anything from the library on the report, it's just the existence of the
> library.
>
> As Laurent mentions, the error only happens in the webviewer.
>
> Can you retry your blank report scenario using a library and advise as
> to whether or not you can reproduce the issue?
>
> Thanks
Re: WebViewer NullPointerException when using global variables [message #635960 is a reply to message #635930] Thu, 28 October 2010 18:28 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
The library is not referenced in the report. This is the only code in the report for the library:

<list-property name="libraries">
<structure>
<property name="fileName">TestLibrary.rptlibrary</property>
<property name="namespace">TestLibrary</property>
</structure>
</list-property>

As far as the web.xml file, there are no hard coded references to the library. This file contains all default values of:

<!--
Report resources directory for preview. Defaults to ${birt home}
-->
<context-param>
<param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
<param-value></param-value>
</context-param>

and

<!-- Resource location directory. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value></param-value>
</context-param>

As an additional note, the TestLibrary that I have referenced in my report is completely empty. I was concerned that our current library, which has been carried forward through several upgrades might have been the issue, so I created a new "empty" library.
Re: WebViewer NullPointerException when using global variables [message #635967 is a reply to message #635960] Thu, 28 October 2010 18:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Is the library in the same folder as the report design?

Jason

On 10/28/2010 2:28 PM, birtdevsatwork@gmail.com wrote:
> The library is not referenced in the report. This is the only code in
> the report for the library:
>
> <list-property name="libraries">
> <structure>
> <property name="fileName">TestLibrary.rptlibrary</property>
> <property name="namespace">TestLibrary</property>
> </structure>
> </list-property>
>
> As far as the web.xml file, there are no hard coded references to the
> library. This file contains all default values of:
>
> <!--
> Report resources directory for preview. Defaults to ${birt home}
> -->
> <context-param>
> <param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
> <param-value></param-value>
> </context-param>
>
> and
>
> <!-- Resource location directory. Defaults to ${birt home} -->
> <context-param>
> <param-name>BIRT_RESOURCE_PATH</param-name>
> <param-value></param-value>
> </context-param>
>
> As an additional note, the TestLibrary that I have referenced in my
> report is completely empty. I was concerned that our current library,
> which has been carried forward through several upgrades might have been
> the issue, so I created a new "empty" library.
Re: WebViewer NullPointerException when using global variables [message #635975 is a reply to message #635967] Thu, 28 October 2010 19:14 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
In my test case it is. But, in the actual report I am working on, they are in different locations.
Re: WebViewer NullPointerException when using global variables [message #635977 is a reply to message #635975] Thu, 28 October 2010 19:35 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I will try to reproduce the issue.

Jason

On 10/28/2010 3:14 PM, birtdevsatwork@gmail.com wrote:
> In my test case it is. But, in the actual report I am working on, they
> are in different locations.
Re: WebViewer NullPointerException when using global variables [message #636225 is a reply to message #635977] Fri, 29 October 2010 18:14 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What type of page variable are you using?

Jason


On 10/28/2010 3:35 PM, Jason Weathersby wrote:
> I will try to reproduce the issue.
>
> Jason
>
> On 10/28/2010 3:14 PM, birtdevsatwork@gmail.com wrote:
>> In my test case it is. But, in the actual report I am working on, they
>> are in different locations.
>
Re: WebViewer NullPointerException when using global variables [message #636230 is a reply to message #636225] Fri, 29 October 2010 18:45 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
I currently have it set as a page variable. But, I have tried report variable as well.

Is that what you are asking? Or are you referring to what type of data am I assigning to the variable? If that is the case, I am assigning an integer to be stored as the page number. But, it was my understanding that all variable values are strings???
Re: WebViewer NullPointerException when using global variables [message #636252 is a reply to message #636230] Fri, 29 October 2010 20:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I was able to reproduce the issue. This appears to have been a bug.
The issue does not happen in 2.6.1. I tried to come up with a work
around but was not able to.

Jason

On 10/29/2010 2:45 PM, birtdevsatwork@gmail.com wrote:
> I currently have it set as a page variable. But, I have tried report
> variable as well.
>
> Is that what you are asking? Or are you referring to what type of data
> am I assigning to the variable? If that is the case, I am assigning an
> integer to be stored as the page number. But, it was my understanding
> that all variable values are strings???
Re: WebViewer NullPointerException when using global variables [message #636529 is a reply to message #636252] Mon, 01 November 2010 17:32 Go to previous messageGo to next message
Eclipse User is currently offline Eclipse UserFriend
Messages: 7
Registered: October 2010
Junior Member
Is this the same issue that was fixed with bug 312759?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=312759

If so, do you know where the initialization sequence was modified?

Thanks
Re: WebViewer NullPointerException when using global variables [message #636539 is a reply to message #636529] Mon, 01 November 2010 19:15 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Most likely. Can you add your question to the bug to get more details
on what was fixed?

Jason

On 11/1/2010 1:32 PM, birtdevsatwork@gmail.com wrote:
> Is this the same issue that was fixed with bug 312759?
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=312759
>
> If so, do you know where the initialization sequence was modified?
>
> Thanks
Previous Topic:Postscript page count
Next Topic:BIRT Queries
Goto Forum:
  


Current Time: Thu Dec 18 10:31:36 GMT 2014

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

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