javaweb-servicesbirtrhinobirt-emitter

Migrate birt from version 4.4 to 4.9. ava.lang.NoSuchMethodError: org.mozilla.javascript.Parser.parse(Ljava/lang/String;Ljava/lang/String;I)


rtask.run(), generating error---->

ago 17, 2022 2:18:42 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [WebReport] in context with path [/WebReport] threw exception [Erro durante o processamento do relatorio.] with root cause
java.lang.NoSuchMethodError: org.mozilla.javascript.Parser.parse(Ljava/lang/String;Ljava/lang/String;I)Lorg/mozilla/javascript/ast/AstRoot;
    at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.parse(AbstractExpressionCompiler.java:219)
    at org.eclipse.birt.data.engine.expression.AbstractExpressionCompiler.compileExpression(AbstractExpressionCompiler.java:127)
    at org.eclipse.birt.data.engine.expression.ExpressionCompiler.compile(ExpressionCompiler.java:65)
    at org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpression(PreparedQuery.java:292)
    at org.eclipse.birt.data.engine.impl.PreparedQuery.prepareExpressions(PreparedQuery.java:268)
    at org.eclipse.birt.data.engine.impl.PreparedQuery.prepareGroup(PreparedQuery.java:228)
    at org.eclipse.birt.data.engine.impl.PreparedQuery.prepare(PreparedQuery.java:182)
    at org.eclipse.birt.data.engine.impl.PreparedQuery.<init>(PreparedQuery.java:118)
    at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.<init>(PreparedDataSourceQuery.java:66)
    at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.<init>(PreparedOdaDSQuery.java:75)
    at org.eclipse.birt.data.engine.impl.PreparedQueryUtil.newInstance(PreparedQueryUtil.java:190)
    at org.eclipse.birt.data.engine.impl.DataEngineImpl.prepare(DataEngineImpl.java:378)
    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:453)
    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:625)
    at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.doPrepareQuery(AbstractDataEngine.java:214)
    at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doPrepareQuery(DteDataEngine.java:225)
    at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:177)
    at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:115)
    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:55)
    at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:43)
    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:55)
    at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportExecutor.execute(LocalizedReportExecutor.java:58)
    at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:143)
    at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:69)
    at br.com.ipm.report.servlet.ServletBirt.sendReportDirect(ServletBirt.java:170)
    at br.com.ipm.report.servlet.WebReport.doPost(WebReport.java:154)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:199)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.base/java.lang.Thread.run(Thread.java:834)

I use in my lib only the jar org.mozilla.javascript in version 1.7.5 I have no idea what it could be, I did a search so I didn't understand what it could be... Is it environment configuration? I verified that the "AbstractExpressionCompiler" class does a "ScriptNode tree = parse(exp, engine.getJSContext(context));" Is it not something with the context of the application?


Solution

  • I had a jar called js.jar, from what I saw there are "rhino" classes too, in the end it was just a conflict of equal libraries, I deleted the old js.jar and kept the org.mozilla.javascript