<?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 Upload document using cmis is not working in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3482#M1362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to upload a document using below code and it is giving runtime exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private static void &lt;STRONG&gt;createDocument&lt;/STRONG&gt;(Folder target, String newDocName) {&lt;BR /&gt; Map&amp;lt;String, String&amp;gt; props = new HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt; props.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");&lt;BR /&gt; props.put(PropertyIds.NAME, newDocName);&lt;BR /&gt; System.out.println("This is a test document: " + newDocName);&lt;BR /&gt; String content = "aegif Mind Share Leader Generating New Paradigms by aegif corporation.";&lt;BR /&gt; byte[] buf = null;&lt;BR /&gt; try {&lt;BR /&gt; buf = content.getBytes("UTF-8");&lt;BR /&gt; } catch (UnsupportedEncodingException e) {&lt;BR /&gt; e.printStackTrace();&lt;BR /&gt; }&lt;BR /&gt; ByteArrayInputStream input = new ByteArrayInputStream(buf);&lt;BR /&gt; ContentStream contentStream = session.getObjectFactory()&lt;BR /&gt; .createContentStream(newDocName, buf.length,&lt;BR /&gt; "text/plain; charset=UTF-8", input);&lt;BR /&gt; target.createDocument(props, contentStream, VersioningState.MAJOR);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below Exeption is coming:-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error&lt;BR /&gt; at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:487)&lt;BR /&gt; at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:629)&lt;BR /&gt; at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.createFolder(ObjectServiceImpl.java:158)&lt;BR /&gt; at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createFolder(SessionImpl.java:814)&lt;BR /&gt; at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createFolder(FolderImpl.java:136)&lt;BR /&gt; at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createFolder(FolderImpl.java:479)&lt;BR /&gt; at com.gl.main.SampleClient.&lt;STRONG&gt;createDocument&lt;/STRONG&gt;(SampleClient.java:137)&lt;BR /&gt; at com.gl.main.SampleClient.main(SampleClient.java:38)&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I any thing is not correct or any thing is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2017 09:56:42 GMT</pubDate>
    <dc:creator>fouada</dc:creator>
    <dc:date>2017-01-18T09:56:42Z</dc:date>
    <item>
      <title>Upload document using cmis is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3482#M1362</link>
      <description>Hi All,I am trying to upload a document using below code and it is giving runtime exception.private static void createDocument(Folder target, String newDocName) { Map&amp;lt;String, String&amp;gt; props = new HashMap&amp;lt;String, String&amp;gt;(); props.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); props.put(</description>
      <pubDate>Wed, 18 Jan 2017 09:56:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3482#M1362</guid>
      <dc:creator>fouada</dc:creator>
      <dc:date>2017-01-18T09:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Upload document using cmis is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3483#M1363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you provide all of your catalina.out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 11:07:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3483#M1363</guid>
      <dc:creator>mrks_js1</dc:creator>
      <dc:date>2017-01-19T11:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Upload document using cmis is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3484#M1364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you Markus It was a silly mistake by seeing log I have seen license was expired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 06:10:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3484#M1364</guid>
      <dc:creator>fouada</dc:creator>
      <dc:date>2017-01-20T06:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Upload document using cmis is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3485#M1365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wrong:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Map&amp;lt;String, String&amp;gt; props = new HashMap&amp;lt;String, String&amp;gt;();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;correct:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Map&amp;lt;String, Object&amp;gt; props = new HashMap&amp;lt;String, Object&amp;gt;();&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jan 2017 06:54:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-document-using-cmis-is-not-working/m-p/3485#M1365</guid>
      <dc:creator>progaman</dc:creator>
      <dc:date>2017-01-20T06:54:45Z</dc:date>
    </item>
  </channel>
</rss>

