Re: CMIS and Lucene
I finished the integration test implementation using the latest OpenCMIS InMemory Repository and it works fine in Apache ManifoldCF. When does this new fix for the InMemory Repository will be available as artifact in the public Maven repository? Thank you. Piergiorgio 2011/8/4 Piergiorgio Lucidi > Hi Jens, > > 2011/8/4 Jens Hübel > >> Hi Piergiorgio, >> >> you are right. I could reproduce the problem. There is a bug in the query >> implementation of the InMemory server if you query for predefined properties >> like cmis:name, cmis:createdBy, etc. :-( >> >> I have fixed this, so hopefully this works for you now if you take the >> latest build. I have created CMIS-413 for this ( >> https://issues.apache.org/jira/browse/CMIS-414). Please reopen if you >> still have issues. >> > > Great! Thank you very much for fixing this issue, I'll let you know soon if > it works for my integration test for ManifoldCF :) > > >> >> One more note: Your test code is quite fragile if you use a fixed name for >> your test document/folder. This implementation does not allow multiple >> objects with the same name in one folder. This means unless you restart the >> server your code will work only once. I recommend you using a random UUID as >> name or something like that. In the default configuration the InMemory >> creates a tree of document and folders by default. So it might not be >> necessary to create objects at all (use the Workbench to take a look at >> that). If you really need this reproducible behavior there is an option to >> run the server using the local binding in the same Java VM. Then you can >> restart the server with each test. The InMemory JUnit tests use this >> mechanism. I do not recommend this however, because you bypass the whole >> protocol layer for AtomPub/SOAP. This leaves many issues undetected a client >> may see in a real connection later (and of course you lose the option to >> switch to another CMIS server just by changing configuration). >> >> Jens >> > > Thanks for your suggestion! > > Now I would like to use the AtomPub protocol deployed using Maven, but I > found a problem to configure Jetty with the latest version of the InMemory > webapp, because there aren't anymore two dependencies: jsr250 and jsr181. > > Florian suggested a solution based on taking a look at the OpenCMIS code, > I'll let you know about this :-P > > Now I'm finishing to implement the integration test code using the public > Alfresco CMIS server and then I can start to integrate the latest version of > the OpenCMIS InMemory server. > > Thank you all guys for your support. > > Piergiorgio > > >> >> >> -Original Message- >> From: Piergiorgio Lucidi [mailto:[email protected]] >> Sent: Mittwoch, 3. August 2011 14:48 >> To: [email protected] >> Subject: Re: CMIS and Lucene >> >> Hi Jens, >> >> here the code of my integration test that is used to create some content >> in >> the InMemory Repository, the OpenCMIS server is running because it is >> bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine >> with >> Alfresco 3.4d Community, but I would like to have the OpenCMIS server in >> the >> test suite. >> >> In the following snippet I started to initialize the test environment with >> a >> new folder with a new content, here I don't have any problem, it works >> with >> the InMemory Repository: >> >> private Session getCmisClientSession(){ >> > // default factory implementation >> > SessionFactory factory = SessionFactoryImpl.newInstance(); >> > Map parameters = new HashMap(); >> > // user credentials >> > parameters.put(SessionParameter.USER, "dummyuser"); >> > parameters.put(SessionParameter.PASSWORD, "dummysecret"); >> > // connection settings >> > parameters.put(SessionParameter.ATOMPUB_URL, >> CMIS_ENDPOINT_TEST_SERVER >> > ); >> > parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB >> > .value()); >> > // create session >> > return factory.getRepositories(parameters).get(0).createSession(); >> > } >> > @Before >> > public void createTestArea() >> > throws Exception >> > { >> > try >> > { >> > Session session = getCmisClientSession(); >> > //creating a new folder >> > Folder root = session.getRootFolder(); >> &
Re: CMIS and Lucene
Hi Jens, 2011/8/4 Jens Hübel > Hi Piergiorgio, > > you are right. I could reproduce the problem. There is a bug in the query > implementation of the InMemory server if you query for predefined properties > like cmis:name, cmis:createdBy, etc. :-( > > I have fixed this, so hopefully this works for you now if you take the > latest build. I have created CMIS-413 for this ( > https://issues.apache.org/jira/browse/CMIS-414). Please reopen if you > still have issues. > Great! Thank you very much for fixing this issue, I'll let you know soon if it works for my integration test for ManifoldCF :) > > One more note: Your test code is quite fragile if you use a fixed name for > your test document/folder. This implementation does not allow multiple > objects with the same name in one folder. This means unless you restart the > server your code will work only once. I recommend you using a random UUID as > name or something like that. In the default configuration the InMemory > creates a tree of document and folders by default. So it might not be > necessary to create objects at all (use the Workbench to take a look at > that). If you really need this reproducible behavior there is an option to > run the server using the local binding in the same Java VM. Then you can > restart the server with each test. The InMemory JUnit tests use this > mechanism. I do not recommend this however, because you bypass the whole > protocol layer for AtomPub/SOAP. This leaves many issues undetected a client > may see in a real connection later (and of course you lose the option to > switch to another CMIS server just by changing configuration). > > Jens > Thanks for your suggestion! Now I would like to use the AtomPub protocol deployed using Maven, but I found a problem to configure Jetty with the latest version of the InMemory webapp, because there aren't anymore two dependencies: jsr250 and jsr181. Florian suggested a solution based on taking a look at the OpenCMIS code, I'll let you know about this :-P Now I'm finishing to implement the integration test code using the public Alfresco CMIS server and then I can start to integrate the latest version of the OpenCMIS InMemory server. Thank you all guys for your support. Piergiorgio > > > -Original Message- > From: Piergiorgio Lucidi [mailto:[email protected]] > Sent: Mittwoch, 3. August 2011 14:48 > To: [email protected] > Subject: Re: CMIS and Lucene > > Hi Jens, > > here the code of my integration test that is used to create some content in > the InMemory Repository, the OpenCMIS server is running because it is > bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine > with > Alfresco 3.4d Community, but I would like to have the OpenCMIS server in > the > test suite. > > In the following snippet I started to initialize the test environment with > a > new folder with a new content, here I don't have any problem, it works with > the InMemory Repository: > > private Session getCmisClientSession(){ > > // default factory implementation > > SessionFactory factory = SessionFactoryImpl.newInstance(); > > Map parameters = new HashMap(); > > // user credentials > > parameters.put(SessionParameter.USER, "dummyuser"); > > parameters.put(SessionParameter.PASSWORD, "dummysecret"); > > // connection settings > > parameters.put(SessionParameter.ATOMPUB_URL, > CMIS_ENDPOINT_TEST_SERVER > > ); > > parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB > > .value()); > > // create session > > return factory.getRepositories(parameters).get(0).createSession(); > > } > > @Before > > public void createTestArea() > > throws Exception > > { > > try > > { > > Session session = getCmisClientSession(); > > //creating a new folder > > Folder root = session.getRootFolder(); > > Map folderProperties = new HashMap > Object>(); > > folderProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); > > folderProperties.put(PropertyIds.NAME, "testdata"); > > > > Folder newFolder = root.createFolder(folderProperties); > > //create a new content in the folder > > String name = "testdata1.txt"; > > // properties > > // (minimal set: name and object type id) > > Map contentProperties = new HashMap > Object>(); > > contentProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); > > contentProperties.put(PropertyIds.NAME, name); > > > >
RE: CMIS and Lucene
Hi Piergiorgio, you are right. I could reproduce the problem. There is a bug in the query implementation of the InMemory server if you query for predefined properties like cmis:name, cmis:createdBy, etc. :-( I have fixed this, so hopefully this works for you now if you take the latest build. I have created CMIS-413 for this (https://issues.apache.org/jira/browse/CMIS-414). Please reopen if you still have issues. One more note: Your test code is quite fragile if you use a fixed name for your test document/folder. This implementation does not allow multiple objects with the same name in one folder. This means unless you restart the server your code will work only once. I recommend you using a random UUID as name or something like that. In the default configuration the InMemory creates a tree of document and folders by default. So it might not be necessary to create objects at all (use the Workbench to take a look at that). If you really need this reproducible behavior there is an option to run the server using the local binding in the same Java VM. Then you can restart the server with each test. The InMemory JUnit tests use this mechanism. I do not recommend this however, because you bypass the whole protocol layer for AtomPub/SOAP. This leaves many issues undetected a client may see in a real connection later (and of course you lose the option to switch to another CMIS server just by changing configuration). Jens -Original Message- From: Piergiorgio Lucidi [mailto:[email protected]] Sent: Mittwoch, 3. August 2011 14:48 To: [email protected] Subject: Re: CMIS and Lucene Hi Jens, here the code of my integration test that is used to create some content in the InMemory Repository, the OpenCMIS server is running because it is bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine with Alfresco 3.4d Community, but I would like to have the OpenCMIS server in the test suite. In the following snippet I started to initialize the test environment with a new folder with a new content, here I don't have any problem, it works with the InMemory Repository: private Session getCmisClientSession(){ > // default factory implementation > SessionFactory factory = SessionFactoryImpl.newInstance(); > Map parameters = new HashMap(); > // user credentials > parameters.put(SessionParameter.USER, "dummyuser"); > parameters.put(SessionParameter.PASSWORD, "dummysecret"); > // connection settings > parameters.put(SessionParameter.ATOMPUB_URL, CMIS_ENDPOINT_TEST_SERVER > ); > parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB > .value()); > // create session > return factory.getRepositories(parameters).get(0).createSession(); > } > @Before > public void createTestArea() > throws Exception > { > try > { > Session session = getCmisClientSession(); > //creating a new folder > Folder root = session.getRootFolder(); > Map folderProperties = new HashMap Object>(); > folderProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); > folderProperties.put(PropertyIds.NAME, "testdata"); > > Folder newFolder = root.createFolder(folderProperties); > //create a new content in the folder > String name = "testdata1.txt"; > // properties > // (minimal set: name and object type id) > Map contentProperties = new HashMap Object>(); > contentProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); > contentProperties.put(PropertyIds.NAME, name); > > // content > byte[] content = "CMIS Testdata One".getBytes(); > InputStream stream = new ByteArrayInputStream(content); > ContentStream contentStream = new ContentStreamImpl(name, > newBigInteger(content), > "text/plain", stream); > >// create a major version > Document newContent1 = newFolder.createDocument(contentProperties, > contentStream, null); But if I try to search the new content in the InMemory Repository, in the same way I implemented in the CMIS Repository Connector: ItemIterable results = session.query("SELECT * FROM > cmis:folder WHERE cmis:name='testdata'", false); > for (QueryResult result : results) { > String id = result.getPropertyValueById(PropertyIds.OBJECT_ID); > } It returns the following exception: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: null > at > org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode( > AbstractAtomPubService.java:450) > at > org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubSe
Re: CMIS and Lucene
t; at >>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50 >>>>> ) >>>>> at org.mortbay.jetty.handler.HandlerCollection.doStart( >>>>> HandlerCollection.java:152) >>>>> at >>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50 >>>>> ) >>>>> at org.mortbay.jetty.handler.HandlerWrapper.doStart( >>>>> HandlerWrapper.java:130) >>>>> at org.mortbay.jetty.Server.doStart(Server.java:224) >>>>> at >>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50 >>>>> ) >>>>> at org.apache.manifoldcf.cmis_tests.Base.setUp(Base.java:333) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke( >>>>> NativeMethodAccessorImpl.java:39) >>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke( >>>>> DelegatingMethodAccessorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall( >>>>> FrameworkMethod.java:44) >>>>> at org.junit.internal.runners.model.ReflectiveCallable.run( >>>>> ReflectiveCallable.java:15) >>>>> at org.junit.runners.model.FrameworkMethod.invokeExplosively( >>>>> FrameworkMethod.java:41) >>>>> at org.junit.internal.runners.statements.RunBefores.evaluate( >>>>> RunBefores.java:27) >>>>> at org.junit.internal.runners.statements.RunAfters.evaluate( >>>>> RunAfters.java:31) >>>>> at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored( >>>>> BlockJUnit4ClassRunner.java:79) >>>>> at org.junit.runners.BlockJUnit4ClassRunner.runChild( >>>>> BlockJUnit4ClassRunner.java:71) >>>>> at org.junit.runners.BlockJUnit4ClassRunner.runChild( >>>>> BlockJUnit4ClassRunner.java:49) >>>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) >>>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) >>>>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) >>>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) >>>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) >>>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) >>>>> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( >>>>> JUnit4TestReference.java:49) >>>>> at org.eclipse.jdt.internal.junit.runner.TestExecution.run( >>>>> TestExecution.java:38) >>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >>>>> RemoteTestRunner.java:467) >>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >>>>> RemoteTestRunner.java:683) >>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( >>>>> RemoteTestRunner.java:390) >>>>> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( >>>>> RemoteTestRunner.java:197) >>>>> Caused by: java.lang.ClassCastException >>>>> at java.lang.Class.cast(Class.java:2990) >>>>> at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( >>>>> ServiceFinder.java:374) >>>>> ... 43 more >>>> >>>> >>>> >>>> 2011/8/3 Piergiorgio Lucidi >>>> >>>>> I'm building OpenCMIS to investigate me too :-P >>>>> >>>>> >>>>> 2011/8/3 Jens Hübel >>>>> >>>>>> Thanks for posting! I will try to rebuild and take a look why it does >>> not >>>>>> work. To get further information I need the server logs, but with your >>> code >>>>>> I can debug it. >>>>>> >>>>>> Jens >>>>>> >>>>>> -Original Message- >>>>>> From: Piergiorgio Lucidi [mailto:[email protected]] >>>>>> Sent: Mittwoch, 3. August 2011 14:48 >>>>>> To: [email protected] >>>>>> Subject: Re: CMIS and Lucene >>>>>> >>>>>> Hi Jens, >>>>>> >>>>>> here the code of my integration test that is used to create some >>> content >>>>>>
Re: CMIS and Lucene
ernal.runners.model.ReflectiveCallable.run( >>> >> ReflectiveCallable.java:15) >>> >> at org.junit.runners.model.FrameworkMethod.invokeExplosively( >>> >> FrameworkMethod.java:41) >>> >> at org.junit.internal.runners.statements.RunBefores.evaluate( >>> >> RunBefores.java:27) >>> >> at org.junit.internal.runners.statements.RunAfters.evaluate( >>> >> RunAfters.java:31) >>> >> at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored( >>> >> BlockJUnit4ClassRunner.java:79) >>> >> at org.junit.runners.BlockJUnit4ClassRunner.runChild( >>> >> BlockJUnit4ClassRunner.java:71) >>> >> at org.junit.runners.BlockJUnit4ClassRunner.runChild( >>> >> BlockJUnit4ClassRunner.java:49) >>> >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) >>> >> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) >>> >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) >>> >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) >>> >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) >>> >> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) >>> >> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( >>> >> JUnit4TestReference.java:49) >>> >> at org.eclipse.jdt.internal.junit.runner.TestExecution.run( >>> >> TestExecution.java:38) >>> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >>> >> RemoteTestRunner.java:467) >>> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >>> >> RemoteTestRunner.java:683) >>> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( >>> >> RemoteTestRunner.java:390) >>> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( >>> >> RemoteTestRunner.java:197) >>> >> Caused by: java.lang.ClassCastException >>> >> at java.lang.Class.cast(Class.java:2990) >>> >> at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( >>> >> ServiceFinder.java:374) >>> >> ... 43 more >>> > >>> > >>> > >>> > 2011/8/3 Piergiorgio Lucidi >>> > >>> >> I'm building OpenCMIS to investigate me too :-P >>> >> >>> >> >>> >> 2011/8/3 Jens Hübel >>> >> >>> >>> Thanks for posting! I will try to rebuild and take a look why it does >>> not >>> >>> work. To get further information I need the server logs, but with >>> your code >>> >>> I can debug it. >>> >>> >>> >>> Jens >>> >>> >>> >>> -Original Message- >>> >>> From: Piergiorgio Lucidi [mailto:[email protected]] >>> >>> Sent: Mittwoch, 3. August 2011 14:48 >>> >>> To: [email protected] >>> >>> Subject: Re: CMIS and Lucene >>> >>> >>> >>> Hi Jens, >>> >>> >>> >>> here the code of my integration test that is used to create some >>> content >>> >>> in >>> >>> the InMemory Repository, the OpenCMIS server is running because it is >>> >>> bootstrapped by Jetty / Maven. The CMIS Repository Connector works >>> fine >>> >>> with >>> >>> Alfresco 3.4d Community, but I would like to have the OpenCMIS server >>> in >>> >>> the >>> >>> test suite. >>> >>> >>> >>> In the following snippet I started to initialize the test environment >>> with >>> >>> a >>> >>> new folder with a new content, here I don't have any problem, it >>> works >>> >>> with >>> >>> the InMemory Repository: >>> >>> >>> >>> private Session getCmisClientSession(){ >>> >>>> // default factory implementation >>> >>>> SessionFactory factory = SessionFactoryImpl.newInstance(); >>> >>>> Map parameters = new HashMap(); >>> >>>> // user credentials >>> >>>> parameters.put(SessionParameter.USER, "dummyuser"); >>> >>>>
Re: CMIS and Lucene
un.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> >> at sun.reflect.NativeMethodAccessorImpl.invoke( >> >> NativeMethodAccessorImpl.java:39) >> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke( >> >> DelegatingMethodAccessorImpl.java:25) >> >> at java.lang.reflect.Method.invoke(Method.java:597) >> >> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall( >> >> FrameworkMethod.java:44) >> >> at org.junit.internal.runners.model.ReflectiveCallable.run( >> >> ReflectiveCallable.java:15) >> >> at org.junit.runners.model.FrameworkMethod.invokeExplosively( >> >> FrameworkMethod.java:41) >> >> at org.junit.internal.runners.statements.RunBefores.evaluate( >> >> RunBefores.java:27) >> >> at org.junit.internal.runners.statements.RunAfters.evaluate( >> >> RunAfters.java:31) >> >> at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored( >> >> BlockJUnit4ClassRunner.java:79) >> >> at org.junit.runners.BlockJUnit4ClassRunner.runChild( >> >> BlockJUnit4ClassRunner.java:71) >> >> at org.junit.runners.BlockJUnit4ClassRunner.runChild( >> >> BlockJUnit4ClassRunner.java:49) >> >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) >> >> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) >> >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) >> >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) >> >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) >> >> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) >> >> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( >> >> JUnit4TestReference.java:49) >> >> at org.eclipse.jdt.internal.junit.runner.TestExecution.run( >> >> TestExecution.java:38) >> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >> >> RemoteTestRunner.java:467) >> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >> >> RemoteTestRunner.java:683) >> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( >> >> RemoteTestRunner.java:390) >> >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( >> >> RemoteTestRunner.java:197) >> >> Caused by: java.lang.ClassCastException >> >> at java.lang.Class.cast(Class.java:2990) >> >> at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( >> >> ServiceFinder.java:374) >> >> ... 43 more >> > >> > >> > >> > 2011/8/3 Piergiorgio Lucidi >> > >> >> I'm building OpenCMIS to investigate me too :-P >> >> >> >> >> >> 2011/8/3 Jens Hübel >> >> >> >>> Thanks for posting! I will try to rebuild and take a look why it does >> not >> >>> work. To get further information I need the server logs, but with your >> code >> >>> I can debug it. >> >>> >> >>> Jens >> >>> >> >>> -Original Message- >> >>> From: Piergiorgio Lucidi [mailto:[email protected]] >> >>> Sent: Mittwoch, 3. August 2011 14:48 >> >>> To: [email protected] >> >>> Subject: Re: CMIS and Lucene >> >>> >> >>> Hi Jens, >> >>> >> >>> here the code of my integration test that is used to create some >> content >> >>> in >> >>> the InMemory Repository, the OpenCMIS server is running because it is >> >>> bootstrapped by Jetty / Maven. The CMIS Repository Connector works >> fine >> >>> with >> >>> Alfresco 3.4d Community, but I would like to have the OpenCMIS server >> in >> >>> the >> >>> test suite. >> >>> >> >>> In the following snippet I started to initialize the test environment >> with >> >>> a >> >>> new folder with a new content, here I don't have any problem, it works >> >>> with >> >>> the InMemory Repository: >> >>> >> >>> private Session getCmisClientSession(){ >> >>>> // default factory implementation >> >>>> SessionFactory factory = SessionFactoryImpl.newInstance(); >> >>>> Map parameters = new HashMap(); >> >>>>
Re: CMIS and Lucene
nal.runners.statements.RunBefores.evaluate( > >> RunBefores.java:27) > >> at org.junit.internal.runners.statements.RunAfters.evaluate( > >> RunAfters.java:31) > >> at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored( > >> BlockJUnit4ClassRunner.java:79) > >> at org.junit.runners.BlockJUnit4ClassRunner.runChild( > >> BlockJUnit4ClassRunner.java:71) > >> at org.junit.runners.BlockJUnit4ClassRunner.runChild( > >> BlockJUnit4ClassRunner.java:49) > >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) > >> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) > >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) > >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) > >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) > >> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) > >> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( > >> JUnit4TestReference.java:49) > >> at org.eclipse.jdt.internal.junit.runner.TestExecution.run( > >> TestExecution.java:38) > >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( > >> RemoteTestRunner.java:467) > >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( > >> RemoteTestRunner.java:683) > >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( > >> RemoteTestRunner.java:390) > >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( > >> RemoteTestRunner.java:197) > >> Caused by: java.lang.ClassCastException > >> at java.lang.Class.cast(Class.java:2990) > >> at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( > >> ServiceFinder.java:374) > >> ... 43 more > > > > > > > > 2011/8/3 Piergiorgio Lucidi > > > >> I'm building OpenCMIS to investigate me too :-P > >> > >> > >> 2011/8/3 Jens Hübel > >> > >>> Thanks for posting! I will try to rebuild and take a look why it does > not > >>> work. To get further information I need the server logs, but with your > code > >>> I can debug it. > >>> > >>> Jens > >>> > >>> -Original Message- > >>> From: Piergiorgio Lucidi [mailto:[email protected]] > >>> Sent: Mittwoch, 3. August 2011 14:48 > >>> To: [email protected] > >>> Subject: Re: CMIS and Lucene > >>> > >>> Hi Jens, > >>> > >>> here the code of my integration test that is used to create some > content > >>> in > >>> the InMemory Repository, the OpenCMIS server is running because it is > >>> bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine > >>> with > >>> Alfresco 3.4d Community, but I would like to have the OpenCMIS server > in > >>> the > >>> test suite. > >>> > >>> In the following snippet I started to initialize the test environment > with > >>> a > >>> new folder with a new content, here I don't have any problem, it works > >>> with > >>> the InMemory Repository: > >>> > >>> private Session getCmisClientSession(){ > >>>> // default factory implementation > >>>> SessionFactory factory = SessionFactoryImpl.newInstance(); > >>>> Map parameters = new HashMap(); > >>>> // user credentials > >>>> parameters.put(SessionParameter.USER, "dummyuser"); > >>>> parameters.put(SessionParameter.PASSWORD, "dummysecret"); > >>>> // connection settings > >>>> parameters.put(SessionParameter.ATOMPUB_URL, > >>> CMIS_ENDPOINT_TEST_SERVER > >>>> ); > >>>> parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB > >>>> .value()); > >>>> // create session > >>>> return factory.getRepositories(parameters).get(0).createSession(); > >>>> } > >>>> @Before > >>>> public void createTestArea() > >>>> throws Exception > >>>> { > >>>> try > >>>> { > >>>> Session session = getCmisClientSession(); > >>>> //creating a new
Re: CMIS and Lucene
nner.access$000(ParentRunner.java:42) >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) >> at org.junit.runners.ParentRunner.run(ParentRunner.java:236) >> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( >> JUnit4TestReference.java:49) >> at org.eclipse.jdt.internal.junit.runner.TestExecution.run( >> TestExecution.java:38) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >> RemoteTestRunner.java:467) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( >> RemoteTestRunner.java:683) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( >> RemoteTestRunner.java:390) >> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( >> RemoteTestRunner.java:197) >> Caused by: java.lang.ClassCastException >> at java.lang.Class.cast(Class.java:2990) >> at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( >> ServiceFinder.java:374) >> ... 43 more > > > > 2011/8/3 Piergiorgio Lucidi > >> I'm building OpenCMIS to investigate me too :-P >> >> >> 2011/8/3 Jens Hübel >> >>> Thanks for posting! I will try to rebuild and take a look why it does not >>> work. To get further information I need the server logs, but with your code >>> I can debug it. >>> >>> Jens >>> >>> -Original Message- >>> From: Piergiorgio Lucidi [mailto:[email protected]] >>> Sent: Mittwoch, 3. August 2011 14:48 >>> To: [email protected] >>> Subject: Re: CMIS and Lucene >>> >>> Hi Jens, >>> >>> here the code of my integration test that is used to create some content >>> in >>> the InMemory Repository, the OpenCMIS server is running because it is >>> bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine >>> with >>> Alfresco 3.4d Community, but I would like to have the OpenCMIS server in >>> the >>> test suite. >>> >>> In the following snippet I started to initialize the test environment with >>> a >>> new folder with a new content, here I don't have any problem, it works >>> with >>> the InMemory Repository: >>> >>> private Session getCmisClientSession(){ >>>> // default factory implementation >>>> SessionFactory factory = SessionFactoryImpl.newInstance(); >>>> Map parameters = new HashMap(); >>>> // user credentials >>>> parameters.put(SessionParameter.USER, "dummyuser"); >>>> parameters.put(SessionParameter.PASSWORD, "dummysecret"); >>>> // connection settings >>>> parameters.put(SessionParameter.ATOMPUB_URL, >>> CMIS_ENDPOINT_TEST_SERVER >>>> ); >>>> parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB >>>> .value()); >>>> // create session >>>> return factory.getRepositories(parameters).get(0).createSession(); >>>> } >>>> @Before >>>> public void createTestArea() >>>> throws Exception >>>> { >>>> try >>>> { >>>> Session session = getCmisClientSession(); >>>> //creating a new folder >>>> Folder root = session.getRootFolder(); >>>> Map folderProperties = new HashMap>>> Object>(); >>>> folderProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); >>>> folderProperties.put(PropertyIds.NAME, "testdata"); >>>> >>>> Folder newFolder = root.createFolder(folderProperties); >>>> //create a new content in the folder >>>> String name = "testdata1.txt"; >>>> // properties >>>> // (minimal set: name and object type id) >>>> Map contentProperties = new HashMap>>> Object>(); >>>> contentProperties.put(PropertyIds.OBJECT_TYPE_ID, >>> "cmis:document"); >>>> contentProperties.put(PropertyIds.NAME, name); >>>> >>>> // content >>>> byte[] content = "CMIS Testdata One".getBytes(); >>>> InputStream stream = new ByteArrayInputStream(content); >>>> ContentStream contentStream = new ContentStreamImpl(name, >>> newBigInteger(content), >>>> "text/plain", stream); >>>> >>>>// create a maj
Re: CMIS and Lucene
moteTestRunner.runTests( > RemoteTestRunner.java:467) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( > RemoteTestRunner.java:683) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( > RemoteTestRunner.java:390) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( > RemoteTestRunner.java:197) > Caused by: java.lang.ClassCastException > at java.lang.Class.cast(Class.java:2990) > at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( > ServiceFinder.java:374) > ... 43 more 2011/8/3 Piergiorgio Lucidi > I'm building OpenCMIS to investigate me too :-P > > > 2011/8/3 Jens Hübel > >> Thanks for posting! I will try to rebuild and take a look why it does not >> work. To get further information I need the server logs, but with your code >> I can debug it. >> >> Jens >> >> -Original Message- >> From: Piergiorgio Lucidi [mailto:[email protected]] >> Sent: Mittwoch, 3. August 2011 14:48 >> To: [email protected] >> Subject: Re: CMIS and Lucene >> >> Hi Jens, >> >> here the code of my integration test that is used to create some content >> in >> the InMemory Repository, the OpenCMIS server is running because it is >> bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine >> with >> Alfresco 3.4d Community, but I would like to have the OpenCMIS server in >> the >> test suite. >> >> In the following snippet I started to initialize the test environment with >> a >> new folder with a new content, here I don't have any problem, it works >> with >> the InMemory Repository: >> >> private Session getCmisClientSession(){ >> > // default factory implementation >> > SessionFactory factory = SessionFactoryImpl.newInstance(); >> > Map parameters = new HashMap(); >> > // user credentials >> > parameters.put(SessionParameter.USER, "dummyuser"); >> > parameters.put(SessionParameter.PASSWORD, "dummysecret"); >> > // connection settings >> > parameters.put(SessionParameter.ATOMPUB_URL, >> CMIS_ENDPOINT_TEST_SERVER >> > ); >> > parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB >> > .value()); >> > // create session >> > return factory.getRepositories(parameters).get(0).createSession(); >> > } >> > @Before >> > public void createTestArea() >> > throws Exception >> > { >> > try >> > { >> > Session session = getCmisClientSession(); >> > //creating a new folder >> > Folder root = session.getRootFolder(); >> > Map folderProperties = new HashMap> > Object>(); >> > folderProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); >> > folderProperties.put(PropertyIds.NAME, "testdata"); >> > >> > Folder newFolder = root.createFolder(folderProperties); >> > //create a new content in the folder >> > String name = "testdata1.txt"; >> > // properties >> > // (minimal set: name and object type id) >> > Map contentProperties = new HashMap> > Object>(); >> > contentProperties.put(PropertyIds.OBJECT_TYPE_ID, >> "cmis:document"); >> > contentProperties.put(PropertyIds.NAME, name); >> > >> > // content >> > byte[] content = "CMIS Testdata One".getBytes(); >> > InputStream stream = new ByteArrayInputStream(content); >> > ContentStream contentStream = new ContentStreamImpl(name, >> newBigInteger(content), >> > "text/plain", stream); >> > >> >// create a major version >> > Document newContent1 = newFolder.createDocument(contentProperties, >> > contentStream, null); >> >> >> But if I try to search the new content in the InMemory Repository, in the >> same way I implemented in the CMIS Repository Connector: >> >> ItemIterable results = session.query("SELECT * FROM >> > cmis:folder WHERE cmis:name='testdata'", false); >> > for (QueryResult result : results) { >> > String id = result.getPropertyValueById(PropertyIds.OBJECT_ID); >> > } >> >> >> >> It returns the following exception: >> >> org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: >> null >> > at >> > >> org.apac
Re: CMIS and Lucene
I'm building OpenCMIS to investigate me too :-P 2011/8/3 Jens Hübel > Thanks for posting! I will try to rebuild and take a look why it does not > work. To get further information I need the server logs, but with your code > I can debug it. > > Jens > > -Original Message- > From: Piergiorgio Lucidi [mailto:[email protected]] > Sent: Mittwoch, 3. August 2011 14:48 > To: [email protected] > Subject: Re: CMIS and Lucene > > Hi Jens, > > here the code of my integration test that is used to create some content in > the InMemory Repository, the OpenCMIS server is running because it is > bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine > with > Alfresco 3.4d Community, but I would like to have the OpenCMIS server in > the > test suite. > > In the following snippet I started to initialize the test environment with > a > new folder with a new content, here I don't have any problem, it works with > the InMemory Repository: > > private Session getCmisClientSession(){ > > // default factory implementation > > SessionFactory factory = SessionFactoryImpl.newInstance(); > > Map parameters = new HashMap(); > > // user credentials > > parameters.put(SessionParameter.USER, "dummyuser"); > > parameters.put(SessionParameter.PASSWORD, "dummysecret"); > > // connection settings > > parameters.put(SessionParameter.ATOMPUB_URL, > CMIS_ENDPOINT_TEST_SERVER > > ); > > parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB > > .value()); > > // create session > > return factory.getRepositories(parameters).get(0).createSession(); > > } > > @Before > > public void createTestArea() > > throws Exception > > { > > try > > { > > Session session = getCmisClientSession(); > > //creating a new folder > > Folder root = session.getRootFolder(); > > Map folderProperties = new HashMap > Object>(); > > folderProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); > > folderProperties.put(PropertyIds.NAME, "testdata"); > > > > Folder newFolder = root.createFolder(folderProperties); > > //create a new content in the folder > > String name = "testdata1.txt"; > > // properties > > // (minimal set: name and object type id) > > Map contentProperties = new HashMap > Object>(); > > contentProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); > > contentProperties.put(PropertyIds.NAME, name); > > > > // content > > byte[] content = "CMIS Testdata One".getBytes(); > > InputStream stream = new ByteArrayInputStream(content); > > ContentStream contentStream = new ContentStreamImpl(name, > newBigInteger(content), > > "text/plain", stream); > > > >// create a major version > > Document newContent1 = newFolder.createDocument(contentProperties, > > contentStream, null); > > > But if I try to search the new content in the InMemory Repository, in the > same way I implemented in the CMIS Repository Connector: > > ItemIterable results = session.query("SELECT * FROM > > cmis:folder WHERE cmis:name='testdata'", false); > > for (QueryResult result : results) { > > String id = result.getPropertyValueById(PropertyIds.OBJECT_ID); > > } > > > > It returns the following exception: > > org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: > null > > at > > > org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode( > > AbstractAtomPubService.java:450) > > at > > > org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post( > > AbstractAtomPubService.java:568) > > at > > > org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query( > > DiscoveryServiceImpl.java:141) > > at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage( > > SessionImpl.java:557) > > at > > > org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage( > > AbstractIterator.java:132) > > at > > > org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext( > > CollectionIterator.java:48) > > at org.apache.manifoldcf.cmis_tests.APISanityTest.createTestArea( > > APISanityTest.java:139) > > at sun.refl
RE: CMIS and Lucene
Thanks for posting! I will try to rebuild and take a look why it does not work. To get further information I need the server logs, but with your code I can debug it. Jens -Original Message- From: Piergiorgio Lucidi [mailto:[email protected]] Sent: Mittwoch, 3. August 2011 14:48 To: [email protected] Subject: Re: CMIS and Lucene Hi Jens, here the code of my integration test that is used to create some content in the InMemory Repository, the OpenCMIS server is running because it is bootstrapped by Jetty / Maven. The CMIS Repository Connector works fine with Alfresco 3.4d Community, but I would like to have the OpenCMIS server in the test suite. In the following snippet I started to initialize the test environment with a new folder with a new content, here I don't have any problem, it works with the InMemory Repository: private Session getCmisClientSession(){ > // default factory implementation > SessionFactory factory = SessionFactoryImpl.newInstance(); > Map parameters = new HashMap(); > // user credentials > parameters.put(SessionParameter.USER, "dummyuser"); > parameters.put(SessionParameter.PASSWORD, "dummysecret"); > // connection settings > parameters.put(SessionParameter.ATOMPUB_URL, CMIS_ENDPOINT_TEST_SERVER > ); > parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB > .value()); > // create session > return factory.getRepositories(parameters).get(0).createSession(); > } > @Before > public void createTestArea() > throws Exception > { > try > { > Session session = getCmisClientSession(); > //creating a new folder > Folder root = session.getRootFolder(); > Map folderProperties = new HashMap Object>(); > folderProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder"); > folderProperties.put(PropertyIds.NAME, "testdata"); > > Folder newFolder = root.createFolder(folderProperties); > //create a new content in the folder > String name = "testdata1.txt"; > // properties > // (minimal set: name and object type id) > Map contentProperties = new HashMap Object>(); > contentProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); > contentProperties.put(PropertyIds.NAME, name); > > // content > byte[] content = "CMIS Testdata One".getBytes(); > InputStream stream = new ByteArrayInputStream(content); > ContentStream contentStream = new ContentStreamImpl(name, > newBigInteger(content), > "text/plain", stream); > >// create a major version > Document newContent1 = newFolder.createDocument(contentProperties, > contentStream, null); But if I try to search the new content in the InMemory Repository, in the same way I implemented in the CMIS Repository Connector: ItemIterable results = session.query("SELECT * FROM > cmis:folder WHERE cmis:name='testdata'", false); > for (QueryResult result : results) { > String id = result.getPropertyValueById(PropertyIds.OBJECT_ID); > } It returns the following exception: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: null > at > org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode( > AbstractAtomPubService.java:450) > at > org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post( > AbstractAtomPubService.java:568) > at > org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query( > DiscoveryServiceImpl.java:141) > at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage( > SessionImpl.java:557) > at > org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage( > AbstractIterator.java:132) > at > org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext( > CollectionIterator.java:48) > at org.apache.manifoldcf.cmis_tests.APISanityTest.createTestArea( > APISanityTest.java:139) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke( > NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall( > FrameworkMethod.java:44) > at org.junit.internal.runners.model.ReflectiveCallable.run( > ReflectiveCallable.java:15) > at org.junit.runners.model.FrameworkMethod.invokeExplosively( > FrameworkMethod.java:41) > at org.junit.internal.runners.statements.RunBefore
Re: CMIS and Lucene
Unit4ClassRunner.runChild( > BlockJUnit4ClassRunner.java:49) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) > at org.junit.runners.ParentRunner.run(ParentRunner.java:236) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run( > JUnit4TestReference.java:49) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run( > TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( > RemoteTestRunner.java:467) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( > RemoteTestRunner.java:683) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( > RemoteTestRunner.java:390) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( > RemoteTestRunner.java:197) Let me know if you have any hints! Thank you again for your support. Regards, Piergiorgio 2011/8/3 Jens Hübel > Hi Pergiorio, > > do you have a code piece that I can take a look at? What is your client > API? Do you connect to Chemistry client API (chemistry-opencmis-client-api)? > Or perhaps you can grab the query sent from the log file? > > Thanks Jens > > > -Original Message- > From: Piergiorgio Lucidi [mailto:[email protected]] > Sent: Mittwoch, 3. August 2011 13:22 > To: [email protected] > Subject: Re: CMIS and Lucene > > Hi Jens, > > I contributed to the Apache ManifoldCF (ex Lucene Connector Framework) > project implementing the CMIS Connector using OpenCMIS 0.4.0. > > Now I'm working on integration test trying to use the OpenCMIS InMemory > Repository that is available from Apache Chemistry ;) > > I have some problems because now I'm finishing my test implementation but > it > seems that I can't execute queries on the InMemory Repository, it returns a > null string in the convertStatusCode method. > > The CMIS Repository Connector that I implemented for ManifoldCF has a job > parameter that is the CMIS Query, this parameter is used by agents to > select > all the contents that needs to be indexed on the Output Connector (for > example Apache Solr). > Without a query feature exposed by the InMemory Repository I can't test the > connector in the right way. > > I tried to use the latest version of the InMemory Repository > (0.5.0-SNAPSHOT) but with the same result. > > Have you got any ideas to solve this problem? > Thank you for your support. > > Regards, > Piergiorgio > > > 2011/8/3 Jens Hübel > > > Hi Chemistries, > > > > > > > > is anyone of us already involved in the Lucene project? > > > > > > > > Reading this here > > http://search-lucene.com/m/wI38e1K3BWJ&subj=Re+CMIS+Connector+Tests > > > > > > > > I think it would make sense to give them an introduction to what we have. > > > > > > > > if I understand this correctly one of the options they discuss is to > create > > an InMemory mock server. It does not make much sense to duplicate what we > > already have (and if we need getContentChanges() for that I am happy to > > implement this). > > > > > > > > Jens > > > > > > > > > > > -- > Piergiorgio Lucidi > Web: http://about.me/piergiorgiolucidi > -- Piergiorgio Lucidi Web: http://about.me/piergiorgiolucidi
RE: CMIS and Lucene
Hi Pergiorio, do you have a code piece that I can take a look at? What is your client API? Do you connect to Chemistry client API (chemistry-opencmis-client-api)? Or perhaps you can grab the query sent from the log file? Thanks Jens -Original Message- From: Piergiorgio Lucidi [mailto:[email protected]] Sent: Mittwoch, 3. August 2011 13:22 To: [email protected] Subject: Re: CMIS and Lucene Hi Jens, I contributed to the Apache ManifoldCF (ex Lucene Connector Framework) project implementing the CMIS Connector using OpenCMIS 0.4.0. Now I'm working on integration test trying to use the OpenCMIS InMemory Repository that is available from Apache Chemistry ;) I have some problems because now I'm finishing my test implementation but it seems that I can't execute queries on the InMemory Repository, it returns a null string in the convertStatusCode method. The CMIS Repository Connector that I implemented for ManifoldCF has a job parameter that is the CMIS Query, this parameter is used by agents to select all the contents that needs to be indexed on the Output Connector (for example Apache Solr). Without a query feature exposed by the InMemory Repository I can't test the connector in the right way. I tried to use the latest version of the InMemory Repository (0.5.0-SNAPSHOT) but with the same result. Have you got any ideas to solve this problem? Thank you for your support. Regards, Piergiorgio 2011/8/3 Jens Hübel > Hi Chemistries, > > > > is anyone of us already involved in the Lucene project? > > > > Reading this here > http://search-lucene.com/m/wI38e1K3BWJ&subj=Re+CMIS+Connector+Tests > > > > I think it would make sense to give them an introduction to what we have. > > > > if I understand this correctly one of the options they discuss is to create > an InMemory mock server. It does not make much sense to duplicate what we > already have (and if we need getContentChanges() for that I am happy to > implement this). > > > > Jens > > > > -- Piergiorgio Lucidi Web: http://about.me/piergiorgiolucidi
Re: CMIS and Lucene
Hi Jens, I contributed to the Apache ManifoldCF (ex Lucene Connector Framework) project implementing the CMIS Connector using OpenCMIS 0.4.0. Now I'm working on integration test trying to use the OpenCMIS InMemory Repository that is available from Apache Chemistry ;) I have some problems because now I'm finishing my test implementation but it seems that I can't execute queries on the InMemory Repository, it returns a null string in the convertStatusCode method. The CMIS Repository Connector that I implemented for ManifoldCF has a job parameter that is the CMIS Query, this parameter is used by agents to select all the contents that needs to be indexed on the Output Connector (for example Apache Solr). Without a query feature exposed by the InMemory Repository I can't test the connector in the right way. I tried to use the latest version of the InMemory Repository (0.5.0-SNAPSHOT) but with the same result. Have you got any ideas to solve this problem? Thank you for your support. Regards, Piergiorgio 2011/8/3 Jens Hübel > Hi Chemistries, > > > > is anyone of us already involved in the Lucene project? > > > > Reading this here > http://search-lucene.com/m/wI38e1K3BWJ&subj=Re+CMIS+Connector+Tests > > > > I think it would make sense to give them an introduction to what we have. > > > > if I understand this correctly one of the options they discuss is to create > an InMemory mock server. It does not make much sense to duplicate what we > already have (and if we need getContentChanges() for that I am happy to > implement this). > > > > Jens > > > > -- Piergiorgio Lucidi Web: http://about.me/piergiorgiolucidi
