[ http://issues.apache.org/jira/browse/JCR-71?page=history ]
     
Jukka Zitting resolved JCR-71:
------------------------------

    Resolution: Fixed

Fixed in revision 157916.

Thanks for reporting the issue!

The configuration parser attempts to throw a ConfigurationException whenever 
the configuration file does not match the DTD requirements. In this case 
however the missing searchConfig element is perfectly OK, and should be handled 
accordingly.

As reported, the problem was in the WorkspaceConfig.init() method that did not 
expect the SearchConfig to be null even when the 
ConfigurationParser.parseSearchConfig() method explicitly returns null for a 
missing search configuration.

> WorkspaceConfig.init() throws NullPointerException if Search configuration is 
> missing
> -------------------------------------------------------------------------------------
>
>          Key: JCR-71
>          URL: http://issues.apache.org/jira/browse/JCR-71
>      Project: Jackrabbit
>         Type: Bug
>   Components: config
>  Environment: Jackrabbit SVN Rev. 156527
>     Reporter: Felix Meschberger
>     Assignee: Jukka Zitting

>
> When the search configuration is missing from the repository.xml 
> configuration, the WorkspaceConfig.sc field is null and consequently the 
> WorkspaceConfig.init() method throws a NullPointerException.
> This is by itself a bug, especially since missing search configuration is 
> perfectly ok resulting in Jackrabbit not building the search index (which is 
> - believe it or - what really want).
> On that matter, since the configuration file structure seems to be implied by 
> the configuration framework but the DTD is inlined into the configuration 
> file, the configuration framework should act very gracefully to missing or 
> wrong or unexpected configuration elements. Thus, for example, if the file 
> system configuration (WorkspaceConfig.fsc) would be missing, the 
> WorkspaceConfig should probably hint at this point and not throw a 
> NullPointerException without further explanations (of course throwing 
> anything at all is still better than going wild).

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to