Strange, this works for me. What server code are you testing this with? Can you breakpoint in AbderaResource.getRequestContext and check that rpath ends with "cmis"? Can you check that CMISObjectsCollection.getEntry(String resourceName, RequestContext request, SPI spi) correctly gets the path?
Florent On Mon, Jan 4, 2010 at 6:19 PM, Flo <[email protected]> wrote: > Hi, > > im confused. Still got trace this with TCK testGetObjectByPath: > > java.lang.AssertionError: Request status for > http://0.0.0.0:8080/poc-atompub-server-spring/srv/cmis/path/%2FCMISTCK%201262621638852%20-%20testObjectByPath%2FtestObjectByPath > expected:<200> but was:<400> > at org.junit.Assert.fail(Assert.java:92) > at org.junit.Assert.failNotEquals(Assert.java:689) > at org.junit.Assert.assertEquals(Assert.java:127) > at org.junit.Assert.assertEquals(Assert.java:514) > at > org.apache.chemistry.tck.atompub.client.CMISClient.executeRequest(CMISClient.java:411) > at > org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:273) > at > org.apache.chemistry.tck.atompub.client.CMISClient.getEntry(CMISClient.java:268) > at > org.apache.chemistry.tck.atompub.test.spec.GetTest.testObjectByPath(GetTest.java:129) > 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 junit.framework.TestCase.runTest(TestCase.java:168) > at junit.framework.TestCase.runBare(TestCase.java:134) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:124) > at org.apache.chemistry.tck.atompub.TCKTest.run(TCKTest.java:107) > at junit.framework.TestSuite.runTest(TestSuite.java:232) > at junit.framework.TestSuite.run(TestSuite.java:227) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:91) > at > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) > > > Best Regards > > On Mon, Jan 4, 2010 at 2:48 PM, Florent Guillaume <[email protected]> wrote: >> Ok I now understand what you mean, and I just fixed it. >> I've also updated MainServlet to easily run a standalone server using >> JAX-RS bindings (pass it --jaxrs), so that running the TCK with that >> is easier. >> >> Florent >> >> On Mon, Jan 4, 2010 at 12:19 PM, Flo <[email protected]> wrote: >>> Hi, >>> >>> the problem is that the jax-rs @GET methode with >>> @PATH("path/{path:.*}") will not be called by the GetObjectByPath test >>> in tck because TCK gets path URI Template from CMISProvider with >>> "path/{path}" so it does not hook. It hooks if you change path uri >>> templeat uin CMISProvider to path/{path:.*} but then it wont work for >>> the CMISServlet tests in chemistry-test. Thats what I wanted to say. >>> >>> Chears and happy new years >>> >>> On Thu, Dec 24, 2009 at 3:23 PM, Florent Guillaume <[email protected]> wrote: >>>> I've fixed this in a different manner, please test. >>>> >>>> Florent >>>> >>>> On Wed, Dec 16, 2009 at 4:00 PM, Flo <[email protected]> wrote: >>>>> I added a binding for object by path >>>>> >>>>> AtomPubCMIS.URITMPL_OBJECT_BY_PATH >>>>> >>>>> �...@get >>>>> �...@produces(AtomPub.MEDIA_TYPE_ATOM_ENTRY) >>>>> �...@path("path/{path:.*}") >>>>> public Response doGetObjectByPath( >>>>> �...@pathparam("path") List<PathSegment> pathList) { >>>>> int skipSegments = pathList.size() == 0 ? 2 : pathList.size() + 1; >>>>> return getAbderaEntry(skipSegments); >>>>> } >>>>> >>>>> But the TCK test ObjectByPath fails because URI template in >>>>> CMISProvider is "/path/{path}" if I change to "/path/{path:.*}" it >>>>> works for jax-rs but not for CMISServlet >>>>> >>>>> so chemistry-tests test fails. >>>>> >>>>> >>>>> Does anybody know how to fix this? >>>>> >>>>> Chears >>>>> >>>> >>>> >>>> >>>> -- >>>> Florent Guillaume, Director of R&D, Nuxeo >>>> Open Source, Java EE based, Enterprise Content Management (ECM) >>>> http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87 >>>> >>> >> >> >> >> -- >> Florent Guillaume, Director of R&D, Nuxeo >> Open Source, Java EE based, Enterprise Content Management (ECM) >> http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87 >> > -- Florent Guillaume, Director of R&D, Nuxeo Open Source, Java EE based, Enterprise Content Management (ECM) http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
