Home
Analytics
Upgrading to 2.6.2 or 3.7 throws exception
jyol2005
I am trying to upgrade to BIRT 2.6.2 or 3.7 (tried both and get the same error). I have reports that were created using BIRT 2.5.1 and when I am trying to upgrade them to either of the above versions, I get the following error at run-time. The application is deployed using weblogic.
SEVERE: An error happened while running the report. Cause:
org.mozilla.javascript.EvaluatorException: invalid flag after regular expression (<inline>#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)
at org.mozilla.javascript.Parser.addError(Parser.java:146)
at org.mozilla.javascript.Parser.reportError(Parser.java:160)
at org.mozilla.javascript.TokenStream.readRegExp(TokenStream.java:910)
at org.mozilla.javascript.Parser.primaryExpr(Parser.java:2440)
at org.mozilla.javascript.Parser.memberExpr(Parser.java:1955)
at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1813)
at org.mozilla.javascript.Parser.mulExpr(Parser.java:1742)
at org.mozilla.javascript.Parser.addExpr(Parser.java:1723)
at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1703)
at org.mozilla.javascript.Parser.relExpr(Parser.java:1677)
at org.mozilla.javascript.Parser.eqExpr(Parser.java:1633)
at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1622)
at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1611)
at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1600)
at org.mozilla.javascript.Parser.andExpr(Parser.java:1588)
at org.mozilla.javascript.Parser.orExpr(Parser.java:1576)
at org.mozilla.javascript.Parser.condExpr(Parser.java:1559)
at org.mozilla.javascript.Parser.assignExpr(Parser.java:1544)
at org.mozilla.javascript.Parser.expr(Parser.java:1523)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1246)
at org.mozilla.javascript.Parser.statement(Parser.java:707)
at org.mozilla.javascript.Parser.parse(Parser.java:401)
at org.mozilla.javascript.Parser.parse(Parser.java:338)
at org.mozilla.javascript.Context.compileImpl(Context.java:2368)
at org.mozilla.javascript.Context.compileString(Context.java:1359)
..............
Find more posts tagged with
Comments
JasonW
With 3.7 did you deploy as described here?
http://wiki.eclipse.org/BirtPOJO_Viewer_WebLogic_Deployment
This also may be a conflict with js.jar used by BIRT and if you have another one in your classpath.
Jason
jyol2005
Jason,
Thanks for the response, but I have been using BIRT 2.5.1 for over a year now. We use RE API and not the viewer. It's totally done using scripted data sets. I just compiled the code with 2.6.2 and deployed it on the server. I also copied the report engine directory to our app server and pointed weblogic to use the new libs instead of old 2.5.1. I also have BIRT js.jar in the classpath prior to weblogic's.
This setup is working fine with 2.5.1, so not sure what might be the cause with 2.6.2/3.7. Any help is appreciated.
JasonW
With 2.6.2 did you clear the web-inf/plugins/configuration directory of everything but the config.ini?
On 3.7 there should be no plugins directory. Just remove all old jars and add the ones in reportengine/lib. You may also need to look at
http://wiki.eclipse.org/BirtPOJO_Viewer_WebLogic_Deployment
Just to verify you pick up commons-logging-api.jar in your app. I suspect you will still have an issue with the WL js.jar in BIRT 3.7 because it is now non-OSGi and shares the web app classpath.
Jason
kosta
Because the report items were always saved as eclipse-plugins. If the report item was created it could be copied into the plug-in folder and the custom items were ready to start with.
Does that means we can't make custom report items any more?
JasonW
Kosta,
They can still be used. Just export them as normal and add them to the web-inf/lib directory.
Jason
jyol2005
Jason,<br />
<br />
I am now trying to deploy under 3.7 and it's still giving me the same issue. I set the log level to FINE, but it gives me error as soon as it enters RunAndRenderTask's doRun method:<br />
<br />
FINE: Finished preparing query.<br />
Jul 20, 2011 12:46:05 PM org.eclipse.birt.data.engine.impl.DataEngineImpl prepare<br />
FINER: RETURN<br />
Jul 20, 2011 12:46:55 PM org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun<br />
SEVERE: An error happened while running the report. Cause:<br />
org.mozilla.javascript.EvaluatorException: invalid flag after regular expression (<inline>#1)<br />
<br />
Below is a list of all the jars in WEB-INF/lib for my web app and I'm setting <prefer-web-inf-classes>true</prefer-web-inf-classes> in weblogic.xml. I am not sure what else am I missing in the setup.<br />
<br />
<ul class='bbc'><li>Tidy.jar</li><li>backport-util-concurrent-3.0.jar</li><li>cfgatewayadapter-3.0.jar</li><li>com.ibm.icu_4.4.2.v20110208.jar</li><li>com.lowagie.text_2.1.7.v201004222200.jar</li><li>commons-cli-1.0.jar</li><li>commons-codec-1.3.jar</li><li>commons-httpclient-3.1.jar</li><li>commons-logging-1.1.jar</li><li>commons-logging-api-1.0.4.jar</li><li>derby.jar</li><li>flex-messaging-common-3.0.jar</li><li>flex-messaging-core-3.0.jar</li><li>flex-messaging-opt-3.0.jar</li><li>flex-messaging-proxy-3.0.jar</li><li>flex-messaging-remoting-3.0.jar</li><li>flute.jar</li><li>javax.wsdl_1.5.1.v201012040544.jar</li><li>jaxen-full-1.0.jar</li><li>jdom-1.0.jar</li><li>js.jar</li><li>jsr173_api-2.2.0.jar</li><li>log4j-1.2.8.jar</li><li>org.apache.batik.bridge_1.6.0.v201011041432.jar</li><li>org.apache.batik.css_1.6.0.v201011041432.jar</li><li>org.apache.batik.dom.svg_1.6.0.v201011041432.jar</li><li>org.apache.batik.dom_1.6.0.v201011041432.jar</li><li>org.apache.batik.ext.awt_1.6.0.v201011041432.jar</li><li>org.apache.batik.parser_1.6.0.v201011041432.jar</li><li>org.apache.batik.pdf_1.6.0.v201105071520.jar</li><li>org.apache.batik.svggen_1.6.0.v201011041432.jar</li><li>org.apache.batik.transcoder_1.6.0.v201011041432.jar</li><li>org.apache.batik.util.gui_1.6.0.v201011041432.jar</li><li>org.apache.batik.util_1.6.0.v201011041432.jar</li><li>org.apache.batik.xml_1.6.0.v201011041432.jar</li><li>org.apache.commons.codec_1.3.0.v201101211617.jar</li><li>org.apache.xerces_2.9.0.v201101211617.jar</li><li>org.apache.xml.resolver_1.2.0.v201005080400.jar</li><li>org.apache.xml.serializer_2.7.1.v201005080400.jar</li><li>org.eclipse.birt.runtime_3.7.0.v20110615-1818.jar</li><li>org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar</li><li>org.eclipse.core.expressions_3.4.300.v20110228.jar</li><li>org.eclipse.core.filesystem_1.3.100.v20110423-0524.jar</li><li>org.eclipse.core.jobs_3.5.100.v20110404.jar</li><li>org.eclipse.core.resources_3.7.100.v20110510-0712.jar</li><li>org.eclipse.core.runtime_3.7.0.v20110110.jar</li><li>org.eclipse.datatools.connectivity.apache.derby.dbdefinition_1.0.2.v200906161815.jar</li><li>org.eclipse.datatools.connectivity.apache.derby_1.0.101.v201104090305.jar</li><li>org.eclipse.datatools.connectivity.console.profile_1.0.0.v200906020553.jar</li><li>org.eclipse.datatools.connectivity.db.generic_1.0.1.v200908130547.jar</li><li>org.eclipse.datatools.connectivity.dbdefinition.genericJDBC_1.0.1.v200906161815.jar</li><li>org.eclipse.datatools.connectivity.oda.consumer_3.2.4.v201105200848.jar</li><li>org.eclipse.datatools.connectivity.oda.design_3.3.3.v201105191315.jar</li><li>org.eclipse.datatools.connectivity.oda.flatfile_3.1.1.v201104191557.jar</li><li>org.eclipse.datatools.connectivity.oda.profile_3.2.5.v201104090305.jar</li><li>org.eclipse.datatools.connectivity.oda_3.3.2.v201105200920.jar</li><li>org.eclipse.datatools.connectivity.sqm.core_1.2.2.v201104090305.jar</li><li>org.eclipse.datatools.connectivity_1.2.2.v201105270956.jar</li><li>org.eclipse.datatools.enablement.hsqldb.dbdefinition_1.0.0.v200906161800.jar</li><li>org.eclipse.datatools.enablement.hsqldb_1.0.0.v200906020900.jar</li><li>org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition_1.0.4.v201005211215.jar</li><li>org.eclipse.datatools.enablement.ibm.db2.luw_1.0.2.v201005211230.jar</li><li>org.eclipse.datatools.enablement.ibm.informix.dbdefinition_1.0.4.v201005211230.jar</li><li>org.eclipse.datatools.enablement.ibm.informix_1.0.1.v201005211230.jar</li><li>org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition_1.0.0.v201004211630.jar</li><li>org.eclipse.datatools.enablement.msft.sqlserver_1.0.1.v201001180222.jar</li><li>org.eclipse.datatools.enablement.mysql.dbdefinition_1.0.4.v200906161800.jar</li><li>org.eclipse.datatools.enablement.mysql_1.0.2.v201002041100.jar</li><li>org.eclipse.datatools.enablement.oda.ws_1.2.2.v201011041216.jar</li><li>org.eclipse.datatools.enablement.oda.xml_1.2.1.v201104121500.jar</li><li>org.eclipse.datatools.enablement.oracle.dbdefinition_1.0.102.v201101120745.jar</li><li>org.eclipse.datatools.enablement.oracle_1.0.0.v200908130544.jar</li><li>org.eclipse.datatools.enablement.postgresql.dbdefinition_1.0.1.v200906161800.jar</li><li>org.eclipse.datatools.enablement.postgresql_1.0.1.v200906020900.jar</li><li>org.eclipse.datatools.modelbase.dbdefinition_1.0.2.v201002130228.jar</li><li>org.eclipse.datatools.modelbase.derby_1.0.0.v201002161452.jar</li><li>org.eclipse.datatools.modelbase.sql.query_1.1.1.v201008100700.jar</li><li>org.eclipse.datatools.modelbase.sql_1.0.4.v201002250945.jar</li><li>org.eclipse.emf.common_2.7.0.v20110527-1609.jar</li><li>org.eclipse.emf.ecore.change_2.7.0.v20110408-2116.jar</li><li>org.eclipse.emf.ecore.xmi_2.7.0.v20110520-1406.jar</li><li>org.eclipse.emf.ecore_2.7.0.v20110527-1609.jar</li><li>org.eclipse.emf_2.6.0.v20110530-1010.jar</li><li>org.eclipse.equinox.app_1.3.100.v20110321.jar</li><li>org.eclipse.equinox.common_3.6.0.v20110523.jar</li><li>org.eclipse.equinox.preferences_3.4.0.v20110502.jar</li><li>org.eclipse.equinox.registry_3.5.100.v20110502.jar</li><li>org.eclipse.osgi.services_3.3.0.v20110513.jar</li><li>org.eclipse.osgi_3.7.0.v20110613.jar</li><li>org.eclipse.update.configurator_3.3.100.v20100512.jar</li><li>org.w3c.css.sac_1.3.0.v200805290154.jar</li><li>org.w3c.dom.smil_1.0.0.v200806040011.jar</li><li>org.w3c.dom.svg_1.1.0.v201011041433.jar</li><li>pace_util.jar</li><li>pacesecxbeans-3.1.jar</li><li>pdfmp-2.0.0.jar</li><li>resolver-2.2.0.jar</li><li>saxpath-1.0.jar</li></ul>
JasonW
Are you deploying your app as a war or an ear. I assume you saw this note:
http://wiki.eclipse.org/BIRT/FAQ/Deployment#Q:_How_do_I_install_BIRT_in_WebLogic_10.0
Do all reports fail with the same error.
Jason
jyol2005
WAR file - currently for testing deployed as an exploded war.
Yes, all reports fail with the same error. I even tried opening some report design files (from 2.5.1 version) in 3.7 designer and saved them (just to make sure there are no version incompatibility). I also add BIRT's js.jar before the weblogic jars in the classpath (that's how we had it for 2.5.1).
jyol2005
Another issue we notice in our environment is the task.run() method takes 4+ minutes to return with the exception the first time, but subsequent requests are faster (for the same report).
JasonW
Can you open a bugzilla entry for this? I did see a note on the above wiki about trying it as an ear deployment. Not sure if that will work though. BTW the new runtime is only 3.7. BIRT 2.6.2 should have still worked.
Jason
jyol2005
That's why I'm puzzled. I get the exact same error with 2.6.2, but works fine in 2.5. Did anything change in 2.6.2 for scripting?
JasonW
Not that I would guess would affect this. Are you sure you are deploying in the same manner. (ie same settings etc)
Jason
jyol2005
I do notice in 2.6.2 version under plugins there are 2 jar files and they are not under ReportEngine/plugins in 2.5.1.<br />
<ul class='bbc'><li>org.eclipse.birt.report.engine.script.javascript_2.6.2.r262_v20110127.jar </li><li>org.mozilla.javascript_1.7.2.v201005080400.jar (this file seems to be same as lib/js.jar)</li></ul>
<br />
<br />
My setup is same for 2.6.2 as 2.5.1 (except for the above 2 extra jars). I only changed the BirtEngine (yes, made sure configurations only has config.ini) and restarted my weblogic. It works with 2.5.1, but gives the EvaluatorException with 2.6.2. At this point, I'm really not planning to move to 3.7 as it seems to be having more performance issues. I need to desperately get this 2.6.2 to work because we have a requirement to add patterns in charts.
JasonW
I remember that change being made, but I do not remember why. I though it was in a bugzilla but I could not located it. Any chance you can open a bug and specify the error and point out the two jars referenced in your last message. Please post the number here as well. BTW patterns are in 2.6.0, which does not have the change in the mozilla plugin.
Jason
JasonW
The dev team tried to reproduce this error with BIRT 2.6.2 and WL 10.3 and could not. What version of WL are you using?
Jason
jyol2005
Jason,<br />
<br />
I figured out the issue. It's something to do with the file path on the image. I need to set the image file at run time based on the client and I have used the file path with "/" in it. As soon as it sees the / char, it's treating as regular expression. This doesn't happen with 2.5.1, but starting 2.6.0, this is an issue.If you look at the stack trace, it shows handleImage and I actually traced it to where it's coming to TokenStream.readRegExp.<br />
<br />
at org.eclipse.birt.report.engine.executor.<strong class='bbc'>ImageItemExecutor.handleFileExpressionImage</strong>(ImageItemExecutor.java:279)<br />
at org.eclipse.birt.report.engine.executor.<strong class='bbc'>ImageItemExecutor.handleImage</strong>(ImageItemExecutor.java:148)<br />
at org.eclipse.birt.report.engine.executor.<strong class='bbc'>ImageItemExecutor.execute</strong>(ImageItemExecutor.java:106)<br />
<br />
<br />
In any case, I have replaced "/" with "//" and it's working fine in 2.6.0. I have not tried with 2.6.2 or 3.7, but my guess is it should work. <br />
<br />
Thanks so much for all your help,
JasonW
Glad to hear you got it working.
Jason