You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2009/07/07 13:19:14 UTC
[jira] Updated: (JCR-2139) Registering NodeType with defaultvalues
fails with IndexOutOfBounds
[ https://issues.apache.org/jira/browse/JCR-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-2139:
-------------------------------
Fix Version/s: 1.6.0
Merged to the 1.x branch in revision 791795.
> 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
> Fix For: 2.0-alpha3, 1.6.0
>
> Attachments: unnamed.patch
>
>
> 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.