jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "christian (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-2139) Registering NodeType with defaultvalues fails with IndexOutOfBounds
Date Thu, 11 Jun 2009 10:13:12 GMT
Registering NodeType with defaultvalues fails with IndexOutOfBounds
-------------------------------------------------------------------

                 Key: JCR-2139
                 URL: https://issues.apache.org/jira/browse/JCR-2139
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 2.0-alpha1
            Reporter: christian


When trying to register more than one nodetpye with default values I get the following exception:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.toNodeTypeDef(NodeTypeManagerImpl.java:790)
	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:560)

I assume there is an index missmatch in the implementation

                Value[] values = pdefs[i].getDefaultValues();
                if (values != null) {
                    InternalValue[] qvalues = new InternalValue[values.length];
                    for (int j = 0; j < values.length; j++) {
                        try {
-->                            qvalues[j] = InternalValue.create(values[i], session);
                        } catch (ValueFormatException e) {
                            throw new InvalidNodeTypeDefinitionException(
                                    "Invalid default value format", e);
                        }
                    }
                    qpdef.setDefaultValues(qvalues);
                }


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


Mime
View raw message