jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Huber <shub...@jahia.com>
Subject Re: Possibly typo in NodeTypeRegistry ?
Date Mon, 18 Oct 2010 13:36:10 GMT
Any feedback on this ? Does this fix look ok ? Should I create a JIRA ? (I
have a patch for this just in case that I could attach to a ticket, but I
just want to validate the correction first).

Best regards,
  Serge Huber.

On Thu, Oct 14, 2010 at 3:32 PM, Serge Huber <shuber2@jahia.com> wrote:

>
> Hello,
>
> I am no expert in Jackrabbit source code (yet), so this might be wrong :)
>
> I am currently building the trunk and I was wondering if there was a
> possible typo in :
> jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
>
>    private static final String CUSTOM_NODETYPES_RESOURCE_NAME =
>            "nodetypes/custom_nodetypes.xml";
>
> Isn't there a "/" missing at the beginning ? I was getting the following
> error when starting with a DbFileSystem :
>
> Caused by: org.apache.jackrabbit.core.fs.FileSystemException: not an
> absolute path: nodetypes/custom_nodetypes.xml
>        at
> org.apache.jackrabbit.core.fs.FileSystemPathUtil.checkFormat(FileSystemPathUtil.java:178)
>        at
> org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.exists(DatabaseFileSystem.java:347)
>        at
> org.apache.jackrabbit.core.fs.FileSystemResource.exists(FileSystemResource.java:142)
>        at
> org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegistry.java:696)
>
> It seems to startup ok with the "/" added.
>
> I wasn't sure if we shouldn't put again the BasedFileSystem instance
> around, like it is done in the constructor of the NamespaceRegistryImpl.
> Because in 2.1.1 we had the following code :
>
>            nsReg = createNamespaceRegistry(new BasedFileSystem(repStore,
> "/namespaces"));
>            ntReg = createNodeTypeRegistry(nsReg, new
> BasedFileSystem(repStore, "/nodetypes"));
>
>
> Best regards,
>   Serge Huber.

Mime
View raw message