You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2008/09/18 15:55:44 UTC

[jira] Created: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Two extensions/event tests fail, probably due to sling:folder changes
---------------------------------------------------------------------

                 Key: SLING-665
                 URL: https://issues.apache.org/jira/browse/SLING-665
             Project: Sling
          Issue Type: Bug
          Components: Event
            Reporter: Bertrand Delacretaz


mvn clean test in extensions/event says:

Tests in error: 
  testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
  testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)

Due to, for example:
javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
        at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
...
        at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
  



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-665:
------------------------------------

        Fix Version/s: Extensions Event 2.0.4
    Affects Version/s: Extensions Event 2.0.4

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>    Affects Versions: Extensions Event 2.0.4
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>             Fix For: Extensions Event 2.0.4
>
>         Attachments: SLING-665.patch
>
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632553#action_12632553 ] 

Felix Meschberger commented on SLING-665:
-----------------------------------------

> The solution is to add the sling:HierarchyNode mixin to the slingevent:Event nodetype

It would probably be better and introducing less dependencies, if the slingevent:Event node type would just extend from nt:hierarchyNode :

   [slingevent:Event] > nt:unstructured, nt:hierarchyNode
   ...

The sling:HierarchyNode merely exists to turn existing nodes into hierarchy nodes or to turn nodes of node types we cannot modify into hierarchy nodes on the fly. For node types we define ourselves, it is probably better to directly extend from nt:hierarchyNode.


> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-665:
------------------------------------

    Attachment: SLING-665.patch

Proposed patch:
  * make Event node type extend nt:hierarchyNode
  * include folder.cnd from jcr/resource module in test resources to have sling:Folder for the tests

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>         Attachments: SLING-665.patch
>
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz closed SLING-665.
-------------------------------------

    Resolution: Fixed

Of course, thanks for your suggestion!

Fixed in revision 696954

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-665:
---------------------------------------

    Assignee: Felix Meschberger

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>         Attachments: SLING-665.patch
>
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz reopened SLING-665:
---------------------------------------


Too quick, extensions/event tests still fail for me, as they require the sling:Folder type and that's apparently not
correctly registered. I probably won't have time to look at that before Tuesday.

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>         Attachments: SLING-665.patch
>
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-665.
-----------------------------------

    Resolution: Fixed

Fixed in Rev. 696965 by using the folder.cnd node type definition instead of the resource.cnd node type definition

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>    Affects Versions: Extensions Event 2.0.4
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>         Attachments: SLING-665.patch
>
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632570#action_12632570 ] 

Felix Meschberger commented on SLING-665:
-----------------------------------------

Taking over. The issue that SLING-667 split the node type definitions into three files causing the Event unit tests to not register the sling:Folder node type any more in the test repository. Will fix this.

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>         Attachments: SLING-665.patch
>
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-665) Two extensions/event tests fail, probably due to sling:folder changes

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632219#action_12632219 ] 

Bertrand Delacretaz commented on SLING-665:
-------------------------------------------

The event code tries to create a slingevent:Event node under a sling:Folder, and that doesn't work anymore due to the SLING-663 changes.

The solution is to add the sling:HierarchyNode mixin to the slingevent:Event nodetype, I tried that but the test still fails as it seems that the new resource.cnd nodetypes are not registered correctly (although they should, see AbstractRepositoryEventHandlerTest.setupRepository).

I got the tests to pass with event.cnd as shown below, duplicating the required resource.cnd entries - so the only problem left is why resource.cnd is not loaded during tests. But right now I have to run ;-)

<slingevent='http://sling.apache.org/jcr/event/1.0'>
<sling = 'http://sling.apache.org/jcr/sling/1.0'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
<mix='http://www.jcp.org/jcr/mix/1.0'>

[sling:Folder] > nt:folder
  - * (undefined) multiple
  - * (undefined)
  + * (nt:hierarchyNode) = sling:Folder version

[sling:HierarchyNode] > nt:hierarchyNode
    mixin
    
[slingevent:Event] > nt:unstructured, sling:HierarchyNode
  - slingevent:topic (string)
  - slingevent:application (string)
  - slingevent:created (date)
  - slingevent:properties (binary)
  
[slingevent:Job] > slingevent:Event, mix:lockable
  - slingevent:processor (string)
  - slingevent:id (string)
  - slingevent:finished (date)
 
[slingevent:TimedEvent] > slingevent:Event, mix:lockable
  - slingevent:processor (string)
  - slingevent:id (string)
  - slingevent:expression (string)
  - slingevent:date (date)
  - slingevent:period (long)

> Two extensions/event tests fail, probably due to sling:folder changes
> ---------------------------------------------------------------------
>
>                 Key: SLING-665
>                 URL: https://issues.apache.org/jira/browse/SLING-665
>             Project: Sling
>          Issue Type: Bug
>          Components: Event
>            Reporter: Bertrand Delacretaz
>
> mvn clean test in extensions/event says:
> Tests in error: 
>   testWriteEvent(org.apache.sling.event.impl.DistributingEventHandlerTest)
>   testWriteEventPlusAppId(org.apache.sling.event.impl.DistributingEventHandlerTest)
> Due to, for example:
> javax.jcr.nodetype.ConstraintViolationException: no definition found in parent node's node type for new node: no matching child node definition found for {}Event-4711-1221744638373: no matching child node definition found for {}Event-4711-1221744638373
>         at org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:752)
> ...
>         at org.apache.sling.event.impl.AbstractRepositoryEventHandler.writeEvent(AbstractRepositoryEventHandler.java:282)
>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.