AnsweredAssumed Answered

Copy Document API issue

Question asked by rahulalfresco on Feb 13, 2015
Hi,

I am using api to copy document
cmisDocument.copy(targetFolder, documentProperties, VersioningState.MAJOR, null, null, null, null);

I am getting below error.. can anyone help me in this

org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access http://localhost:8080/alfresco/cmisatom/43f0961b-63a3-400d-a459-2c290edf03ae/children?id=workspace%3A%2F%2FSpacesStore%2Ff67b423f-77b7-4834-98ea-c3bd64a733d6&versioningState=major: Software caused connection abort: recv failed
   at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invoke(DefaultHttpInvoker.java:224)
   at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invokePOST(DefaultHttpInvoker.java:63)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:625)
   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.DocumentImpl.copyViaClient(DocumentImpl.java:207)
   at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.copy(DocumentImpl.java:155)
   at com.se.services.ObjectUtils.copyDocument(ObjectUtils.java:1551)
   at com.se.services.ObjectUtils.copyChildren(ObjectUtils.java:1602)
   at com.se.services.ObjectUtils.copyFolder(ObjectUtils.java:1585)
   at com.se.services.ObjectUtils.copyChildren(ObjectUtils.java:1604)
   at com.se.services.ObjectUtils.copyFolder(ObjectUtils.java:1585)
   at com.se.services.ObjectService.copyItems(ObjectService.java:890)
   at com.se.controller.ItemController.createMyProject(ItemController.java:153)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
   at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
   at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
   at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)
   at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
   at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:384)
   at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:342)
   at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
   at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
   at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
   at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
   at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
   at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
   at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
   at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
   at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
   at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
   at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
   at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
   at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
   at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at com.se.filters.AuthFilter.doFilter(SPIMAuthFilter.java:77)
   at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
   at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2442)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2431)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(SocketInputStream.java:152)
   at java.net.SocketInputStream.read(SocketInputStream.java:122)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
   at org.apache.chemistry.opencmis.client.bindings.spi.http.DefaultHttpInvoker.invoke(DefaultHttpInvoker.java:204)
   … 64 more

Outcomes