Hi All,

Has anybody faced the issue with JavascriptRule component in xaction when you run it in Pentaho 8.0?

In Pentaho 8.0 I get an error:
Stack Tracerg.pentaho.platform.api.engine.ActionValidationException: RuntimeContext.ERROR_0009 - Could not create component JavascriptRule

But it works for Pentaho 7.1. Do you have any idea?

Here is example .xaction file content:

<action-sequence> <name>Example1.xaction</name>

<!-- some header nodes deleted -->

<inputs>
<region type="string">
<default-value>Central</default-value>
<sources>
<request>REGION</request>
<session>aRegion</session>
</sources>
</region>

<from type="string">
<default-value>joepentaho@pentaho.org</default-value>
</from>

<subject type="string">
<default-value>Pentaho Example1</default-value>
</subject>

<message-plain type="string">
<default-value>
This is an email from the Pentaho BI Platform - Example1
</default-value>
</message-plain>
</inputs>

<outputs/>

<resources/>

<actions>
<action-definition>
<action-inputs>
<region type="string"/>
</action-inputs>

<action-outputs>
<rule_result type="string"/>
</action-outputs>

<component-name>JavascriptRule</component-name>
<component-definition>
<script>
<![CDATA[
if ( "Central".equals( region ) ) {
rule_result = "joe@pentaho.org";
}
else {
rule_result = "suzy@pentaho.org";
}
]]>
</script>
</component-definition>
</action-definition>

<action-definition>
<action-inputs>
<to type="string" mapping="rule_result"/>
<from type="string"/>
<subject type="string"/>
<message-plain type="string"/>
</action-inputs>
<component-name>EmailComponent</component-name>
<component-definition/>
</action-definition>

</actions>
</action-sequence>

Here is catalina.out log:
ERROR [SolutionEngine] 3d80ef48-d51c-11e7-862c-000c29b8e9aa:SOLUTION-ENGINE:/clarity/community/referral_detail_report.xaction: Action Sequence execution failed, see details below
| Error Time: Wednesday, November 29, 2017 7:44:52 AM PST
| Session ID: admin
| Instance Id: 3d80ef48-d51c-11e7-862c-000c29b8e9aa
| Action Sequence: referral_detail_report.xaction
| Execution Stack:
| Action Class: JavascriptRule
| Action Desc: Javascript that determine if report header should be showed
| Loop Index: N/A
Stack Tracerg.pentaho.platform.api.engine.ActionValidationException: RuntimeContext.ERROR_0009 - Could not create component JavascriptRule
at org.pentaho.platform.engine.services.runtime.RuntimeContext.validateComponents(RuntimeContext.java:520)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.validateSequence(RuntimeContext.java:482)
at org.pentaho.platform.engine.services.solution.SolutionEngine.executeInternal(SolutionEngine.java:350)
at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:282)
at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:179)
at org.pentaho.platform.web.http.api.resources.XactionUtil.executeInternal(XactionUtil.java:332)
at org.pentaho.platform.web.http.api.resources.XactionUtil.executeHtml(XactionUtil.java:234)
at org.pentaho.platform.web.http.api.resources.XactionUtil.execute(XactionUtil.java:386)
at org.pentaho.platform.web.http.ActionSequenceContentGenerator.createContent(ActionSequenceContentGenerator.java:83)
at org.pentaho.platform.engine.services.solution.SimpleContentGenerator.createContent(SimpleContentGenerator.java:60)
at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutput.generateContent(GeneratorStreamingOutput.java:237)
at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutput.write(GeneratorStreamingOutput.java:162)
at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutputProvider.writeTo(GeneratorStreamingOutputProvider.java:54)
at org.pentaho.platform.web.http.api.resources.GeneratorStreamingOutputProvider.writeTo(GeneratorStreamingOutputProvider.java:33)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:302)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1510)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
at org.pentaho.platform.web.servlet.JAXRSServlet.service(JAXRSServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.pentaho.platform.web.servlet.JAXRSServlet.service(JAXRSServlet.java:114)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:223)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:87)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at org.pentaho.platform.web.http.filters.PreFlightReportingFilter.doFilter(PreFlightReportingFilter.java:47)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:189)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.http://www.BasicAuthenticationFilter...lter.java:158)
at org.pentaho.platform.web.http.security.PentahoBasicProcessingFilter.doFilterInternal(PentahoBasicProcessingFilter.java:125)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.pentaho.platform.web.http.filters.HttpSessionPentahoSessionIntegrationFilter.doFilter(HttpSessionPentahoSessionIntegrationFilter.java:271)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.SystemStatusFilter.doFilter(SystemStatusFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:114)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.WebappRootForwardingFilter.doFilter(WebappRootForwardingFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoPathDecodingFilter.doFilter(PentahoPathDecodingFilter.java:34)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: JavascriptRule
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.resolveComponent(RuntimeContext.java:674)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.validateComponents(RuntimeContext.java:505)
... 92 more


Any help will be appreciated!