An error's generated by formatW3CDateTime in chains

It is used the formatW3CDateTime in a chain to assign a declared date to a document field:

      <operation id="Document.SetProperty">
        <param type="serializable" name="value">expr:@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(NodeVariables["enddate"])}</param>
        <param type="string" name="xpath">dc:expired</param>
        <param type="boolean" name="save">true</param>
      </operation>   

In general, it works but from time to time something starts go wrong and then the code returns the error “cannot invoke method: formatW3CDateTime”:

2017-09-06 19:02:40,461 ERROR [nuxeo-error-log] javax.servlet.ServletException: On requestURL: http://myserver/nuxeo/view_documents.faces
    at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:140)
    ...
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.servlet.ServletException: java.lang.RuntimeException: cannot invoke method: formatW3CDateTime
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    ... 40 more
Caused by: javax.faces.el.EvaluationException: java.lang.RuntimeException: cannot invoke method: formatW3CDateTime
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
    ... 64 more
Caused by: java.lang.RuntimeException: cannot invoke method: formatW3CDateTime
    at org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:88)
    at org.mvel2.optimizers.impl.refl.nodes.StaticReferenceAccessor.getValue(StaticReferenceAccessor.java:31)
    at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:78)
    at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
    at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42)
    at org.mvel2.MVEL.executeExpression(MVEL.java:930)
    at org.mvel2.templates.res.CompiledTerminalExpressionNode.eval(CompiledTerminalExpressionNode.java:39)
    at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:285)
    at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:247)
    at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:255)
    at org.mvel2.templates.TemplateRuntime.execute(TemplateRuntime.java:171)
    at org.nuxeo.ecm.automation.core.scripting.MvelTemplate.eval(MvelTemplate.java:47)
    at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.resolveObject(OperationTypeImpl.java:244)
    at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.inject(OperationTypeImpl.java:258)
    at org.nuxeo.ecm.automation.core.impl.OperationTypeImpl.newInstance(OperationTypeImpl.java:234)
    at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:161)
    at org.nuxeo.ecm.automation.core.impl.InvokableIteratorMethod.doInvoke(InvokableIteratorMethod.java:108)
    at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:177)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:130)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:133)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:133)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:133)
    at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:116)
    at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:214)
    at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:97)
    at org.nuxeo.ecm.platform.routing.core.impl.GraphNodeImpl.executeChain(GraphNodeImpl.java:514)
    at org.nuxeo.ecm.platform.routing.core.impl.GraphNodeImpl.executeTransitionChain(GraphNodeImpl.java:497)
    at org.nuxeo.ecm.platform.routing.core.impl.GraphRunner.runGraph(GraphRunner.java:293)
    at org.nuxeo.ecm.platform.routing.core.impl.GraphRunner.resume(GraphRunner.java:176)
    at org.nuxeo.ecm.platform.routing.core.impl.DocumentRouteElementImpl.resume(DocumentRouteElementImpl.java:84)
    at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingEngineServiceImpl.resume(DocumentRoutingEngineServiceImpl.java:48)
    at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl$CompleteTaskRunner.run(DocumentRoutingServiceImpl.java:361)
    at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:131)
    at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.completeTask(DocumentRoutingServiceImpl.java:328)
    at org.nuxeo.ecm.platform.routing.core.impl.DocumentRoutingServiceImpl.endTask(DocumentRoutingServiceImpl.java:858)
    at org.nuxeo.ecm.platform.routing.web.RoutingTaskActionsBean.endTask(RoutingTaskActionsBean.java:229)
    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.platform.routing.web.RoutingTaskActionsBean_$$_javassist_seam_92.endTask(RoutingTaskActionsBean_$$_javassist_seam_92.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 com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
    ... 73 more
Caused by: java.lang.NullPointerException
    at org.mvel2.DataConversion.convert(DataConversion.java:129)
    at org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.executeAndCoerce(MethodAccessor.java:164)
    at org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:73)
    ... 142 more

2017-09-06 19:02:40,463 ERROR [nuxeo-error-log] 
Request Attributes:

org.jboss.seam.core.manager : Manager([0NXMAIN2])
availablePublicationTrees : []
currentDocumentOutgoingRelations : []
dndConfigHelper : org.nuxeo.ecm.webapp.dnd.DndConfigurationHelper@2e4a21e
actionManager : org.nuxeo.ecm.platform.actions.ActionService@b190c70
notificationManager : org.nuxeo.ecm.platform.ec.notification.service.NotificationService@6a005880
relatedRoutes : [DocumentModelImpl(c882deca-3bf9-4f83-b8a4-6baf48c13107, path=/document-route-instances-root/2017/09/06/MyDocumentWorkflow.5025831116297374, title=wf.MyDocumentReview)]
org.jboss.seam.transaction.transaction : org.jboss.seam.transaction.Transaction@44cd4ae7
isInsidePersonalWorkspace : false
select2Converter : org.nuxeo.ecm.platform.ui.select2.Select2Converter@5ce164c7
org.jboss.seam.core.events : org.jboss.seam.core.Events@5635f9ad
currentDocumentVersionInfo : org.nuxeo.ecm.webapp.versioning.VersionInfo@71664527
versioningManager : org.nuxeo.ecm.platform.versioning.service.VersioningManagerImpl@2b627745
currentDocument : DocumentModelImpl(408997a3-1f58-4d82-969e-5ba4f73684e0, path=/Base/workspaces/MyWorkspace/Folder.1330098169706/Subfolder/Untitled.1504717189170, title=Title KPK/1/2220)
adminMessageActivated : false
tabsActionsList : [TAB_VIEW, TAB_FILES_EDIT, TAB_PERMISSIONS, TAB_RELATIONS, new_TAB_ROUTE_WORKFLOW, view_comments, TAB_CONTENT_HISTORY]
userManager : org.nuxeo.ecm.platform.computedgroups.UserManagerWithComputedGroups@36a3a6d2
org.jboss.seam.transaction.synchronizations : org.jboss.seam.transaction.SeSynchronizations@5f52a39e
nuxeoAliasBean : org.nuxeo.ecm.platform.ui.web.binding.alias.NuxeoAliasBean@8c223ef
themeStylingService : org.nuxeo.theme.styling.service.ThemeStylingServiceImpl@2237018
seamReload : org.nuxeo.ecm.webapp.seam.NuxeoSeamHotReloader@71435bcb
lockActions : ERROR TRYING TO GET THIS REQUEST ATTRIBUTE VALUE
relatedRouteAction : org.nuxeo.ecm.platform.routing.web.RelatedRouteActionBean@324f77b9
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@19a408b
documentRelationManager : org.nuxeo.ecm.platform.relations.services.DocumentRelationService@784b7c3d
org.jboss.seam.faces.validation : org.jboss.seam.faces.Validation@610fe580
user_message : Unexpected error
org.jboss.seam.core.conversationPropagation : org.jboss.seam.core.ConversationPropagation@a797769
messageBundle : java.util.PropertyResourceBundle@59aadfb7
deleteActions : org.nuxeo.ecm.webapp.action.DeleteActionsBean@43422b20
NuxeoExceptionHandlerMarker : true
currentWorkspace : DocumentModelImpl(8fd1b79a-14a2-404a-9672-299bf311cf34, path=/Base/workspaces/MyWorkspace, title=8fd1b79a-14a2-404a-9672-299bf311cf34)
currentDocumentIncomingRelations : []
isUserWorkspace : false
relationManager : org.nuxeo.ecm.platform.relations.services.RelationService@229376a4
com.sun.faces.context.ExternalContextFactoryImpl_KEY : com.sun.faces.context.ExternalContextImpl@604b1de1
nuxeoWebResourceDispatcher : org.nuxeo.ecm.webapp.resources.NuxeoWebResourceDispatcher@7e76c78d
associatedRenderableTemplates : []
nuxeo.disable.redirect.wrapper : true
nuxeoLayoutIdManager : org.nuxeo.ecm.platform.forms.layout.facelets.NuxeoLayoutIdManagerBean@3ff52515
org.jboss.seam.web.servletContexts : org.jboss.seam.web.ServletContexts@6dbc02e0
repositoryManager : org.nuxeo.ecm.core.api.repository.RepositoryManagerImpl@a6b5462
org.jboss.seam.web.requestContextPath : /nuxeo
nxDevModeSet : false
isNavigationBreadcrumb : true
backendPath : [org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@6c3632e5, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@2e8920da, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@2ef772fe, org.nuxeo.ecm.platform.ui.web.pathelements.DocumentPathElement@7eefeb06]

A restart of nuxeo solves temporary the problem to the next time.

0 votes

0 answers

223 views

ANSWER