Node type loader should not log ERROR if builtin nodetypes are re-registered
----------------------------------------------------------------------------
Key: SLING-1490
URL: https://issues.apache.org/jira/browse/SLING-1490
Project: Sling
Issue Type: Bug
Components: JCR
Affects Versions: JCR Base 2.0.6
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor
The contrib/extensions/i18n bundle, for example, registers the mix:language
mixin which was not present in JSR 170 repositories.
When working with a JSR 283 repository, that causes the following error to be
logged:
15.04.2010 12:37:18.661 *ERROR* [OsgiInstallerThread]
org.apache.sling.jcr.base.internal.loader.Loader Error loading node types SLING-
INF/nodetypes/jcrlanguage.cnd from bundle org.apache.sling.i18n:
javax.jcr.RepositoryException: {http://www.jcp.org/jcr/mix/1.0}language: can't
reregister built-in node type.
As we don't have a simple way to mark those nodetypes registrations as "JSR 170
only", for now I'll modify the NodeTypeLoader to recognize the above message
and log at the DEBUG level only when that happens.
That NodeTypeLoader class is Jackrabbit-specific anyway, and although parsing
Exception messages is ugly, the impact of a wrong parsing is just on logged
messages, so I think that's good enough for now, and will avoid having to make
the i18n bundle JSR283-specific.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira