Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.3
    • 3.5.0, 3.4.4
    • None
    • None
    • Unknown

    Description

      Full test name:

      com/sun/ts/tests/jaxrs/spec/provider/jaxbcontext/JAXRSClient#readWriteProviderTest_from_standalone
      

      Running it locally:

      git clone git@github.com:tckwork/cxf.git
      cd cxf
      ./runtests com/sun/ts/tests/jaxrs/spec/provider/jaxbcontext/JAXRSClient#readWriteProviderTest_from_standalone
      

      At the time this issue was filed, the test failed with the following output.

      [javatest.batch] ************************************************************
      [javatest.batch] 04-15-2021 21:59:24:  [JAXRSCommonClient] Test setup OK
      [javatest.batch] 04-15-2021 21:59:24:  [HttpRequest] Dispatching request: 'POST /jaxrs_spec_provider_jaxbcontext_web/resource/jaxb HTTP/1.1' to target server at 'localhost:8080'
      [javatest.batch] Apr 15, 2021 9:59:24 PM org.apache.commons.httpclient.HttpConnection releaseConnection
      [javatest.batch] WARNING: HttpConnectionManager is null.  Connection cannot be released.
      [javatest.batch] 04-15-2021 21:59:24:  ERROR: [WebValidatorBase] Unable to find the following search string in the server's response: 'SomeMarshaller' at index: 16
      [javatest.batch] [WebValidatorBase] Server's response:
      [javatest.batch] -------------------------------------------
      [javatest.batch] SomeUnmarshallerOK
      [javatest.batch] -------------------------------------------
      [javatest.batch] 
      [javatest.batch] 04-15-2021 21:59:24:  ERROR: Test case throws exception: [JAXRSCommonClient] null failed! Check output for cause of failure.
      [javatest.batch] 04-15-2021 21:59:24:  ERROR: Exception at:  
      [javatest.batch] 04-15-2021 21:59:24:  ERROR: com.sun.ts.tests.common.webclient.TestFailureException: Test FAILED!
      [javatest.batch] 	at com.sun.ts.tests.common.webclient.WebTestCase.execute(WebTestCase.java:180)
      [javatest.batch] 	at com.sun.ts.tests.jaxrs.common.JAXRSCommonClient.invoke(JAXRSCommonClient.java:307)
      [javatest.batch] 	at com.sun.ts.tests.jaxrs.spec.provider.jaxbcontext.JAXRSClient.setPropertyAndInvoke(JAXRSClient.java:44)
      [javatest.batch] 	at com.sun.ts.tests.jaxrs.spec.provider.jaxbcontext.JAXRSClient.readWriteProviderTest(JAXRSClient.java:68)
      [javatest.batch] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [javatest.batch] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] 	at java.lang.reflect.Method.invoke(Method.java:498)
      [javatest.batch] 	at com.sun.ts.lib.harness.EETest.run(EETest.java:596)
      [javatest.batch] 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:115)
      [javatest.batch] 	at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:40)
      [javatest.batch] 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:105)
      [javatest.batch] 	at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:486)
      [javatest.batch] 	at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:209)
      [javatest.batch] 	at com.sun.ts.lib.harness.EETest.run(EETest.java:285)
      [javatest.batch] 	at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:38)
      [javatest.batch] 
      [javatest.batch] 04-15-2021 21:59:24:  [JAXRSCommonClient] Test cleanup OK
      [javatest.batch] STATUS:Failed.Test case throws exception: [JAXRSCommonClient] null failed! Check output for cause of failure.
      [javatest.batch] Failed. Test case throws exception: [JAXRSCommonClient] null failed! Check output for cause of failure.Apr 15, 2021 9:59:26 PM Finished executing all tests, wait for cleanup...
      [javatest.batch] ********************************************************************************
      [javatest.batch] Finished Test:  FAILED........com/sun/ts/tests/jaxrs/spec/provider/jaxbcontext/JAXRSClient.java#readWriteProviderTest_from_standalone
      

      See the attached javatest.log and jtr file for full test details

      Attachments

        1. javatest.log
          10 kB
          David Blevins
        2. JAXRSClient_readWriteProviderTest_from_standalone.jtr
          9 kB
          David Blevins
        3. test.txt
          0.1 kB
          David Blevins

        Issue Links

          Activity

            reta Andriy Redko added a comment -

            The test fails because of the presence of TckJaxbProvider. So what is happening, on the reading side, the CXF's JAXBElementProvider take precedence over TckJaxbProvider, but on the write side, this is not  the case, TckJaxbProvider is picked up. The effect we see is that marshaller is not needed / called, and TckJaxbProvider just dumps "OK" into response stream.

            Reproducer:

             - https://github.com/reta/cxf/blob/CXF-8516/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JAXBContextResolverTest.java

             - https://github.com/reta/cxf/commit/f6143af34a6b44afe0a13ed79b26db167726f983

            reta Andriy Redko added a comment - The test fails because of the presence of TckJaxbProvider. So what is happening, on the reading side, the CXF's JAXBElementProvider take precedence over TckJaxbProvider, but on the write side, this is not  the case, TckJaxbProvider is picked up. The effect we see is that marshaller is not needed / called, and TckJaxbProvider just dumps "OK" into response stream. Reproducer:  - https://github.com/reta/cxf/blob/CXF-8516/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/provider/JAXBContextResolverTest.java  - https://github.com/reta/cxf/commit/f6143af34a6b44afe0a13ed79b26db167726f983

            People

              reta Andriy Redko
              dblevins David Blevins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: