Hi all,Let me first apologise if I ask a question that has already been raised and answered here, I am a newbie on Alfresco and JCR, searched this forum but didn't find the answer to my question/problem.I have written an Action that gets triggered when content arives in a published folder.This action needs to export this content, including children, to a remote JackRabbit repository.To accomplish this I first followed the tutorial on the wiki and changed the parts I needed to change.I am able to retrieve the javax.jcr.Node that the NodeRef refers to, also I can export this node to a byte array, as well as openening a connection to the remote JCR.private void publishNode(Session localSession, Session remoteSession, String path, Node node) {
try {
String nodePath = node.getPath();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
localSession.exportSystemView(nodePath, outputStream, false, false);
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
remoteSession.importXML("/epoline/website/content", inputStream,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);
} catch (RepositoryException e) {
reportError("Generic repository exception", e, null);
} catch (IOException e) {
reportError("Export from local or import to remote repository failed.", e, null);
}
}But when I call the import method on the remote Session, I get the following stack:javax.jcr.nodetype.NoSuchNodeTypeException: {http://www.alfresco.org/model/content/1.0}content
at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:122)
at org.apache.jackrabbit.rmi.server.ServerSession.importXML(ServerSession.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.apache.jackrabbit.rmi.server.ServerSession_Stub.importXML(Unknown Source)
at org.apache.jackrabbit.rmi.client.ClientSession.importXML(ClientSession.java:260)
at org.epo.cms.alfresco.executer.PublishActionExecuter.publishNode(PublishActionExecuter.java:169)
at org.epo.cms.alfresco.executer.PublishActionExecuter.executeImpl(PublishActionExecuter.java:78)Can someone please explain what is going wrong here?Thanks in advance.Marcel.