[ 
https://jira.nuxeo.com/browse/NXS-894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109036#comment-109036
 ] 

Alain Escaffre commented on NXS-894:
------------------------------------

what value was put in the EL field ? 

> Creation related event handlers doesn't work for types created by a content 
> template
> ------------------------------------------------------------------------------------
>
>                 Key: NXS-894
>                 URL: https://jira.nuxeo.com/browse/NXS-894
>             Project: Nuxeo Studio
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: Sun Tan
>
> It seems that content templates uses a SimplePrincipal and not NuxeoPrincipal
> If the "EL" field is the only activation field filled
> {code}
> 19:58:40,641 ERROR [OperationEventListener] Failed to handle event 
> aboutToCreate using chain: InitPropertiesListener
> java.lang.ClassCastException: org.nuxeo.ecm.core.api.SimplePrincipal cannot 
> be cast to org.nuxeo.ecm.core.api.NuxeoPrincipal
>       at 
> org.nuxeo.ecm.automation.core.scripting.Scripting.initBindings(Scripting.java:87)
>       at 
> org.nuxeo.ecm.automation.core.scripting.MvelExpression.eval(MvelExpression.java:38)
>       at 
> org.nuxeo.ecm.automation.core.events.EventHandler.isEnabled(EventHandler.java:254)
>       at 
> org.nuxeo.ecm.automation.core.events.EventHandlerRegistry.handleEvent(EventHandlerRegistry.java:195)
>       at 
> org.nuxeo.ecm.automation.core.events.OperationEventListener.handleEvent(OperationEventListener.java:33)
>       at 
> org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:195)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.fireEvent(AbstractSession.java:400)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:452)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:863)
>       at 
> org.nuxeo.ecm.platform.content.template.factories.SimpleTemplateBasedFactory.createContentStructure(SimpleTemplateBasedFactory.java:67)
>       at 
> org.nuxeo.ecm.platform.content.template.service.ContentTemplateServiceImpl.executeFactoryForType(ContentTemplateServiceImpl.java:179)
>       at 
> org.nuxeo.ecm.platform.content.template.listener.ContentCreationListener.handleEvent(ContentCreationListener.java:60)
>       at 
> org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:195)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.fireEvent(AbstractSession.java:400)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.notifyEvent(AbstractSession.java:452)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:896)
>       at 
> org.nuxeo.ecm.platform.content.template.factories.SimpleTemplateBasedFactory.createContentStructure(SimpleTemplateBasedFactory.java:67)
>       at 
> org.nuxeo.ecm.platform.content.template.service.ContentTemplateServiceImpl.executeFactoryForType(ContentTemplateServiceImpl.java:179)
>       at 
> org.nuxeo.ecm.platform.content.template.listener.ContentCreationListener.handleEvent(ContentCreationListener.java:60)
>       at 
> org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:195)
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
ECM-tickets@lists.nuxeo.com
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to