Execution Error on My Value Provider
This is first time to write a value provider.
But got Error during 'work item save'. What's the problem and the solution to it? ------------------- dojo.provide("com.example.js.ProjectCodeCalculator"); (function() { dojo.declare("com.example.js.ProjectCodeCalculator", null, { getValue: function(attribute, workItem, configuration) { var parentAttribute = configuration.getChild("parentAttribute").getIdentifier(); var parentValue = workItem.getValue(parentAttribute); return "G" + parentValue; }, __sentinel: null }); })(); ------------------- Project Configuration as follows.. ------------------- <valueProvider> <script> <parentAttribute> </valueProvider> ------------------- The Error message on Jetty Server .... ------------------- 14:41:29,976 ERROR com.ibm.team.workitem.common - Error invoking value provider 'com.ibm.team.workitem.valueproviders.VALUE_PROVIDER._eZAxAFEZEeCvsvFM8pRlgg' org.mozilla.javascript.JavaScriptException: ({"Bundle-SymbolicName":"org.dojotoolkit.dojo", "path":"resources\\_base\\_loader", "name":"loader.js"}#414) at org.mozilla.javascript.gen.c2._c18({"Bundle-SymbolicName":"org.dojotoolkit.dojo", "path":"resources\\_base\\_loader", "name":"loader.js"}:413) at org.mozilla.javascript.gen.c2.call({"Bundle-SymbolicName":"org.dojotoolkit.dojo", "path":"resources\\_base\\_loader", "name":"loader.js"}) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003) at org.mozilla.javascript.gen.c2.call({"Bundle-SymbolicName":"org.dojotoolkit.dojo", "path":"resources\\_base\\_loader", "name":"loader.js"}) at com.ibm.team.rtc.common.scriptengine.environment.dojo.DojoFeature$3.call(DojoFeature.java:179) at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1862) at com.ibm.team.rtc.common.scriptengine.environment.ScriptingHelperImplementation$4.run(ScriptingHelperImplementation.java:141) at com.ibm.team.rtc.common.scriptengine.environment.ScriptingHelperImplementation$4.run(ScriptingHelperImplementation.java:1) at com.ibm.team.rtc.common.scriptengine.environment.AbstractScriptEnvironment.execute(AbstractScriptEnvironment.java:74) at com.ibm.team.rtc.common.scriptengine.environment.ScriptingHelperImplementation.dojoRequire(ScriptingHelperImplementation.java:138) at com.ibm.team.rtc.common.scriptengine.environment.ScriptingHelperImplementation.getConstructor(ScriptingHelperImplementation.java:151) at com.ibm.team.rtc.common.scriptengine.ScriptUtilities$1.run(ScriptUtilities.java:30) at com.ibm.team.rtc.common.scriptengine.environment.AbstractScriptEnvironment.execute(AbstractScriptEnvironment.java:74) at com.ibm.team.rtc.common.scriptengine.ScriptUtilities.newInstance(ScriptUtilities.java:27) at com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider.getProvider(ScriptAttributeValueProvider.java:93) at com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider.getValue(ScriptAttributeValueProvider.java:52) at com.ibm.team.workitem.common.internal.attributeValueProviders.AttributeValueProviderRegistry$SafeValueProvider.getValue(AttributeValueProviderRegistry.java:43) at com.ibm.team.workitem.common.internal.model.impl.AttributeImpl.getValue(AttributeImpl.java:899) at com.ibm.team.workitem.service.internal.save.DependentValueUpdater.handleNotifySave(DependentValueUpdater.java:40) at com.ibm.team.workitem.service.internal.save.WorkItemSaveParticipant.handleNotifySave(WorkItemSaveParticipant.java:32) at com.ibm.team.workitem.service.internal.save.WorkItemSavePreparation.notifySave(WorkItemSavePreparation.java:198) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.notifyPreSave(WorkItemRepositoryService.java:323) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.access$2(WorkItemRepositoryService.java:317) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService$1.run(WorkItemRepositoryService.java:235) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService$1.run(WorkItemRepositoryService.java:1) at com.ibm.team.repository.service.internal.TransactionService$2.run(TransactionService.java:200) at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$Transaction.run(RepositoryDatabase.java:440) at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$1.run(RepositoryDatabase.java:267) at com.ibm.team.repository.service.internal.rdb.ConnectionPoolService.withCurrentConnection(ConnectionPoolService.java:332) at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56) at $Proxy61.withCurrentConnection(Unknown Source) at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:263) at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:219) at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:119) at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:88) at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56) at $Proxy105.runInTransaction(Unknown Source) at com.ibm.team.repository.service.AbstractService.runInTransaction(AbstractService.java:947) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.saveTransaction(WorkItemRepositoryService.java:227) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.save(WorkItemRepositoryService.java:185) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56) at $Proxy417.save(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleMethod(AbstractTeamServerServlet.java:1276) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.executeMethod(AbstractTeamServerServlet.java:872) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doPost(AbstractTeamServerServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2(AbstractTeamServerServlet.java:1834) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest(AbstractTeamServerServlet.java:1688) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.access$0(AbstractTeamServerServlet.java:1673) at com.ibm.team.repository.servlet.AbstractTeamServerServlet$1.service(AbstractTeamServerServlet.java:195) at com.ibm.team.repository.internal.service.auth.impl.JAuthHandler.handledRequest(JAuthHandler.java:123) at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356) at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56) at $Proxy477.handledRequest(Unknown Source) at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1545) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:380) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:748) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:636) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) ------------------- |
2 answers
Just from our experience (using Tomcat server) - did you specify in the <server>\server\conf\ccm, teamserver.properties file the following property? -
# Allow to use scripts deployed as process attachments com.ibm.team.workitem.process.scripts.enabled=true And the script is attached as a Link in the Process Attachments of the project area? |
Hi,
Did you ever solve this error? I have added the line to teamserver.properties and my calculated value works but my value set script pulls up this same error. Thanks, Henry |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.