You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Serge Huber <sh...@jahia.com> on 2010/10/18 15:34:06 UTC

Re: Possibly typo in NodeTypeRegistry ?

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 <sh...@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.