Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Error with BirtDateTime
hallj05
When using the BirtDateTime in our reports we sometimes get the following error.
Data (id = 363):
+ A BIRT exception occurred. See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "BirtDateTime" is not defined.
Script source: null, line: 0, text:
BirtDateTime.now()
Here is what this looks like in the report designer.
<data id="363">
<property name="marginLeft">2pt</property>
<structure name="dateTimeFormat">
<property name="category">Long Date</property>
<property name="pattern">Long Date</property>
</structure>
<property name="display">inline</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">Column Binding</property>
<text-property name="displayName">Date</text-property>
<expression name="expression" type="javascript">BirtDateTime.now()</expression>
<property name="dataType">date</property>
</structure>
</list-property>
<property name="resultSetColumn">Column Binding</property>
</data>
Any ideas as to why we are getting this error sometimes with the date? When we get this error all the other fields populate correctly except the date is left blank.
Thanks for any help!
Find more posts tagged with
Comments
mwilliams
This is when you deploy the viewer that you're getting this? What is your BIRT version?
hallj05
This is using Birt version 2.6.2 and it is when it is being deployed on a WAS environment.
Although we can run the same report a lot and only get this error on one of them without changing anything to the report.
mwilliams
I don't have WAS to test on, so I tried a simple report calling BirtDateTime.now() and ran it many times from Tomcat with no issues. What version of Java are you using?
hallj05
We are using Java version 1.6.
mwilliams
I had no issue with 1.6 and Tomcat. Can you try downloading Tomcat and seeing if you have the same issue with it? If not, we might be able to narrow it down to just WAS.
mwilliams
You might also try reinstalling the runtime.
hallj05
I think that the only way we've had this issue created is during batch when it creates a lot of the reports at the same time and sometimes one of them will get this error.
Also we are thinking of trying to update to Birt 4.2.2 so that we are not on an old version. Are there any known issues when upgrading to 4.2.2 from 2.6.2?
mwilliams
There shouldn't be too much of an issue. There were mostly just bug fixes and some pagination fixes made between there. Also, the move to a POJO runtime, but if that causes you issues, the OSGi runtime is still available.