chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: [ERRATUM] Fileshare repository
Date Thu, 10 Oct 2013 08:56:15 GMT
 Hi Pascal,

 The snapshot is available via Maven. Set the OpenCMIS version to 
 "1.0.0-SNAPSHOT".


 Florian



> Hi Florian,
>
> OK, I'll give it a try. But the snapshot is not yet available through
> Maven, right!?
>
> Anyway, thanks for your reply,
> Pascal
>
>
> ________________________________
>  De : Florian Müller <fmui@apache.org>
> À : Pascal Gillet <pascalgillet@ymail.com>
> Cc : dev@chemistry.apache.org
> Envoyé le : Mercredi 9 octobre 2013 15h56
> Objet : Re: [ERRATUM] Fileshare repository
>
>
> Hi Pascal,
>
> The FileShare repository code has been completely refactored for
> OpenCMIS 1.0 to support CMIS 1.1 and to take advantage of some new
> OpenCMIS server framework features.
> Try a 1.0.0-SNAPSHOT version [1].
>
>
> Florian
>
>
> [1]
> 
> https://repository.apache.org/content/repositories/snapshots/org/apache/chemistry/opencmis/chemistry-opencmis-server-fileshare/1.0.0-SNAPSHOT/
>
>
>
>> Hi Florian,
>>
>> I am using the last version 0.10.0.
>>
>> Pascal
>>
>>
>> ________________________________
>>  De : Florian Müller <fmui@apache.org>
>> À : Pascal Gillet <pascalgillet@ymail.com>
>> Cc : dev@chemistry.apache.org
>> 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 <pascalgillet@ymail.com>
>>> À : "dev@chemistry.apache.org" <dev@chemistry.apache.org>
>>> 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


Mime
View raw message