I am using 5.0.d, so do not know if this helps…I see a slight difference in my code. It works. I remember getting the same error. Now I could not say how it is gone. Sorry.It looks like the combination of these - 1. the URL, 2. the opencmis libraries (versions) and 3. the SessionParameters used on the SessionFactory - matters a lot. They are very sensitive.Here is the code (that works for me)
Map properties = new HashMap();
properties.put(SessionParameter.USER, user);
properties.put(SessionParameter.PASSWORD, password);
properties.put(SessionParameter.ATOMPUB_URL, "http://{host}:{port}/alfresco/api/-default-/public/cmis/versions/1.1/atom");
properties.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
SessionFactory factory = SessionFactoryImpl.newInstance();
List<Repository> repositories = factory.getRepositories(properties);
Respository cmisRepository = repositories.get(0);
properties.put(SessionParameter.REPOSITORY_ID, cmisRepository.getId());
cmisSession = factory.createSession(properties);
….
I use opencmis libraries<dependency> <groupId>org.apache.chemistry.opencmis</groupId> <artifactId>chemistry-opencmis-client-api</artifactId> <version>0.13.0</version></dependency><dependency> <groupId>org.apache.chemistry.opencmis</groupId> <artifactId>chemistry-opencmis-client-impl</artifactId> <version>0.13.0</version></dependency>Please post the answer when you figure out the exact issue or any more details…
Gnanasekaran Sakthivel