#1 2017-03-04 09:16:53

hvupadhye
Member
From: Mumbai, India
Registered: 2016-05-13

JXLS Error

I was trying to explore JXLS feature of Report server. I facing following error. This same query is working fine with dynamic list. But it's not working with template. Please help.

Error: An error occured during report execution.
The report could not be executed: Can't parse an expression rm.exec('select branch_ID from branch_Details')
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: Can't parse an expression rm.exec('select branch_ID from branch_Details') at net.datenwerke.rs.tabletemplate.service.engines.jxls.hookers.JxlsTransformEnvironment.call(JxlsTransformEnvironment.java:70) at net.datenwerke.rs.tabletemplate.service.engines.jxls.hookers.JxlsTemplateProviderHooker.executeReport(JxlsTemplateProviderHooker.java:166) at net.datenwerke.rs.tabletemplate.service.tabletemplate.hookers.TableReportEngineEnhancerHooker.executeReport(TableReportEngineEnhancerHooker.java:76) at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:115) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exeucteReport(ReportExportServlet.java:527) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doExportReport(ReportExportServlet.java:402) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReport(ReportExportServlet.java:333) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportViaSession(ReportExportServlet.java:326) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:164) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.CGLIB$doGet$1() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f$$FastClassByGuice$$4e892507.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.doGet() at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.CGLIB$service$14() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f$$FastClassByGuice$$4e892507.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.service() at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:188) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2522) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2511) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.RuntimeException: Can't parse an expression rm.exec('select branch_ID from branch_Details') at net.sf.jxls.tag.ForEachTag.parseItemsProperty(ForEachTag.java:141) at net.sf.jxls.tag.ForEachTag.init(ForEachTag.java:101) at net.sf.jxls.parser.CellParser.parseTag(CellParser.java:300) at net.sf.jxls.parser.CellParser.parseCellValue(CellParser.java:202) at net.sf.jxls.parser.CellParser.parseCell(CellParser.java:56) at net.sf.jxls.transformer.SheetTransformer.parseCells(SheetTransformer.java:204) at net.sf.jxls.transformer.SheetTransformer.parseRow(SheetTransformer.java:275) at net.sf.jxls.transformer.SheetTransformer.transformSheet(SheetTransformer.java:80) at net.sf.jxls.transformer.XLSTransformer.transformWorkbook(XLSTransformer.java:248) at net.sf.jxls.transformer.XLSTransformer.transformXLS(XLSTransformer.java:221) at net.datenwerke.rs.tabletemplate.service.engines.jxls.hookers.JxlsTransformEnvironment.call(JxlsTransformEnvironment.java:38) ... 57 more Caused by: org.apache.commons.jexl2.JexlException: ![3,47]: 'rm.exec('select branch_ID from branch_Details');' attempting to call method on null at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:798) at org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:18) at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1045) at org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:162) at org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:64) at net.sf.jxls.parser.Expression.evaluate(Expression.java:78) at net.sf.jxls.tag.ForEachTag.parseItemsProperty(ForEachTag.java:132) ... 67 more

Offline

#2 2017-03-06 15:10:41

eduardo
Administrator
Registered: 2016-11-01
Website

Re: JXLS Error

Hi hvupadhye,

could you please try with sql.exec('select branch_ID from branch_Details') ?

Cheers,
Eduardo

Offline

#3 2017-03-09 09:12:56

eduardo
Administrator
Registered: 2016-11-01
Website

Re: JXLS Error

Hi hvupadhye,

I would be interested if sql.exec() worked, please provide feedback on this.

Cheers,
Eduardo

Offline

#4 2017-03-09 10:17:13

hvupadhye
Member
From: Mumbai, India
Registered: 2016-05-13

Re: JXLS Error

Hi edulid,

I am very sorry to replying late. I tried sql.exec() but with this option also I am getting the following exception.

Error: An error occured during report execution.
The report could not be executed: Can't parse an expression sql.exec('select branch_ID from branch_Details')
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: Can't parse an expression sql.exec('select branch_ID from branch_Details') at net.datenwerke.rs.tabletemplate.service.engines.jxls.hookers.JxlsTransformEnvironment.call(JxlsTransformEnvironment.java:70) at net.datenwerke.rs.tabletemplate.service.engines.jxls.hookers.JxlsTemplateProviderHooker.executeReport(JxlsTemplateProviderHooker.java:166) at net.datenwerke.rs.tabletemplate.service.tabletemplate.hookers.TableReportEngineEnhancerHooker.executeReport(TableReportEngineEnhancerHooker.java:76) at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:115) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exeucteReport(ReportExportServlet.java:527) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doExportReport(ReportExportServlet.java:402) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReport(ReportExportServlet.java:333) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportViaSession(ReportExportServlet.java:326) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:164) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.CGLIB$doGet$1() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f$$FastClassByGuice$$4e892507.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.doGet() at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.CGLIB$service$14() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f$$FastClassByGuice$$4e892507.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$f4dae28f.service() at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:188) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2522) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2511) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.RuntimeException: Can't parse an expression sql.exec('select branch_ID from branch_Details') at net.sf.jxls.tag.ForEachTag.parseItemsProperty(ForEachTag.java:141) at net.sf.jxls.tag.ForEachTag.init(ForEachTag.java:101) at net.sf.jxls.parser.CellParser.parseTag(CellParser.java:300) at net.sf.jxls.parser.CellParser.parseCellValue(CellParser.java:202) at net.sf.jxls.parser.CellParser.parseCell(CellParser.java:56) at net.sf.jxls.transformer.SheetTransformer.parseCells(SheetTransformer.java:204) at net.sf.jxls.transformer.SheetTransformer.parseRow(SheetTransformer.java:275) at net.sf.jxls.transformer.SheetTransformer.transformSheet(SheetTransformer.java:80) at net.sf.jxls.transformer.XLSTransformer.transformWorkbook(XLSTransformer.java:248) at net.sf.jxls.transformer.XLSTransformer.transformXLS(XLSTransformer.java:221) at net.datenwerke.rs.tabletemplate.service.engines.jxls.hookers.JxlsTransformEnvironment.call(JxlsTransformEnvironment.java:38) ... 57 more Caused by: org.apache.commons.jexl2.JexlException: ![4,49]: 'sql.exec('select branch_ID from branch_Details');' attempting to call method on null at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:798) at org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:18) at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1045) at org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:162) at org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:64) at net.sf.jxls.parser.Expression.evaluate(Expression.java:78) at net.sf.jxls.tag.ForEachTag.parseItemsProperty(ForEachTag.java:132) ... 67 more

Offline

#5 2017-03-09 11:12:32

eduardo
Administrator
Registered: 2016-11-01
Website

Re: JXLS Error

Hi hvupadhye,

could you please send us your jxml template and configuration (screenshots, etc) to info@datenwerke.net ? Please try to make your example as simple as possible.

Cheers,
Eduardo

Offline

#6 2017-03-09 11:45:07

eduardo
Administrator
Registered: 2016-11-01
Website

Re: JXLS Error

Hi hvupadhye,

further information needed: are you using a dynamic list template or a standalone template? How do you add the template?

Cheers,
Eduardo

Offline

#7 2017-04-19 10:41:31

eduardo
Administrator
Registered: 2016-11-01
Website

Re: JXLS Error

Hi hvupadhye,

I am getting the error you mentioned *only* in the case that there is some problem with the SQL. For example, with the following:

SELECT EMP_FIRSTNAME as firstname, EMP_LASTNAME as lastname FROM T_AGG_EMPLOYEE where EMP_FIRSTNAME=${param1}

I get the error in the following cases:

1. The table T_AGG_EMPLOYEE doesn't exist
2. The table T_AGG_EMPLOYEE doesn't have the fields EMP_LASTNAME, EMP_FIRSTNAME

If I correct this, the report is working correctly.
So you should check if your datasource is pointing to the correct database, and if this database contains the correct table with the correct fields.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB