Custom node types file issues
Jackrabbit aggregates all declared node types into a single file called custom_nodetype.xml
.
As explained in File system, the custom_nodetypes.xml
file can exist on the filesystem or in a database.
The custom_nodetypes
file can always be regenerated by:
-
Shutting down your Magnolia instance
-
Deleting or renaming the existing file
-
Starting it up again
Troubleshooting
NoSuchNodeTypeException
: This exception means the node type was not aggregated into the file.
Check to see if it’s declared correctly.
Did you use CND format or XML format?
Check the startup log to be sure the custom_nodetype.xml
file was read without errors.
2024-05-07 07:23:56,779 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/magnolia-dam-nodetypes.cnd
2024-05-07 07:23:57,200 INFO info.magnolia.jackrabbit.ProviderImpl : Custom node types registered using /mgnl-nodetypes/tasks-nodetypes.xml
You can always try to reregister the node types manually by running the Groovy script below.
import info.magnolia.objectfactory.Components;
import info.magnolia.repository.RepositoryManager;
nodeTypeFilePath = "/mgnl-nodetypes/my-custom-nodetypes.cnd";
repositoryManager = Components.getComponent(RepositoryManager.class);
repositoryProvider = repositoryManager.getRepositoryProvider("magnolia");
repositoryProvider.registerNodeTypes(nodeTypeFilePath);
println "Custom node types registered using " + nodeTypeFilePath