jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Huber <shub...@jahia.com>
Subject Possibly typo in NodeTypeRegistry ?
Date Thu, 14 Oct 2010 13:32:35 GMT

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