<?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 CMIS 1.1 Java API call shows BadRequest error after upgrade to Alfresco 6.2 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141092#M37637</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I developed an interface to Alfresco Community Edition using CMIS 1.1 API which worked fine.&lt;/P&gt;&lt;P&gt;Recently our company upgraded the Alfresco Server to version 6.2 (not sure from which version) and now any call on the org.apache.chemistry.opencmis.client.api.Session object throws this error: &lt;STRONG&gt;org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Bad request&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I discussed with our Alfresco administrator and there is no error in alfresco.log when this event happens.&lt;/P&gt;&lt;P&gt;My code is something like:&lt;/P&gt;&lt;P&gt;SessionFactory sessionFactory = SessionFactoryImpl.newInstance();&lt;BR /&gt;Map&amp;lt;String, String&amp;gt; parameters = new HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;parameters.put(SessionParameter.USER, "&amp;lt;user&amp;gt;");&lt;BR /&gt;parameters.put(SessionParameter.PASSWORD, "&amp;lt;pwd&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Connection settings.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.ATOMPUB_URL, "https://&amp;lt;ALFRESCO HOST&amp;gt;/alfresco/api/-default-/public/cmis/versions/1.1/atom");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.AUTH_HTTP_BASIC, "true");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.COOKIES, "true");&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Create session.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// Alfresco only provides one repository.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Repository repository = sessionFactory.getRepositories(parameters).get(0);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Session session = repository.createSession();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Folder root = session.getRootFolder();&amp;nbsp; // throws ....CmisInvalidArgumentException: Bad request&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The session object seems to be created, but I get the error mentioned above whichever call I try to execute on the session object (i.e. list or upload).&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jun 2021 09:56:18 GMT</pubDate>
    <dc:creator>the-farmer</dc:creator>
    <dc:date>2021-06-28T09:56:18Z</dc:date>
    <item>
      <title>CMIS 1.1 Java API call shows BadRequest error after upgrade to Alfresco 6.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141092#M37637</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I developed an interface to Alfresco Community Edition using CMIS 1.1 API which worked fine.&lt;/P&gt;&lt;P&gt;Recently our company upgraded the Alfresco Server to version 6.2 (not sure from which version) and now any call on the org.apache.chemistry.opencmis.client.api.Session object throws this error: &lt;STRONG&gt;org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Bad request&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I discussed with our Alfresco administrator and there is no error in alfresco.log when this event happens.&lt;/P&gt;&lt;P&gt;My code is something like:&lt;/P&gt;&lt;P&gt;SessionFactory sessionFactory = SessionFactoryImpl.newInstance();&lt;BR /&gt;Map&amp;lt;String, String&amp;gt; parameters = new HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;parameters.put(SessionParameter.USER, "&amp;lt;user&amp;gt;");&lt;BR /&gt;parameters.put(SessionParameter.PASSWORD, "&amp;lt;pwd&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Connection settings.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.ATOMPUB_URL, "https://&amp;lt;ALFRESCO HOST&amp;gt;/alfresco/api/-default-/public/cmis/versions/1.1/atom");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.AUTH_HTTP_BASIC, "true");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;parameters.put(SessionParameter.COOKIES, "true");&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Create session.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// Alfresco only provides one repository.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Repository repository = sessionFactory.getRepositories(parameters).get(0);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Session session = repository.createSession();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Folder root = session.getRootFolder();&amp;nbsp; // throws ....CmisInvalidArgumentException: Bad request&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The session object seems to be created, but I get the error mentioned above whichever call I try to execute on the session object (i.e. list or upload).&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 09:56:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141092#M37637</guid>
      <dc:creator>the-farmer</dc:creator>
      <dc:date>2021-06-28T09:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS 1.1 Java API call shows BadRequest error after upgrade to Alfresco 6.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141093#M37638</link>
      <description>&lt;P&gt;Your code works fine for me running 6.2.2 Enterprise Edition via the Alfresco SDK.&lt;/P&gt;
&lt;P&gt;If you are going through a proxy, check the CMIS URL Settings in your alfresco-global.properties file. You might need to override your opencmis.server.value if you are going through a proxy.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-family: Menlo, Monaco, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;### CMIS URL Settings ###&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opencmis.context.override=false&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opencmis.context.value=&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opencmis.servletpath.override=false&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opencmis.servletpath.value=&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opencmis.server.override=true&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;opencmis.server.value=&lt;A href="https://alfresco.somehost.com:443" target="_blank" rel="nofollow noopener noreferrer"&gt;https://alfresco.somehost.com:443&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Jul 2021 16:46:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141093#M37638</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2021-07-06T16:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: CMIS 1.1 Java API call shows BadRequest error after upgrade to Alfresco 6.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141094#M37639</link>
      <description>&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;We don't use a proxy.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 07:43:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmis-1-1-java-api-call-shows-badrequest-error-after-upgrade-to/m-p/141094#M37639</guid>
      <dc:creator>the-farmer</dc:creator>
      <dc:date>2021-07-20T07:43:24Z</dc:date>
    </item>
  </channel>
</rss>

