camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bilgin Ibryam <bibr...@gmail.com>
Subject Re: Camel CMIS - Unable to perform versioning operation on non versionable node
Date Sun, 02 Feb 2014 10:39:20 GMT
Have you searched what that error means? Might be that you have to make
that not versionable?


On 30 January 2014 17:52, hardikdesai81 <hardikdesai81@gmail.com> wrote:

> Hi All,
>
> I used the FileUploader as shown below:
>
> public class CamelCmisFileUploader extends RouteBuilder {
>
>         @Override
>         public void configure() throws Exception {
>                 from("file://C:/path/metamodel?noop=true&idempotent=false")
>                                 .process(new Processor() {
>                                         public void process(Exchange
> exchange) throws Exception {
>
> exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE,
> "application/json");
>
> exchange.getIn().getHeaders().put(PropertyIds.NAME,
> exchange.getIn().getHeader(Exchange.FILE_NAME));
>
> exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH,
> "/metamodel");
>                                         }
>                                 })
>
> .to("cmis://
> http://localhost:8080/chemistry-opencmis-server-jcr/atom/metamodel?username=admin&password=admin
> ");
>         }
>
> }
>
> Although the files are getting copied, but I am getting the following
> exception on every file:
>
> org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException:
> Unable to perform versioning operation on non versionable node: /abc.json
> at
>
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:485)
> at
>
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:629)
> at
>
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.createDocument(ObjectServiceImpl.java:119)
> at
>
> org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:751)
> at
>
> org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:95)
> at
>
> org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:469)
> at
>
> org.apache.camel.component.cmis.CMISProducer.storeDocument(CMISProducer.java:130)
> at
>
> org.apache.camel.component.cmis.CMISProducer.createNode(CMISProducer.java:69)
> at
> org.apache.camel.component.cmis.CMISProducer.process(CMISProducer.java:51)
> at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>
> When I use a different route to create a folder and then create a file
> within the folder, the folder is successfully created using the following
> code:
>
>         DefaultExchange exchange = new DefaultExchange(camelContext);
>         exchange.getIn().getHeaders().put(PropertyIds.NAME, "metamodel");
>         exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID,
> "cmis:folder");
>
> producer.send("cmis://
> http://localhost:8080/chemistry-opencmis-server-jcr/atom/metamodel?username=admin&password=admin
> ",
> exchange);
>
> But, when I try creating a file within this folder, again I get the same
> problem.
>
>                 List<String> params = new ArrayList<String>();
>                 params.add("camel-joe.file");
>                 params.add("Joe is the coolest person ever");
>                 params.add("/metamodel");
>                 Object addResultObject =
> producer.requestBody("direct:add", params);
>
> The route is defined like this:
> public class CMISAddRoute extends RouteBuilder {
>         static Logger log = Logger.getLogger(CMISAddRoute.class.getName());
>         public void configure() throws Exception {
>                 from("direct:add")
>                         .process(new CMISAddProcessor())
>
> .to("cmis://
> http://localhost:8080/chemistry-opencmis-server-jcr/atom/metamodel?username=admin&password=admin
> ")
>                         .process(new CMISAddResultProcessor());
>         }
>
> The CMISAddProcessor is like this:
> public class CMISAddProcessor implements Processor {
>         static Logger log =
> Logger.getLogger(CMISAddProcessor.class.getName());
>         @SuppressWarnings("unchecked")
>         public void process(Exchange exchange) throws Exception {
>                 List<String> params = exchange.getIn().getBody(List.class);
>                 String fileName = params.get(0);
>                 String content = params.get(1);
>                 String folderPath = params.get(2);
>                 exchange.getIn().setBody(content);
>
> exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE,
>                         "text/plain; charset=UTF-8");
>                 exchange.getIn().getHeaders().put(PropertyIds.NAME,
> fileName);
>
> exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID,
> "cmis:document");
>
> exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH,
> folderPath);
>         }
>
> The file is created, but I get the following exception:
> org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException:
> Unable to perform versioning operation on non versionable node:
> /metamodel/camel-joe.file
>         at
>
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:485)
>         at
>
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:629)
>         at
>
> org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.createDocument(ObjectServiceImpl.java:119)
>         at
>
> org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:751)
>         at
>
> org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:95)
>         at
>
> org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:469)
>         at
>
> org.apache.camel.component.cmis.CMISProducer.storeDocument(CMISProducer.java:130)
>         at
>
> org.apache.camel.component.cmis.CMISProducer.createNode(CMISProducer.java:69)
>
> Can you please help? Thanks!
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-CMIS-Unable-to-perform-versioning-operation-on-non-versionable-node-tp5746634.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Bilgin Ibryam

Apache Camel & Apache OFBiz committer
Blog: ofbizian.com
Twitter: @bibryam <https://twitter.com/bibryam>

Author of Instant Apache Camel Message Routing
http://www.amazon.com/dp/1783283475

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message