Hi Tarek,
We use Jackrabbit 2.6.4 and connect to the repository through WebDAV.
We register our custom node types with following code (where "workspace" is
an instance of javax.jcr.Workspace):
NodeTypeManager nodeTypeManager = workspace.getNodeTypeManager(); if
(!nodeTypeManager.hasNodeType("our:customType")) { InputStream stream =
OurEJBBean.class.getResourceAsStream("/path/to/custom/types.cnd");
CndImporter.registerNodeTypes(new
InputStreamReader(stream), workspace.getSession()); }
and it works for some time now.
Hope it helps,
Jarek
On Tue, Jul 29, 2014 at 5:53 PM, Tarek Jarraya <[email protected]>
wrote:
> Hi All,
>
> We use Jackrabbit 2.8 and the repository is running in standalone. But we
> didn't be able to load of a CND file via rmi protocol.
>
> Our code:
>
> Repository repository =
>
> JcrUtils.*getRepository*("rmi://localhost:1099/jackrabbit.repository");
>
> session = repository.login(*new* SimpleCredentials("admin", "admin"
> .toCharArray()));
>
> CndImporter.*registerNodeTypes*(*new* FileReader(
> "C:/path/to/custom/node.cnd"), session);
>
> With above code we are getting the following error message:
>
>
> org.apache.jackrabbit.commons.cnd.ParseException:
> javax.jcr.UnsupportedRepositoryOperationException: TODO: JCRRMI-26 (cnd
> input stream, line 5)
>
> In my understanding the operation is not supported for our context.
>
> Is it possible to do it with another protocol?
> Is it possible to do it without java code, only by configuration, and the
> file will be loaded when the repository starts ?
>
> Thanks in advance for your help,
>
> Tarek
>