Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2150

Create node type with boolean type and constraints causes checker exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Alpha1
    • 3.6.0.Final
    • JCR
    • None
    • Hide
      • Add a node type with a property definition as BOOLEAN, which is allowed according to https://docs.jboss.org/author/display/MODE/Defining+custom+node+types
      • Add a constraint f.e. 'true'
      • Make the property definition mandatory (I think this part is not neccesary, you can add it afterwards aswell and still get the same error in theory)
      • Now add a node with this node type and fill in the property (f.e. true boolean)
      Show
      Add a node type with a property definition as BOOLEAN, which is allowed according to https://docs.jboss.org/author/display/MODE/Defining+custom+node+types Add a constraint f.e. 'true' Make the property definition mandatory (I think this part is not neccesary, you can add it afterwards aswell and still get the same error in theory) Now add a node with this node type and fill in the property (f.e. true boolean)

    Description

      When I try to create a node type with a property definition with BOOLEAN as type, and add a constraint to it f.e. 'true', I expected I was eligible to add the node type and the constraint got accepted.
      However it did not, instead I got this exception thrown.

      java.lang.IllegalStateException: Invalid property type: 6  
        at org.modeshape.jcr.JcrPropertyDefinition.createChecker(JcrPropertyDefinition.java:485)  
        at org.modeshape.jcr.JcrPropertyDefinition.satisfiesConstraints(JcrPropertyDefinition.java:266)  
        at org.modeshape.jcr.RepositoryNodeTypeManager$NodeTypes.findPropertyDefinition(RepositoryNodeTypeManager.java:1453)  
        at org.modeshape.jcr.AbstractJcrNode.setProperty(AbstractJcrNode.java:1773)  
        at org.modeshape.jcr.AbstractJcrNode.setProperty(AbstractJcrNode.java:1460)  
        at org.modeshape.jcr.AbstractJcrNode.setProperty(AbstractJcrNode.java:108)
      

      Reproducible log and error in unit test using file system, directory gets cleaned up after every tearDown.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            bjornbal Bjorn Bal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: