Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Follow setup instructions in TOMEE-3140. Then run:
./runtests --ee91 -c -j --web tomee-plume com.sun.ts.tests.jaxrs.spec.context.server.JAXRSClient#serverReaderInjectionTest_from_standalone
At the time this issue was filed, the test failed with the following in target/logs/javatest.log
04-11-2021 20:31:35: TRACE: ####### Actual bind value of harness.log.port is "51765" 04-11-2021 20:31:35: TRACE: in ServiceEETest.run() method 04-11-2021 20:31:35: TRACE: Vehicle to be used for this test is: standalone 04-11-2021 20:31:35: TRACE: [JAXRSCommonClient] Contextroot set at /jaxrs_spec_context_server_web/resource 04-11-2021 20:31:35: TRACE: in custom vehicle so call on EETest. 04-11-2021 20:31:35: TRACE: *** in EETest.run(argv,p) 04-11-2021 20:31:35: TRACE: TESTCLASS=com.sun.ts.tests.jaxrs.spec.context.server.JAXRSClient 04-11-2021 20:31:35: TRACE: ** IN getRunMethod: testClass=com.sun.ts.tests.jaxrs.spec.context.server.JAXRSClient 04-11-2021 20:31:35: TRACE: ** IN getRunMethod: testname=serverReaderInjectionTest 04-11-2021 20:31:35: TRACE: ** GOT RUN METHOD! 04-11-2021 20:31:35: TRACE: **runmethod=serverReaderInjectionTest 04-11-2021 20:31:35: TRACE: ABOUT TO GET SETUP METHOD! 04-11-2021 20:31:35: TRACE: No setupMethod annotation present 04-11-2021 20:31:35: TRACE: getSetupMethod - checking for testcase specific setup method: serverReaderInjectionTest_setup 04-11-2021 20:31:35: TRACE: getSetupMethod - checking for default class specific setup method 04-11-2021 20:31:35: TRACE: GOT SETUP METHOD! 04-11-2021 20:31:35: TRACE: No cleanupMethod annotation present 04-11-2021 20:31:35: TRACE: getCleanupMethod - checking for testcase specific cleanup method: serverReaderInjectionTest_cleanup 04-11-2021 20:31:35: TRACE: getCleanupMethod - checking for default class specific cleanup method 04-11-2021 20:31:35: TRACE: GOT CLEANUP METHOD! 04-11-2021 20:31:35: TRACE: ABOUT TO INVOKE SETUP METHOD! 04-11-2021 20:31:35: TRACE: setup method JAXRSCommonClient 04-11-2021 20:31:35: [JAXRSCommonClient] Test setup OK 04-11-2021 20:31:35: TRACE: INVOKED SETUP METHOD! 04-11-2021 20:31:35: TRACE: ABOUT TO INVOKE EETEST RUN METHOD! 04-11-2021 20:31:35: TRACE: [JAXRSCommonClient] invoke 04-11-2021 20:31:35: TRACE: [JAXRSCommonClient] setTestProperties 04-11-2021 20:31:35: TRACE: [JAXRSCommonClient] EXECUTING 04-11-2021 20:31:35: [Request] Dispatching request: 'POST http://localhost:51759/jaxrs_spec_context_server_web/resource/reader' to target server at 'localhost:51759' 04-11-2021 20:31:35: ############################### 04-11-2021 20:31:36: [Request] Adding entity: 04-11-2021 20:31:36: TRACE: [WIRE] - >> POST http://localhost:51759/jaxrs_spec_context_server_web/resource/reader 04-11-2021 20:31:36: TRACE: [WIRE] - >> Accept:*/*, Content-Type:*/* 04-11-2021 20:31:36: TRACE: [WIRE] - << 500 INTERNAL_SERVER_ERROR 04-11-2021 20:31:36: TRACE: [WIRE] - << connection: close 04-11-2021 20:31:36: TRACE: [WIRE] - << Content-Language: en 04-11-2021 20:31:36: TRACE: [WIRE] - << Content-Length: 4078 04-11-2021 20:31:36: TRACE: [WIRE] - << content-type: text/html;charset=utf-8 04-11-2021 20:31:36: TRACE: [WIRE] - << Date: Mon, 12 Apr 2021 03:31:35 GMT 04-11-2021 20:31:36: TRACE: [WIRE] - << <!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> Filter execution threw an exception</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>jakarta.servlet.ServletException: Filter execution threw an exception 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 04-11-2021 20:31:36: TRACE: [WIRE] - << </pre><p><b>Root Cause</b></p><pre>java.lang.NoClassDefFoundError: com/sun/ts/tests/jaxrs/common/util/JaxrsUtil 04-11-2021 20:31:36: TRACE: [WIRE] - << com.sun.ts.tests.jaxrs.common.provider.StringBeanEntityProvider.readFrom(StringBeanEntityProvider.java:69) 04-11-2021 20:31:36: TRACE: [WIRE] - << com.sun.ts.tests.jaxrs.common.provider.StringBeanEntityProvider.readFrom(StringBeanEntityProvider.java:34) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1435) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1387) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.processRequestBodyParameter(JAXRSUtils.java:901) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:832) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:215) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:79) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:271) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:99) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 04-11-2021 20:31:36: TRACE: [WIRE] - << </pre><p><b>Root Cause</b></p><pre>java.lang.ClassNotFoundException: com.sun.ts.tests.jaxrs.common.util.JaxrsUtil 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1401) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.tomee.catalina.TomEEWebappClassLoader.loadClass(TomEEWebappClassLoader.java:209) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1224) 04-11-2021 20:31:36: TRACE: [WIRE] - << com.sun.ts.tests.jaxrs.common.provider.StringBeanEntityProvider.readFrom(StringBeanEntityProvider.java:69) 04-11-2021 20:31:36: TRACE: [WIRE] - << com.sun.ts.tests.jaxrs.common.provider.StringBeanEntityProvider.readFrom(StringBeanEntityProvider.java:34) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1435) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1387) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.processRequestBodyParameter(JAXRSUtils.java:901) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:832) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:215) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:79) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:271) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:99) 04-11-2021 20:31:36: TRACE: [WIRE] - << org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 04-11-2021 20:31:36: TRACE: [WIRE] - << </pre><p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p><hr class="line" /><h3>Apache Tomcat (TomEE)/10.0.4 (9.0.0-M7-SNAPSHOT)</h3></body></html> 04-11-2021 20:31:36: ERROR: [WebValidatorBase] Unexpected Status Code recieved from server. Expected '200' received '500' 04-11-2021 20:31:36: ERROR: Test case throws exception: [JAXRSCommonClient] null failed! Check output for cause of failure. 04-11-2021 20:31:36: ERROR: Exception at: 04-11-2021 20:31:36: ERROR: com.sun.ts.tests.common.webclient.TestFailureException: Test FAILED! at com.sun.ts.tests.jaxrs.common.client.JaxrsWebTestCase.execute(JaxrsWebTestCase.java:219) at com.sun.ts.tests.jaxrs.common.client.JaxrsCommonClient.invoke(JaxrsCommonClient.java:210) at com.sun.ts.tests.jaxrs.spec.context.server.JAXRSClient.serverReaderInjectionTest(JAXRSClient.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.ts.lib.harness.EETest.run(EETest.java:596) at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:115) at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:41) at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:105) at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:486) at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:209) at com.sun.ts.lib.harness.EETest.run(EETest.java:285) at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:37) 04-11-2021 20:31:36: [JAXRSCommonClient] Test cleanup OK 04-11-2021 20:31:37: TRACE: SLEPT FOR: 1000 STATUS:Failed.Test case throws exception: [JAXRSCommonClient] null failed! Check output for cause of failure. Failed. Test case throws exception: [JAXRSCommonClient] null failed! Check output for cause of failure. ******************************************************************************** Finished Test: FAILED........com/sun/ts/tests/jaxrs/spec/context/server/JAXRSClient.java#serverReaderInjectionTest_from_standalone
For tips on debugging/fixing tests, see https://github.com/apache/tomee-tck/blob/master/DEBUGGING.adoc
If you have any thoughts about what the test is expecting/testing, please add them to the comments.