chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Streit <mcs...@gmail.com>
Subject question about SessionParameter.REPOSITORY_ID
Date Fri, 24 Aug 2012 20:18:48 GMT
Hello

Pardon what may be a question asked already or my likely misunderstanding:

We are using OpenCMIS libraries (Java) to communicate with both an Alfresco
4 and Sharepoint 2010 instance quite successfully.  In the case of AF4,
there is only ONE repository set up.  On Sharepoint, there are 4
repositories.

When initializing a Session, we have been initially setting the Map of
parameters that include (among others), the following:

         parameters.put(SessionParameter.USER, cmisUserName);
         parameters.put(SessionParameter.PASSWORD, cmisPassword);
         parameters.put(SessionParameter.REPOSITORY_ID, cmisRepositoryId);

The *values *on these keys are variables we have set up in some properties
file for testing right now.

On  the page here:

http://chemistry.apache.org/java/examples/example-create-session.html

There is a mention that the parameter *SessionParameter.REPOSITORY_ID* did
not have to be set when connecting to an ECM server that has more than one
repository and hence multiple GUIDs , one for each one that is available.

However, when I try to leave that parameter out and get the Session, I end
up with this exception:

java.lang.IllegalStateException: Repository Id is not set!
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.connect(SessionImpl.java:678)
at
org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession(SessionFactoryImpl.java:90)
at
org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession(SessionFactoryImpl.java:64)


If I use the Chemistry workbench using the AtomPub URL, or WSDL binding, It
connects and gives the list of repositories and in that case, we are not
setting any ID.

In my code where we are creating the Session, but without setting this ID
value, we get the exception above.

*This is 0.8.0 SNAPSHOT - built from source.   Java JDK 6.*

Any insight would be appreciated.

-- 
Mark *
*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message