Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 635E676CF for ; Wed, 3 Aug 2011 15:11:30 +0000 (UTC) Received: (qmail 65835 invoked by uid 500); 3 Aug 2011 15:11:30 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 65793 invoked by uid 500); 3 Aug 2011 15:11:29 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 65785 invoked by uid 99); 3 Aug 2011 15:11:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2011 15:11:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of piergiorgiolucidi@gmail.com designates 209.85.216.170 as permitted sender) Received: from [209.85.216.170] (HELO mail-qy0-f170.google.com) (209.85.216.170) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2011 15:11:22 +0000 Received: by qyg14 with SMTP id 14so4031251qyg.1 for ; Wed, 03 Aug 2011 08:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=PSOcNNnuOu/1b2ptoPAD9iM9xzOaVLYZRf6Mhuve9Q0=; b=K2zmPIhg89DTdBFNOdA7e9m4I925kbrHcBGnAEPRy9Ia+UR/AfZMsMKqkh5LwnYSKK wxqMeut/gMZeM5Mo63RX8lOz7Ky2al7ZpQWv4nuErCmtPvkAgThB1OZeu8xrtX11czW8 p2rdAi532LG9cFOjBj78CU5YLsljlS7aWR9y0= Received: by 10.52.70.112 with SMTP id l16mr2114274vdu.8.1312384261128; Wed, 03 Aug 2011 08:11:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.165.69 with HTTP; Wed, 3 Aug 2011 08:10:40 -0700 (PDT) In-Reply-To: References: <11E8705F4573E64FB42C724ADC742F6F03E6195B@MUCXGC2.opentext.net> <11E8705F4573E64FB42C724ADC742F6F03E61998@MUCXGC2.opentext.net> <11E8705F4573E64FB42C724ADC742F6F03E619C2@MUCXGC2.opentext.net> <4E395FB7.9050505@alfresco.com> From: Piergiorgio Lucidi Date: Wed, 3 Aug 2011 17:10:40 +0200 Message-ID: Subject: Re: CMIS and Lucene To: dev@chemistry.apache.org Content-Type: multipart/alternative; boundary=20cf307ca616b183eb04a99b4534 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307ca616b183eb04a99b4534 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The only difference between the two versions of the war of the InMemory Repository is that in the 0.4.0 (that works fine on Jetty) there are two more dependencies: - jsr181-api-1.0-MR1.jar - jsr250-api-1.0.jar Could be the deployment problem caused by this lack? If yes, it could be fixed reincluding this file in the building process of the webapp. 2011/8/3 Piergiorgio Lucidi > Hi Florian, > > thank you for your suggestion but trying to deploy the InMemory Repositor= y > webapp on Tomcat works fine. > It seems that there is a problem only on Jetty, maybe later I will try to > add other dependencies and I'll let you know. > > Now I'm trying with the 0.5.0-SNAPSHOT but without any result. > > 2011/8/3 Florian M=C3=BCller > >> Hi, >> >> Make sure that you have all OpenCMIS dependencies in your classpath. >> >> >> Florian >> >> On 03/08/2011 15:44, Piergiorgio Lucidi wrote: >> > Building the latest version of the code in the trunk, the InMemory >> > Repository can't deploy anymore, it returns this exception trying >> deploying >> > on Jetty: >> > >> > GRAVE: WSSERVLET11: failed to parse runtime descriptor: >> >> com.sun.xml.ws.util.ServiceConfigurationError: >> >> com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider >> >> >> org.apache.chemistry.opencmis.client.bindings.spi.webservices.wss.WssTub= elineAssemblerFactory >> >> is specified in >> >> >> file:/Users/piergiorgiolucidi/Documents/workspaces/manifold/opencmis/che= mistry-opencmis-client/chemistry-opencmis-client-bindings/target/classes/ME= TA-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut >> >> could not be instantiated: java.lang.ClassCastException >> >> com.sun.xml.ws.util.ServiceConfigurationError: >> >> com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider >> >> >> org.apache.chemistry.opencmis.client.bindings.spi.webservices.wss.WssTub= elineAssemblerFactory >> >> is specified in >> >> >> file:/Users/piergiorgiolucidi/Documents/workspaces/manifold/opencmis/che= mistry-opencmis-client/chemistry-opencmis-client-bindings/target/classes/ME= TA-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut >> >> could not be instantiated: java.lang.ClassCastException >> >> at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233) >> >> at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:14= 1) >> >> at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next( >> >> ServiceFinder.java:379) >> >> at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create( >> >> TubelineAssemblerFactory.java:104) >> >> at com.sun.xml.ws.server.WSEndpointImpl.(WSEndpointImpl.java:14= 7) >> >> at com.sun.xml.ws.server.EndpointFactory.createEndpoint( >> >> EndpointFactory.java:218) >> >> at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) >> >> at >> com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters( >> >> DeploymentDescriptorParser.java:253) >> >> at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse( >> >> DeploymentDescriptorParser.java:147) >> >> at >> >> >> com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextIn= itialized( >> >> WSServletContextListener.java:108) >> >> at org.mortbay.jetty.handler.ContextHandler.startContext( >> >> ContextHandler.java:549) >> >> at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) >> >> at org.mortbay.jetty.webapp.WebAppContext.startContext( >> >> WebAppContext.java:1282) >> >> at org.mortbay.jetty.handler.ContextHandler.doStart( >> >> ContextHandler.java:518) >> >> at >> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) >> >> 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=C3=BCbel >> >> >> >>> Thanks for posting! I will try to rebuild and take a look why it doe= s >> not >> >>> work. To get further information I need the server logs, but with yo= ur >> code >> >>> I can debug it. >> >>> >> >>> Jens >> >>> >> >>> -----Original Message----- >> >>> From: Piergiorgio Lucidi [mailto:piergiorgiolucidi@gmail.com] >> >>> Sent: Mittwoch, 3. August 2011 14:48 >> >>> To: dev@chemistry.apache.org >> >>> 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 i= s >> >>> bootstrapped by Jetty / Maven. The CMIS Repository Connector works >> fine >> >>> with >> >>> Alfresco 3.4d Community, but I would like to have the OpenCMIS serve= r >> in >> >>> the >> >>> test suite. >> >>> >> >>> In the following snippet I started to initialize the test environmen= t >> with >> >>> a >> >>> new folder with a new content, here I don't have any problem, it wor= ks >> >>> with >> >>> the InMemory Repository: >> >>> >> >>> private Session getCmisClientSession(){ >> >>>> // default factory implementation >> >>>> SessionFactory factory =3D SessionFactoryImpl.newInstance(); >> >>>> Map parameters =3D 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.ATOMP= UB >> >>>> .value()); >> >>>> // create session >> >>>> return >> factory.getRepositories(parameters).get(0).createSession(); >> >>>> } >> >>>> @Before >> >>>> public void createTestArea() >> >>>> throws Exception >> >>>> { >> >>>> try >> >>>> { >> >>>> Session session =3D getCmisClientSession(); >> >>>> //creating a new folder >> >>>> Folder root =3D session.getRootFolder(); >> >>>> Map folderProperties =3D new HashMap> >>>> Object>(); >> >>>> folderProperties.put(PropertyIds.OBJECT_TYPE_ID, >> "cmis:folder"); >> >>>> folderProperties.put(PropertyIds.NAME, "testdata"); >> >>>> >> >>>> Folder newFolder =3D root.createFolder(folderProperties); >> >>>> //create a new content in the folder >> >>>> String name =3D "testdata1.txt"; >> >>>> // properties >> >>>> // (minimal set: name and object type id) >> >>>> Map contentProperties =3D new HashMap> >>>> Object>(); >> >>>> contentProperties.put(PropertyIds.OBJECT_TYPE_ID, >> >>> "cmis:document"); >> >>>> contentProperties.put(PropertyIds.NAME, name); >> >>>> >> >>>> // content >> >>>> byte[] content =3D "CMIS Testdata One".getBytes(); >> >>>> InputStream stream =3D new ByteArrayInputStream(content); >> >>>> ContentStream contentStream =3D new ContentStreamImpl(name, >> >>> newBigInteger(content), >> >>>> "text/plain", stream); >> >>>> >> >>>> // create a major version >> >>>> Document newContent1 =3D >> newFolder.createDocument(contentProperties, >> >>>> contentStream, null); >> >>> >> >>> >> >>> But if I try to search the new content in the InMemory Repository, i= n >> the >> >>> same way I implemented in the CMIS Repository Connector: >> >>> >> >>> ItemIterable results =3D session.query("SELECT * FROM >> >>>> cmis:folder WHERE cmis:name=3D'testdata'", false); >> >>>> for (QueryResult result : results) { >> >>>> String id =3D >> 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.AbstractAtomPu= bService.convertStatusCode( >> >>>> AbstractAtomPubService.java:450) >> >>>> at >> >>>> >> >>> >> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPu= bService.post( >> >>>> AbstractAtomPubService.java:568) >> >>>> at >> >>>> >> >>> >> org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServi= ceImpl.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.getCu= rrentPage( >> >>>> AbstractIterator.java:132) >> >>>> at >> >>>> >> >>> >> org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.has= Next( >> >>>> 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.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) >> >>> >> >>> >> >>> Let me know if you have any hints! >> >>> >> >>> Thank you again for your support. >> >>> >> >>> Regards, >> >>> >> >>> Piergiorgio >> >>> >> >>> 2011/8/3 Jens H=C3=BCbel >> >>> >> >>>> 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:piergiorgiolucidi@gmail.com] >> >>>> Sent: Mittwoch, 3. August 2011 13:22 >> >>>> To: dev@chemistry.apache.org >> >>>> 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 implementati= on >> >>> 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=C3=BCbel >> >>>> >> >>>>> Hi Chemistries, >> >>>>> >> >>>>> >> >>>>> >> >>>>> is anyone of us already involved in the Lucene project? >> >>>>> >> >>>>> >> >>>>> >> >>>>> Reading this here >> >>>>> http://search-lucene.com/m/wI38e1K3BWJ&subj=3DRe+CMIS+Connector+Te= sts >> >>>>> >> >>>>> >> >>>>> >> >>>>> I think it would make sense to give them an introduction to what w= e >> >>> 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 hap= py >> >>> to >> >>>>> implement this). >> >>>>> >> >>>>> >> >>>>> >> >>>>> Jens >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>> >> >>>> >> >>>> -- >> >>>> Piergiorgio Lucidi >> >>>> Web: http://about.me/piergiorgiolucidi >> >>>> >> >>> >> >>> >> >>> >> >>> -- >> >>> Piergiorgio Lucidi >> >>> Web: http://about.me/piergiorgiolucidi >> >>> >> >> >> >> >> >> >> >> -- >> >> Piergiorgio Lucidi >> >> Web: http://about.me/piergiorgiolucidi >> >> >> >> >> > >> > >> >> > > > -- > Piergiorgio Lucidi > Web: http://about.me/piergiorgiolucidi > > --=20 Piergiorgio Lucidi Web: http://about.me/piergiorgiolucidi --20cf307ca616b183eb04a99b4534--