1

We are trying to integrate the BIRT plugin into our application and seem to have run into some conflicts with the javascript dependencies the BIRT run-engine utilizes and the bootstrap framework use.

If you have both installed, you will get an error such as

Error | 2014-03-05 16:02:40,228 [http-bio-8080-exec-3] ERROR impl.ReportEngine - Error happened while running the report. Message: org.mozilla.javascript.Parser.parse(Ljava/lang/String;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;

Looking around the web, a lot of posts point to conflicts with a javascript library known as Rhino.

  1. Disable grails 2.0 resources processing, after deploy

  2. Grails yui-minify-resources and lesscss-resources conflict

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

My question for anyone here is how do I solve these dependency conflicts? Link 2 above states that it was fixed by dropping the dependency into the lib folder. I've downloaded rhino1_7R4 and extracted that to the lib folder, but I'm a little lost on how that is supposed to fix the problem.

To easily duplicate the issue, download the example application on the grails birt plugin page http://grails.org/plugin/birt-report and add the kickstart plugin to the application. It will blow up as soon as the quartz job tries to run.

Any thoughts?

Stacktrace:

2014-03-06 08:37:29,395 [http-bio-8080-exec-10] ERROR impl.ReportEngine  - Error happened while running the report.
Message: org.mozilla.javascript.Parser.parse(Ljava/lang/String;Ljava/lang/String;I)Lorg/mozilla/javascript/ScriptOrFnNode;
Line | Method
->>  184 | parse                      in org.eclipse.birt.core.data.ExpressionParserUtility
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     77 | compileColumnExpression    in     ''
|    116 | hasAggregation . . . . . . in     ''
|    308 | hasAggregation             in org.eclipse.birt.core.data.ExpressionUtil
|    229 | hasAggregationInFilter . . in org.eclipse.birt.report.engine.adapter.ExpressionUtil
|    234 | hasAggregationInFilter     in     ''
|    164 | addConditionalExprBindings in     ''
|    102 | prepareTotalExpressions    in     ''
|   2034 | getNewExpressionBindings . in org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder$QueryBuilderVisitor
|   1709 | transformExpressions       in     ''
|   1694 | transformExpressions . . . in     ''
|   1211 | visitRow                   in     ''
|    108 | accept . . . . . . . . . . in org.eclipse.birt.report.engine.ir.RowDesign
|    256 | build                      in org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder
|   1097 | handleListingBand . . . .  in org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder$QueryBuilderVisitor
|    947 | visitTableItem             in     ''
|     53 | accept . . . . . . . . . . in org.eclipse.birt.report.engine.ir.TableItemDesign
|    256 | build                      in org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder
|    237 | build . . . . . . . . . .  in     ''
|    180 | prepare                    in org.eclipse.birt.report.engine.data.dte.AbstractDataEngine
|    122 | execute . . . . . . . . .  in org.eclipse.birt.report.engine.executor.ReportExecutor
|     60 | execute                    in org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor
|     42 | execute . . . . . . . . .  in org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor
|     60 | execute                    in org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor
|     61 | execute . . . . . . . . .  in org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportExecutor
|    179 | doRun                      in org.eclipse.birt.report.engine.api.impl.RunAndRenderTask
|     77 | run . . . . . . . . . . .  in     ''
|    572 | runAndRender               in com.itjw.grails.birt.BirtReportService
|    535 | runAndRender . . . . . . . in     ''
|    236 | doCall                     in package.ReportController$_closure1
|    195 | doFilter . . . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter                   in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter . . . . . . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter                   in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter . . . . . . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|     76 | doFilter                   in org.jasig.cas.client.session.SingleSignOutFilter
|   1145 | runWorker . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor
|    615 | run                        in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | run . . . . . . . . . . .  in java.lang.Thread
Community
  • 1
  • 1
idonaldson
  • 465
  • 1
  • 14
  • 33

2 Answers2

0

I solved the issue excluding the rhino jar from kickstart plugin, also, i have to delete the uglify plugin, in Bootstrap.groovy > plugins:

compile (":kickstart-with-bootstrap:1.1.0") {
    excludes 'rhino'
}
Nickmancol
  • 1,034
  • 7
  • 16
0

I haven't tried it with kickstart-with-bootstrap but I had the same issue with asset-pipeline along with grails-birt-plugin. And doing the following fixed it

  compile (":asset-pipeline:1.8.11") {
            excludes 'rhino'
        }

Refresh grails dependency.