You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Markus Joschko (JIRA)" <ji...@apache.org> on 2004/12/07 20:50:09 UTC

[jira] Created: (JCR-25) default value with autocreated fields like null

default value with autocreated fields like null
-----------------------------------------------

         Key: JCR-25
         URL: http://nagoya.apache.org/jira/browse/JCR-25
     Project: Jackrabbit
        Type: Wish
    Reporter: Markus Joschko
    Priority: Minor


I have a custom nodetype which has two properties, both autocreated (but not mandatory).
If I create the node and want to read the first property (not filling in any value), I get a:

javax.jcr.RepositoryException: Unable to get value of /pages/mjo:page/jcr:content/mjo:title:java.lang.ArrayIndexOutOfBoundsException: 0
 at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:378)
 at de.freaquac.test.JCRTest.propIterator(JCRTest.java:207)

After setting the property the exception is no longer thrown. Not sure if this really an error but is a little bit anyoing. Are there any default values (null) in jsr170?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (JCR-25) default value with autocreated fields like null

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ http://nagoya.apache.org/jira/browse/JCR-25?page=history ]
     
Stefan Guggisberg resolved JCR-25:
----------------------------------

    Resolution: Fixed

note that a property can not have a null value;
setting a property to null will automatically 
remove it.

auto-created properties for that reason require 
a default value.

added check in NodeTypeRegistry#validateNodeTypeDef
method.

fixed in rev111271

> default value with autocreated fields like null
> -----------------------------------------------
>
>          Key: JCR-25
>          URL: http://nagoya.apache.org/jira/browse/JCR-25
>      Project: Jackrabbit
>         Type: Wish
>     Reporter: Markus Joschko
>     Assignee: Stefan Guggisberg
>     Priority: Minor

>
> I have a custom nodetype which has two properties, both autocreated (but not mandatory).
> If I create the node and want to read the first property (not filling in any value), I get a:
> javax.jcr.RepositoryException: Unable to get value of /pages/mjo:page/jcr:content/mjo:title:java.lang.ArrayIndexOutOfBoundsException: 0
>  at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:378)
>  at de.freaquac.test.JCRTest.propIterator(JCRTest.java:207)
> After setting the property the exception is no longer thrown. Not sure if this really an error but is a little bit anyoing. Are there any default values (null) in jsr170?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (JCR-25) default value with autocreated fields like null

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ http://nagoya.apache.org/jira/browse/JCR-25?page=history ]

Stefan Guggisberg reassigned JCR-25:
------------------------------------

    Assign To: Stefan Guggisberg

> default value with autocreated fields like null
> -----------------------------------------------
>
>          Key: JCR-25
>          URL: http://nagoya.apache.org/jira/browse/JCR-25
>      Project: Jackrabbit
>         Type: Wish
>     Reporter: Markus Joschko
>     Assignee: Stefan Guggisberg
>     Priority: Minor

>
> I have a custom nodetype which has two properties, both autocreated (but not mandatory).
> If I create the node and want to read the first property (not filling in any value), I get a:
> javax.jcr.RepositoryException: Unable to get value of /pages/mjo:page/jcr:content/mjo:title:java.lang.ArrayIndexOutOfBoundsException: 0
>  at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:378)
>  at de.freaquac.test.JCRTest.propIterator(JCRTest.java:207)
> After setting the property the exception is no longer thrown. Not sure if this really an error but is a little bit anyoing. Are there any default values (null) in jsr170?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (JCR-25) default value with autocreated fields like null

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-25?page=all ]
     
Stefan Guggisberg closed JCR-25:
--------------------------------


closing resolved issue

> default value with autocreated fields like null
> -----------------------------------------------
>
>          Key: JCR-25
>          URL: http://issues.apache.org/jira/browse/JCR-25
>      Project: Jackrabbit
>         Type: Wish
>     Reporter: Markus Joschko
>     Assignee: Stefan Guggisberg
>     Priority: Minor

>
> I have a custom nodetype which has two properties, both autocreated (but not mandatory).
> If I create the node and want to read the first property (not filling in any value), I get a:
> javax.jcr.RepositoryException: Unable to get value of /pages/mjo:page/jcr:content/mjo:title:java.lang.ArrayIndexOutOfBoundsException: 0
>  at org.apache.jackrabbit.core.PropertyImpl.getValue(PropertyImpl.java:378)
>  at de.freaquac.test.JCRTest.propIterator(JCRTest.java:207)
> After setting the property the exception is no longer thrown. Not sure if this really an error but is a little bit anyoing. Are there any default values (null) in jsr170?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira