Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7827

Upgrade embedded JAX-RS server and library used by unit tests

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Not needed to fix
    • Affects Version/s: EJBCA 7.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Provenance:
      Internal Delivery
    • Issue discovered during:
      Another issue

      Description

      The embedded server used by the EJBCA REST API is not JEE7 compliant (tjws-2.3.7.jar etc).

      This causes org.ejbca.ui.web.rest.api.config.ExceptionHandlerUnitTest.shouldFormProperErrorResponseOnWebApplicationException to fail with

      Error Message
      
      javax.ws.rs.core.Response.getStatusInfo()Ljavax/ws/rs/core/Response$StatusType;
      
      Stacktrace
      
      java.lang.AbstractMethodError: javax.ws.rs.core.Response.getStatusInfo()Ljavax/ws/rs/core/Response$StatusType;
      	at javax.ws.rs.WebApplicationException.computeExceptionMessage(WebApplicationException.java:99)
      	at javax.ws.rs.WebApplicationException.<init>(WebApplicationException.java:83)
      	at javax.ws.rs.WebApplicationException.<init>(WebApplicationException.java:108)
      	at org.ejbca.ui.web.rest.api.config.ExceptionHandlerUnitTest.shouldFormProperErrorResponseOnWebApplicationException(ExceptionHandlerUnitTest.java:155)
      
      ... WARN  [org.ejbca.ui.web.rest.api.config.ExceptionHandler] Cannot find a proper mapping for the exception, falling back to default.
      java.lang.Exception
      	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:46)
      	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:102)
      	at org.easymock.internal.ClassProxyFactory$MockMethodInterceptor.intercept(ClassProxyFactory.java:97)
      	at org.ejbca.ui.web.rest.api.config.ExceptionHandlerUnitTest$DummyMock$$EnhancerByCGLIB$$4529d588.throwException(<generated>)
      	at org.ejbca.ui.web.rest.api.config.ExceptionHandlerUnitTest$DummyRestResource.throwsException(ExceptionHandlerUnitTest.java:104)
      	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
      	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
      	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
      	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
      	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
      	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
      	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
      	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
      	at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40)
      	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2326)
      	at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2280)
      	at Acme.Serve.Serve$ServeConnection.run(Serve.java:2052)
      	at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402)
      	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                johan Johan Eklund
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: