-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 73.12.3
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Automation
-
Environment:Target Platform: 10.1
-
Tags:
-
Browser:
Steps to reproduce:
- Create an automation chain named new.
- Associate the automation chain to a user action.
- Deploy this configuration to a Nuxeo instance.
- Navigate to a document.
- Launch the automation chain from the user action on the document.
=> Error appears:
<eval>:1157:4 Expected ident but found new var new = function(input,params) { ^ javax.servlet.ServletException: On requestURL: http://studio-ftest.rainforest.nuxeo.com/nuxeo/view_documents.faces at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:140) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:145) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.webdav.service.WIRequestFilter.doFilter(WIRequestFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:626) at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:51) at org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuthFilter.doFilter(NuxeoOAuthFilter.java:122) at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:49) at org.nuxeo.ecm.platform.oauth2.NuxeoOAuth2Filter.doFilter(NuxeoOAuth2Filter.java:79) at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:49) at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:421) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsCsrfFilter.doFilter(NuxeoCorsCsrfFilter.java:129) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:67) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:75) 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:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) 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) Caused by: javax.servlet.ServletException: org.nuxeo.ecm.core.api.NuxeoException: Failed to invoke operation javascript.test_script, Cannot compile mapper initialization script at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.nuxeo.elasticsearch.web.sync.UIThreadMarker.doFilter(UIThreadMarker.java:48) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoStandbyFilter.doFilter(NuxeoStandbyFilter.java:67) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:120) ... 43 more Caused by: javax.faces.el.EvaluationException: org.nuxeo.ecm.core.api.NuxeoException: Failed to invoke operation javascript.test_script, Cannot compile mapper initialization script at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:315) at org.nuxeo.ecm.platform.ui.web.component.holder.UIValueHolder.broadcast(UIValueHolder.java:95) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646) ... 68 more Caused by: org.nuxeo.ecm.core.api.NuxeoException: Failed to invoke operation javascript.test_script, Cannot compile mapper initialization script at org.nuxeo.automation.scripting.internals.AutomationMapper.compile(AutomationMapper.java:77) at org.nuxeo.automation.scripting.internals.AutomationScriptingServiceImpl$Bridge.<init>(AutomationScriptingServiceImpl.java:73) at org.nuxeo.automation.scripting.internals.AutomationScriptingServiceImpl.get(AutomationScriptingServiceImpl.java:65) at org.nuxeo.automation.scripting.internals.ScriptingOperationImpl.run(ScriptingOperationImpl.java:64) 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.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:170) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:175) at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:128) at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:135) at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.invoke(OperationChainCompiler.java:196) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:119) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:91) at org.nuxeo.ecm.automation.jsf.OperationActionBean.runOperation(OperationActionBean.java:94) at org.nuxeo.ecm.automation.jsf.OperationActionBean.doOperation(OperationActionBean.java:69) 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.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.nuxeo.ecm.platform.ui.web.util.NuxeoExceptionInterceptor.aroundInvoke(NuxeoExceptionInterceptor.java:80) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.nuxeo.ecm.automation.jsf.OperationActionBean_$$_javassist_seam_84.doOperation(OperationActionBean_$$_javassist_seam_84.java) 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.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280) at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65) at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at org.nuxeo.ecm.platform.ui.web.binding.MetaMethodExpression.invoke(MetaMethodExpression.java:140) at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) ... 77 more Caused by: javax.script.ScriptException: <eval>:1157:4 Expected ident but found new var new = function(input,params) { ^ in <eval> at line number 1157 at column number 4 at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470) at jdk.nashorn.api.scripting.NashornScriptEngine.asCompiledScript(NashornScriptEngine.java:496) at jdk.nashorn.api.scripting.NashornScriptEngine.compile(NashornScriptEngine.java:182) at org.nuxeo.automation.scripting.internals.AutomationMapper$ScriptBuilder.build(AutomationMapper.java:255) at org.nuxeo.automation.scripting.internals.AutomationMapper.compile(AutomationMapper.java:75) ... 124 more Caused by: jdk.nashorn.internal.runtime.ParserException: <eval>:1157:4 Expected ident but found new var new = function(input,params) { ^ at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:294) at jdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:279) at jdk.nashorn.internal.parser.AbstractParser.expectValue(AbstractParser.java:363) at jdk.nashorn.internal.parser.AbstractParser.getIdent(AbstractParser.java:431) at jdk.nashorn.internal.parser.Parser.variableStatement(Parser.java:1075) at jdk.nashorn.internal.parser.Parser.statement(Parser.java:884) at jdk.nashorn.internal.parser.Parser.sourceElements(Parser.java:773) at jdk.nashorn.internal.parser.Parser.program(Parser.java:709) at jdk.nashorn.internal.parser.Parser.parse(Parser.java:283) at jdk.nashorn.internal.parser.Parser.parse(Parser.java:249) at jdk.nashorn.internal.runtime.Context.compile(Context.java:1284) at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:651) at jdk.nashorn.api.scripting.NashornScriptEngine.asCompiledScript(NashornScriptEngine.java:493) ... 127 more
Context Request Attributes: org.jboss.seam.core.manager : Manager([0NXMAIN2]) availablePublicationTrees : [] currentDocumentOutgoingRelations : [] dndConfigHelper : org.nuxeo.ecm.webapp.dnd.DndConfigurationHelper@1c504566 exception_message : <eval>:1157:4 Expected ident but found new var new = function(input,params) { ^ actionManager : org.nuxeo.ecm.platform.actions.ActionService@20db8d5f notificationManager : org.nuxeo.ecm.platform.ec.notification.service.NotificationService@1d864130 relatedRoutes : [] org.jboss.seam.transaction.transaction : org.jboss.seam.transaction.Transaction@3c7c3fd2 isInsidePersonalWorkspace : false select2Converter : org.nuxeo.ecm.platform.ui.select2.Select2Converter@31ed0e23 org.jboss.seam.core.events : org.jboss.seam.core.Events@4c09af9e currentDocumentVersionInfo : org.nuxeo.ecm.webapp.versioning.VersionInfo@526cb80c versioningManager : org.nuxeo.ecm.platform.versioning.service.VersioningManagerImpl@113cbe22 currentDocument : DocumentModelImpl(153771b6-5fd4-43cf-9d4d-e9fa9a4123af, path=/domain-1/workspaces/workspace-1/folder-1/rainforest-contract-1, title=Rainforest Contract) adminMessageActivated : false tabsActionsList : [TAB_VIEW, TAB_EDIT, TAB_FILES_EDIT, TAB_PERMISSIONS, TAB_PUBLISH, TAB_RELATIONS, view_comments, TAB_CONTENT_HISTORY, TAB_MANAGE] org.jboss.seam.transaction.synchronizations : org.jboss.seam.transaction.SeSynchronizations@f338f3c nuxeoAliasBean : org.nuxeo.ecm.platform.ui.web.binding.alias.NuxeoAliasBean@56f604ef themeStylingService : org.nuxeo.theme.styling.service.ThemeStylingServiceImpl@7fc0ca34 seamReload : org.nuxeo.ecm.webapp.seam.NuxeoSeamHotReloader@570224f0 lockActions : ERROR TRYING TO GET THIS REQUEST ATTRIBUTE VALUE relatedRouteAction : org.nuxeo.ecm.platform.routing.web.RelatedRouteActionBean@60194ac4 org.jboss.seam.web.requestServletPath : /view_documents.faces currentServerLocation : org.nuxeo.ecm.platform.util.RepositoryLocation@5c13d641 documentThreadedComments : [] securityError : false configurationService : org.nuxeo.runtime.services.config.ConfigurationServiceImpl@2c56f0e currentDocumentAsBlobHolder : org.nuxeo.ecm.core.api.blobholder.DocumentBlobHolder@73c06394 documentRelationManager : org.nuxeo.ecm.platform.relations.services.DocumentRelationService@15f7d07f org.jboss.seam.faces.validation : org.jboss.seam.faces.Validation@53145395 currentDomain : DocumentModelImpl(5cde56e1-fb91-4966-a11a-adaf599c7cef, path=/domain-1, title=Domain-1) user_message : An unexpected error occurred. Click on the following links to get more information or go back to the application. operationActionBean : org.nuxeo.ecm.automation.jsf.OperationActionBean@9dd7c30 org.jboss.seam.core.conversationPropagation : org.jboss.seam.core.ConversationPropagation@2202315c messageBundle : java.util.PropertyResourceBundle@61bb6228 deleteActions : org.nuxeo.ecm.webapp.action.DeleteActionsBean@53fb4672 blobHolderGenerator : org.nuxeo.ecm.webapp.filemanager.BlobHolderGenerator@219a7bf0 NuxeoExceptionHandlerMarker : true currentWorkspace : DocumentModelImpl(4447ea70-1aa9-4c56-a2f9-1d9a83c36c0b, path=/domain-1/workspaces/workspace-1, title=Workspace-1) currentDocumentIncomingRelations : [] isUserWorkspace : false relationManager : org.nuxeo.ecm.platform.relations.services.RelationService@42975cd8 com.sun.faces.context.ExternalContextFactoryImpl_KEY : com.sun.faces.context.ExternalContextImpl@43c4af0f nuxeoWebResourceDispatcher : org.nuxeo.ecm.webapp.resources.NuxeoWebResourceDispatcher@707feefa nuxeo.disable.redirect.wrapper : true nuxeoLayoutIdManager : org.nuxeo.ecm.platform.forms.layout.facelets.NuxeoLayoutIdManagerBean@793eee51 org.jboss.seam.web.servletContexts : org.jboss.seam.web.ServletContexts@b095f7d repositoryManager : org.nuxeo.ecm.core.api.repository.RepositoryManagerImpl@3d838132 org.jboss.seam.web.requestContextPath : /nuxeo nxDevModeSet : true isNavigationBreadcrumb : true backendPath : [org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@6d5335c4, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@62541eaa, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@6c9628d7, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@2d25608f, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@59ac8dfa]
AC
- When creating a chain, Studio prevents the creation if I am using a reserved work (like new) as the ID and displays a message
[keyword] is a reserved JavaScript keyword. Please use a different name.
- For an existing chain having a reserved word as its name, Studio displays a validation error saying:
[keyword] is a reserved JavaScript keyword. We recommend renaming this feature to prevent errors at runtime.