No bean named 'ScriptHelper' available

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

UserOpenemm
Posts: 1
Joined: Tue Jan 14, 2020 3:03 pm

No bean named 'ScriptHelper' available

Post by UserOpenemm » Tue Jan 14, 2020 3:38 pm

When I tried to set up an 'opt-out of mailinglists' form in OpenEMM2019, i used a script, that worked in OpenEMM 2015.
When I was using the given link to the form I got the following error in ./logs/catalina.out

Code: Select all

[http-nio-8080-exec-7] com.agnitas.userform.bean.impl.UserFormImpl - evaluateAction: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ScriptHelper' available
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ScriptHelper' available
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
        at org.springframework.beans.factory.support.CglibSubclassingInstantiationStrategy$LookupOverrideMethodInterceptor.intercept(CglibSubclassingInstantiationStrategy.java:285)
        at com.agnitas.beans.BeanLookupFactory$$EnhancerBySpringCGLIB$$930ea7a2.getBeanScriptHelper(<generated>)
        at com.agnitas.emm.core.action.service.impl.ActionOperationExecuteScriptImpl.execute(ActionOperationExecuteScriptImpl.java:68)
        at com.agnitas.emm.core.action.service.impl.EmmActionOperationServiceImpl.executeOperation(EmmActionOperationServiceImpl.java:35)
        at com.agnitas.emm.core.action.service.impl.EmmActionServiceImpl.executeActions(EmmActionServiceImpl.java:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
        at com.sun.proxy.$Proxy27.executeActions(Unknown Source)
        at com.agnitas.userform.bean.impl.UserFormImpl.evaluateAction(UserFormImpl.java:347)
        at com.agnitas.userform.bean.impl.UserFormImpl.evaluateStartAction(UserFormImpl.java:371)
        at com.agnitas.userform.bean.impl.UserFormImpl.evaluateForm(UserFormImpl.java:399)
        at com.agnitas.emm.core.userform.service.impl.UserFormExecutionServiceImpl.doExecuteForm(UserFormExecutionServiceImpl.java:221)
        at com.agnitas.emm.core.userform.service.impl.UserFormExecutionServiceImpl.executeForm(UserFormExecutionServiceImpl.java:89)
        at com.agnitas.web.ComUserFormExecuteAction.execute(ComUserFormExecuteAction.java:111)
        at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
        at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
        at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
        at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
        at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
        at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
        at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
        at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.agnitas.web.filter.Struts1SecurityFilter.doFilter(Struts1SecurityFilter.java:89)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.agnitas.emm.core.commons.filter.OriginUriFilter.doFilter(OriginUriFilter.java:43)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.agnitas.emm.core.commons.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:80)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.agnitas.emm.core.sessionhijacking.web.GroupingSessionHijackingPreventionFilter.doFilter(GroupingSessionHijackingPreventionFilter.java:105)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.agnitas.web.filter.HttpSecurityHeaderFilter.doFilter(HttpSecurityHeaderFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.agnitas.emm.core.commons.filter.LoadBalancerFilter.doFilter(LoadBalancerFilter.java:154)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:643)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        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)
2020-01-14 13:54:18,125: ERROR [http-nio-8080-exec-7] com.agnitas.userform.bean.impl.UserFormImpl - Action Error: CompanyID=1 ActionID=2
I tried different approaches in the Form and the Action i linked together.
It doesnt matter what was given in the script section, even if empty or just a

Code: Select all

#set($scriptResult = "1")
wouldn't give any other output.
I looked through the source code on github and found the named classes. They all are present on my system.

I am working with OpenEMM 19.10.000.133, runtime 19.10.009.015, on CentOS 7.

maschoff
Site Admin
Posts: 2262
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: No bean named 'ScriptHelper' available

Post by maschoff » Wed Jan 15, 2020 2:36 pm

We will provide an extra documentation for Velocity scripts really soon. Several things have changed between OpenEMM 2015 and 2019.
OpenEMM Maintainer

Post Reply