jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1462) repository.xml: throw an exception on error
Date Wed, 24 Sep 2008 12:06:44 GMT

    [ https://issues.apache.org/jira/browse/JCR-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634118#action_12634118
] 

Thomas Mueller commented on JCR-1462:
-------------------------------------

> how much we are actually gaining by enabling DTD validation

DTD validation is the easiest solution to detect typos in top level elements.

Compatibility: Jackrabbit 1.5 will not work with 1.4 repository.xml files because of JCR-1472
(SecurityManager). If we want to make the repository.xml backward compatible, we should have
a look at that as well.

factory.setFeature("http://apache.org/xml/features/validation/dynamic", true) is not supported
in JDK 1.4 (JDK 1.5 is required). I guess we will anyway switch to JDK 1.5 soon, we could
wait until then.

What about only log (not throw) the exception until we can enable 'dynamic validation'? I
would just print warnings in the log file:

24.09.2008 12:17:11 *WARN * [main] ConfigurationErrorHandler: Error parsing the configuration
at line 23 using system id file:/C:/data/jackrabbit/jackrabbit-core/repository.xml: org.xml.sax.SAXParseException:
Document root element "Repository", must match DOCTYPE root "null". (ConfigurationErrorHandler.java,
line 44)
24.09.2008 12:17:11 *WARN * [main] ConfigurationErrorHandler: Error parsing the configuration
at line 23 using system id file:/C:/data/jackrabbit/jackrabbit-core/repository.xml: org.xml.sax.SAXParseException:
Document is invalid: no grammar found. (ConfigurationErrorHandler.java, line 44)


> repository.xml: throw an exception on error
> -------------------------------------------
>
>                 Key: JCR-1462
>                 URL: https://issues.apache.org/jira/browse/JCR-1462
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-core
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: configPatch.txt, JCR-1462-dynamic.patch
>
>
> Currently, unsupported parameters in repository.xml and workspace.xml are ignored.
> To find problems earlier, such problems should result in an exception,
> and starting such a repository should not be possible.
> The same should happen for unsupported values.
> For currently unavailable options
> (such as text extraction filter classes if the class is not in the classpath),
> at least a warning should be written to the error log, or an error should be thrown.

-- 
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