User Function problem - works in one pool but not in another?

Hi there,

this is really - really strange…

I have one diagram with two pools, I also have a couple of User Defined Groovy Scripts which show up in Script Editor Functions List…

Both pools have a connector Script with exactly the same code…

In one pool the script calls the function and works correctly

in the other pool I get the following error message…

depends on CompanyGetUNITYText is neither defined in the script nor in dependencies.

What is going on?

Many thanks in advance,
Best regards
Seán

2014-11-29 17:14:26 org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl SEVERE: Username Form Task Error when evaluating expressions on activity instance 440100. Error on expression evaluation for the attribute [initial-value] of object [Text2]. org.bonitasoft.console.common.server.utils.BPMExpressionEvaluationException: Error when evaluating expressions on activity instance 440100. Error on expression evaluation for the attribute [initial-value] of object [Text2]. at org.bonitasoft.forms.server.accessor.api.ExpressionEvaluatorEngineClient.evaluateExpressionsOnActivityInstance(ExpressionEvaluatorEngineClient.java:47) at org.bonitasoft.forms.server.api.impl.FormExpressionsAPIImpl.evaluateActivityExpressions(FormExpressionsAPIImpl.java:878) at org.bonitasoft.forms.server.api.impl.FormWorkflowAPIImpl.getActivityFieldsValues(FormWorkflowAPIImpl.java:767) at org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl.resolveExpressions(FormServiceProviderImpl.java:860) at org.bonitasoft.forms.server.api.impl.util.FormFieldValuesUtil.setFormWidgetsValues(FormFieldValuesUtil.java:880) at org.bonitasoft.forms.server.FormsServlet.getFormFirstPage(FormsServlet.java:234) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at org.bonitasoft.forms.server.FormsServlet.processCall(FormsServlet.java:138) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.bonitasoft.console.common.server.login.filter.NoCacheFilter.doFilter(NoCacheFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: org.bonitasoft.engine.expression.ExpressionEvaluationException: USERNAME=walter.bates | org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Expression Text2:initial-value with content = depends on CompanyGetUNITYText is neither defined in the script nor in dependencies. at org.bonitasoft.engine.api.impl.ProcessAPIImpl.evaluateExpressionsOnActivityInstance(ProcessAPIImpl.java:5595) at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:368) at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:337) at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:276) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:344) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:286) at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:128) at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:88) at com.sun.proxy.$Proxy17.evaluateExpressionsOnActivityInstance(Unknown Source) at org.bonitasoft.forms.server.accessor.api.ExpressionEvaluatorEngineClient.evaluateExpressionsOnActivityInstance(ExpressionEvaluatorEngineClient.java:45) ... 31 more Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Expression Text2:initial-value with content = depends on CompanyGetUNITYText is neither defined in the script nor in dependencies. at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:133) at org.bonitasoft.engine.expression.impl.ExpressionServiceImpl.evaluate(ExpressionServiceImpl.java:77) at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:180) at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionsFlatten(ExpressionResolverServiceImpl.java:102) at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluate(ExpressionResolverServiceImpl.java:76) at org.bonitasoft.engine.api.impl.transaction.expression.EvaluateExpressionsInstanceLevel.execute(EvaluateExpressionsInstanceLevel.java:69) at org.bonitasoft.engine.api.impl.ProcessAPIImpl.evaluateExpressionsInstanceLevel(ProcessAPIImpl.java:5642) at org.bonitasoft.engine.api.impl.ProcessAPIImpl.evaluateExpressionsOnActivityInstance(ProcessAPIImpl.java:5592) ... 43 more Caused by: groovy.lang.MissingPropertyException: No such property: CompanyGetUNITYText for class: Script4 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at Script4.run(Script4.groovy:1) at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:127) ... 50 more

2014-11-29 17:14:26 org.bonitasoft.forms.server.FormsServlet
SEVERE: Error while getting the first page for application PROCESSNAME Completion–2.3–PROCESSNAME Completion$entry
org.bonitasoft.forms.server.exception.FormInitializationException: Error when evaluating expressions on activity instance 440100. Error on expression evaluation for the attribute [initial-value] of object [Text2].
at org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl.resolveExpressions(FormServiceProviderImpl.java:916)
at org.bonitasoft.forms.server.api.impl.util.FormFieldValuesUtil.setFormWidgetsValues(FormFieldValuesUtil.java:880)
at org.bonitasoft.forms.server.FormsServlet.getFormFirstPage(FormsServlet.java:234)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at org.bonitasoft.forms.server.FormsServlet.processCall(FormsServlet.java:138)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.bonitasoft.console.common.server.login.filter.NoCacheFilter.doFilter(NoCacheFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)

2014-11-29 17:14:52 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita].[jsp]
FINE: Disabling the response for futher output

I’ve worked around it by rewriting the whole pool, using exactly the same code. So there must be some sort of corruption in the Pool, which apart from this one issue seems to work OK.

Would be interested to know what the problem is though…

regards
Seán