Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-3140 Jakarta EE 9.1 TCK Failures
  3. TOMEE-3220

servlet.ee.spec.security.runAs web_to_ejb_annotation_runAs

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.0.0-M7
    • Component/s: None
    • Labels:
      None

      Description

      Follow setup instructions in TOMEE-3140. Then run:

      ./runtests --ee91 -c -j --web tomee-plume com.sun.ts.tests.servlet.ee.spec.security.runAs.Client#web_to_ejb_annotation_runAs
      

      At the time this issue was filed, the test failed with the following in target/logs/javatest.log

      04-11-2021 21:02:50:  TRACE: ** IN getRunMethod: testClass=com.sun.ts.tests.servlet.ee.spec.security.runAs.Client
      04-11-2021 21:02:50:  TRACE: ** IN getRunMethod: testname=web_to_ejb_annotation_runAs
      04-11-2021 21:02:50:  TRACE: ** GOT RUN METHOD!
      04-11-2021 21:02:50:  TRACE: **runmethod=web_to_ejb_annotation_runAs
      04-11-2021 21:02:50:  TRACE: ABOUT TO GET SETUP METHOD!
      04-11-2021 21:02:50:  TRACE: No setupMethod annotation present
      04-11-2021 21:02:50:  TRACE: getSetupMethod - checking for testcase specific setup method:  web_to_ejb_annotation_runAs_setup
      04-11-2021 21:02:50:  TRACE: getSetupMethod - checking for default class specific setup method
      04-11-2021 21:02:50:  TRACE: GOT SETUP METHOD!
      04-11-2021 21:02:50:  TRACE: No cleanupMethod annotation present
      04-11-2021 21:02:50:  TRACE: getCleanupMethod - checking for testcase specific cleanup method:  web_to_ejb_annotation_runAs_cleanup
      04-11-2021 21:02:50:  TRACE: getCleanupMethod - checking for default class specific cleanup method
      04-11-2021 21:02:50:  TRACE: GOT CLEANUP METHOD!
      04-11-2021 21:02:50:  TRACE: ABOUT TO INVOKE SETUP METHOD!
      04-11-2021 21:02:50:  setup complete
      04-11-2021 21:02:50:  TRACE: INVOKED SETUP METHOD!
      04-11-2021 21:02:50:  TRACE: ABOUT TO INVOKE EETEST RUN METHOD!
      04-11-2021 21:02:50:  Invoking ServletTwo as User :j2ee
      04-11-2021 21:02:50:  Sending request "/second_module_cntxt_root/ServletTwoTest"
      04-11-2021 21:02:50:  TRACE: REQUEST: GET /second_module_cntxt_root/ServletTwoTest HTTP/1.0
      04-11-2021 21:02:50:  TRACE: REQUEST: Host: localhost:55334
      04-11-2021 21:02:50:  TRACE: REQUEST: Authorization: Basic ajJlZTpqMmVl
      04-11-2021 21:02:50:  TRACE: REQUEST: 
      jakarta.ejb.EJBAccessException: Unauthorized Access by Principal Denied
      	at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:189)
      	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:265)
      	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:260)
      	at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:89)
      	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:349)
      	at com.sun.proxy.$Proxy102.getCallerPrincipalName(Unknown Source)
      	at com.sun.ts.tests.servlet.ee.spec.security.runAs.ServletTwo.service(ServletTwo.java:52)
      	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:223)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
      	at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:66)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:185)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:158)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
      	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:668)
      	at org.apache.openejb.cts.TransactionalWorkaroundLeakGuardValve.invoke(TransactionalWorkaroundLeakGuardValve.java:39)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:353)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:870)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1696)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      04-11-2021 21:02:50:  TRACE: HEADER: HTTP/1.1 200 
      04-11-2021 21:02:50:  TRACE: HEADER: Cache-Control: private
      04-11-2021 21:02:50:  TRACE: HEADER: Expires: Thu, 01 Jan 1970 00:00:00 GMT
      04-11-2021 21:02:50:  TRACE: HEADER: Content-Length: 71
      04-11-2021 21:02:50:  TRACE: HEADER: Date: Mon, 12 Apr 2021 04:02:50 GMT
      04-11-2021 21:02:50:  TRACE: HEADER: Connection: close
      04-11-2021 21:02:50:  TRACE: HEADER: 
      04-11-2021 21:02:50:  Received following Response 
      
      04-11-2021 21:02:50:  Servlet accessed as User :j2ee
      Unauthorized Access by Principal Denied
      
      04-11-2021 21:02:50:  Web User Principal correct.
      04-11-2021 21:02:50:  ERROR: Ejb Principal incorrect
      04-11-2021 21:02:50:  ERROR: test failed.
      04-11-2021 21:02:50:  ERROR: Caught exception: test failed.
      04-11-2021 21:02:50:  ERROR: Test case throws exception: test failed:
      04-11-2021 21:02:50:  ERROR: Exception at:  
      04-11-2021 21:02:50:  ERROR: com.sun.ts.lib.harness.EETest$Fault: test failed.
      	at com.sun.ts.tests.servlet.ee.spec.security.runAs.Client.web_to_ejb_annotation_runAs(Client.java:248)
      	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.EETest.getPropsReady(EETest.java:486)
      	at com.sun.ts.lib.harness.EETest.run(EETest.java:337)
      	at com.sun.ts.lib.harness.EETest.run(EETest.java:285)
      	at com.sun.ts.tests.servlet.ee.spec.security.runAs.Client.main(Client.java:80)
      	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 org.apache.openejb.client.Main.invoke(Main.java:132)
      	at org.apache.openejb.client.Main.main(Main.java:100)
      
      04-11-2021 21:02:50:  cleanup complete
      STATUS:Failed.Test case throws exception: test failed:
      Failed. Test case throws exception: test failed:
      ********************************************************************************
      Finished Test:  FAILED........com/sun/ts/tests/servlet/ee/spec/security/runAs/Client.java#web_to_ejb_annotation_runAs
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              jlmonteiro Jean-Louis Monteiro
              Reporter:
              dblevins David Blevins
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: