<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with checkOut() using Apache Chemistry in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273719#M226849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad you got it working. And thanks for reporting back with the solution!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2012 16:58:14 GMT</pubDate>
    <dc:creator>jpotts</dc:creator>
    <dc:date>2012-08-07T16:58:14Z</dc:date>
    <item>
      <title>Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273710#M226840</link>
      <description>I am connecting to Alfresco 3.4.1 Enterprise using Apache Chemistry and trying to checkout a file from repository. I could get the ContentStream of object which I want to checkout but somehow it does not checkout document and create pwc. Can anyone help me to figure out what could be the issue?Piece</description>
      <pubDate>Mon, 06 Aug 2012 08:20:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273710#M226840</guid>
      <dc:creator>mandarj</dc:creator>
      <dc:date>2012-08-06T08:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273711#M226841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are there any error messages in the server log?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 15:49:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273711#M226841</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-08-06T15:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273712#M226842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not Really.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I add following catch exception, it says -&amp;nbsp; "Error: OK"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;catch(Exception exception) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("Error: " + exception.getMessage());&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 16:25:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273712#M226842</guid>
      <dc:creator>mandarj</dc:creator>
      <dc:date>2012-08-06T16:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273713#M226843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This code runs fine for me using Apache Chemistry 0.7.0 and Alfresco 3.4.1 Enterprise for both the SOAP and the AtomPub bindings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How are you retrieving your testCmisObject? Maybe you aren't getting back what you expect?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 17:30:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273713#M226843</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-08-06T17:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273714#M226844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok. Is there any way to check if the CmisObject I am getting is correct and can be checked-out?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently I'm checking this condition using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;testCmisObject.getAllowableActions().getAllowableActions().contains(org.apache.chemistry.opencmis.commons.enums.Action.CAN_CHECK_OUT)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, as I mentioned above, I could get the filename of CmisObject successfully as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;String testName = documentToBeCheckedout.getContentStream().getFileName();&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any other criteria that I can check if the CmisObject I'm getting is correct and checked-out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm retrieving CmisObject by following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;SessionFactory factory = SessionFactoryImpl.newInstance();&lt;BR /&gt;IdentityHashMap&amp;lt;String, String&amp;gt; parameter = new IdentityHashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;parameter.put(SessionParameter.USER, "ROLE_TICKET");&lt;BR /&gt;parameter.put(SessionParameter.PASSWORD, ticket);&lt;BR /&gt;parameter.put(SessionParameter.ATOMPUB_URL, url + "/s/cmis");&lt;BR /&gt;parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());&lt;BR /&gt;parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");&lt;BR /&gt;List&amp;lt;Repository&amp;gt; repositories = factory.getRepositories(parameter);&lt;BR /&gt;Session session = repositories.get(0).createSession();&lt;BR /&gt;Folder rootFolder = session.getRootFolder();&lt;BR /&gt;ItemIterable&amp;lt;CmisObject&amp;gt; rootFolderChildren = rootFolder.getChildren();&lt;BR /&gt;Iterator&amp;lt;CmisObject&amp;gt; childrenItems = rootFolderChildren.iterator();&lt;BR /&gt;while(childrenItems.hasNext()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CmisObject testCmisObject = childrenItems.next();&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;After this, I do some tests checking some conditions and if those conditions pass, then I store this CmisObject in a Hashmap and retrieve this hashmap later for check-out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will there be any other dependent libraries issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 18:22:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273714#M226844</guid>
      <dc:creator>mandarj</dc:creator>
      <dc:date>2012-08-06T18:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273715#M226845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tested your code successfully as admin and a getObject call to retrieve the object. You are using ticket-based auth and iterating over getChildren to retrieve the test object. So those are two differences between mine and yours.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just as a test, create a new document. Then, grab the ID of that document (let's say it is "workspace://SpacesStore/c3f34858-678e-49b7-b7b7-7821a76d5b54" and test your code with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CmisObject testCmisObject = getSession().getObject("workspace://SpacesStore/c3f34858-678e-49b7-b7b7-7821a76d5b54");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, if you log in to one of the web clients using the same credentials you are using for this test, are you able to checkout the doc?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 18:54:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273715#M226845</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-08-06T18:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273716#M226846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried creating a document using: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;session.getRootFolder().createDocument(properties, contentStream, VersioningState.MAJOR)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But it gets stuck at this statement "session.getRootFolder().createDocument(….)" which is same behaviour as it gets stuck at checkOut() method above. The error message just says "OK" at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;catch(Exception exception) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("Error: " + exception.getMessage());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mandar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 21:03:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273716#M226846</guid>
      <dc:creator>mandarj</dc:creator>
      <dc:date>2012-08-06T21:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273717#M226847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, that's a clue. Can you create content by logging in and using either Alfresco Explorer or Alfresco Share? Maybe you don't have the proper credentials or maybe your repository has gone into a read-only state (for example, you're on an Enterprise trial and the license has expired).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 21:50:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273717#M226847</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-08-06T21:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273718#M226848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, I figured out the issue. It was not issue regarding repository. Actually, my code was not using Sun's default connection protocol "sun.net.&lt;/SPAN&gt;&lt;A href="http://www.protocol.http.HttpURLConnection" rel="nofollow noopener noreferrer"&gt;www.protocol.http.HttpURLConnection&lt;/A&gt;&lt;SPAN&gt;". When I set this protocol, It checks-out document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mandar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 11:51:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273718#M226848</guid>
      <dc:creator>mandarj</dc:creator>
      <dc:date>2012-08-07T11:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with checkOut() using Apache Chemistry</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273719#M226849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad you got it working. And thanks for reporting back with the solution!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 16:58:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/issue-with-checkout-using-apache-chemistry/m-p/273719#M226849</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-08-07T16:58:14Z</dc:date>
    </item>
  </channel>
</rss>

