Hi Florian, I am using the last version 0.10.0.
Pascal ________________________________ De : Florian Müller <[email protected]> À : Pascal Gillet <[email protected]> Cc : [email protected] Envoyé le : Mercredi 9 octobre 2013 13h43 Objet : Re: [ERRATUM] Fileshare repository Hi Pascal, Which OpenCMIS version you are using? Florian > ERRATUM - without misspellings > > > ________________________________ > De : Pascal Gillet <[email protected]> > À : "[email protected]" <[email protected]> > Envoyé le : Mercredi 9 octobre 2013 11h24 > Objet : Fileshare repository > > > Hi everyone, > > I struggle to create CMIS objects using the client API (not the > bindings API) with the FileShare server. > I thought CMIS FileShare should have worked out of the box without > any complex configuration, but it does not seem to be the case. > > I managed to deploy the FileShare server into Tomcat: > > 1 [localhost-startStop-1] INFO > org.apache.chemistry.opencmis.fileshare.FileShareServiceFactory – > Added login 'test'. > 3 [localhost-startStop-1] INFO > org.apache.chemistry.opencmis.fileshare.FileShareServiceFactory – > Added login 'cmisuser'. > 4 [localhost-startStop-1] INFO > org.apache.chemistry.opencmis.fileshare.FileShareServiceFactory – > Added login 'reader'. > 69 [localhost-startStop-1] INFO > org.apache.chemistry.opencmis.fileshare.FileShareServiceFactory – > Added repository 'test': /home/pgillet/test > 1002 [localhost-startStop-1] INFO > org.apache.chemistry.opencmis.fileshare.TypeManager – Added type > 'myTestDocumentType'. > 1003 [localhost-startStop-1] INFO > > org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener > – Initialized Services Factory: > org.apache.chemistry.opencmis.fileshare.FileShareServiceFactory > > I configured my repository.properties file to use the type > definitions in the example-type.xml file (this file is originally > embedded in the WAR archive). I do not even know if it is useful or > not. > > Then, I try to run the following test: > > public static void main(String[] args) { > // default factory implementation > SessionFactory factory = SessionFactoryImpl.newInstance(); > Map<String, String> params = new HashMap<String, String>(); > > // user credentials > params.put(SessionParameter.USER, "test"); > params.put(SessionParameter.PASSWORD, "test"); > > // connection settings > params.put(SessionParameter.ATOMPUB_URL, > "http://localhost:8080/glue-content/atom"); > params.put(SessionParameter.BINDING_TYPE, > BindingType.ATOMPUB.value()); > // params.put(SessionParameter.REPOSITORY_ID, "test"); > > // create session > List<Repository> repositories = factory.getRepositories(params); > for (Repository r : repositories) { > System.out.println("Found repository: " + r.getName()); > } > Repository repository = repositories.get(0); > Session session = repository.createSession(); > System.out.println("Got a connection to repository: " > + repository.getName() + ", with id: " > + repository.getId()); > > // Access to root folder > Folder root = session.getRootFolder(); // line 65: Here is the > problem ! > ... > > > > Everything works fine until the last instruction. I have the > following output: > > 11:17:02.583 [main] DEBUG o.a.c.o.c.b.s.atompub.CmisAtomPubSpi - > Initializing AtomPub SPI... > 11:17:05.474 [main] DEBUG o.a.c.o.c.b.s.h.DefaultHttpInvoker - GET > http://localhost:8080/glue-content/atom > Found repository: test > 11:17:08.153 [main] DEBUG o.a.c.o.c.b.s.atompub.CmisAtomPubSpi - > Initializing AtomPub SPI... > 11:17:08.154 [main] DEBUG o.a.c.o.c.b.s.h.DefaultHttpInvoker - GET > http://localhost:8080/glue-content/atom?repositoryId=test > Got a connection to repository: test, with id: test > 11:17:08.419 [main] DEBUG o.a.c.o.c.b.s.h.DefaultHttpInvoker - GET > > http://localhost:8080/glue-content/atom/test/id?id=%40root%40&filter=&includeAllowableActions=true&includeACL=false&includePolicyIds=false&includeRelationships=none&renditionFilter=cmis%3Anone > 11:17:08.637 [main] DEBUG o.a.c.o.c.b.s.h.DefaultHttpInvoker - GET > http://localhost:8080/glue-content/atom/test/type?id=cmis%3Afolder > Exception in thread "main" java.lang.IllegalArgumentException: Object > type must have property definitions! > at > > org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.initialize(AbstractCmisObject.java:95) > at > > org.apache.chemistry.opencmis.client.runtime.FolderImpl.<init>(FolderImpl.java:68) > at > > org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertObject(ObjectFactoryImpl.java:572) > at > > org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:414) > at > > org.apache.chemistry.opencmis.client.runtime.SessionImpl.getRootFolder(SessionImpl.java:489) > at > > org.apache.chemistry.opencmis.client.runtime.SessionImpl.getRootFolder(SessionImpl.java:483) > at com.glue.feed.ContentTest.main(ContentTest.java:65) > > > I guess that I am missing some configuration step somewhere! I tried > to google the error message, but it seems that no one is experiencing > the problem. > Thank you very much for you help, > Pascal GILLET
