Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when starting a Test Run with the API #225

Open
kapil-agnihotri opened this issue Sep 12, 2022 · 3 comments
Open

NPE when starting a Test Run with the API #225

kapil-agnihotri opened this issue Sep 12, 2022 · 3 comments

Comments

@kapil-agnihotri
Copy link

We get NPE when starting tests for WMS service using the API call.
NPE is observed only for the first time when this API is requested but on successive API calls the test runs successfully.

We get 500 status code from etf-webapp with below stacktrace:

{"timestamp":"1662966957611","url":"http://etf.hc-test-mk8s.svc.cluster.local:8080/validator/v2/TestRuns","stacktrace":["java.lang.NullPointerException","\tat de.interactive_instruments.etf.testdriver.TaskPoolRegistry.release(TaskPoolRegistry.java:178)","\tat java.util.ArrayList.forEach(ArrayList.java:1249)","\tat de.interactive_instruments.etf.testdriver.TaskPoolRegistry.removeDone(TaskPoolRegistry.java:137)","\tat de.interactive_instruments.etf.webapp.controller.TestRunController.start(TestRunController.java:471)","\tat sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)","\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","\tat java.lang.reflect.Method.invoke(Method.java:497)","\tat org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)","\tat org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)","\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)","\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)","\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)","\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)","\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)","\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)","\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)","\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)","\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:707)","\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)","\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)","\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:821)","\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1685)","\tat de.interactive_instruments.etf.webapp.filter.ApiFilter.doFilterInternal(ApiFilter.java:89)","\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)","\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)","\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)","\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)","\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)","\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)","\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)","\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)","\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)","\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)","\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)","\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)","\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)","\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)","\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)","\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)","\tat org.eclipse.jetty.server.Server.handle(Server.java:517)","\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)","\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)","\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)","\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)","\tat org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)","\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)","\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)","\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)","\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)","\tat java.lang.Thread.run(Thread.java:745)"]}

If I run the above WMS view service directly on the INSPIRE validator then I do get the result of the test run.

Also, I see that according to your swagger API 4. Manage Test Runs documentation, we should also receive "error": "Error message" in case of Internal error - 500 but we do not get any such human readable error message but only the stacktrace with timestamp and the url. It would be great to get such a human readable error response in these scenarios as these scenarios are frequent and happens during the first run for the tests.

Please let me know if you need any further support to verify the issue.

Attaching logs from etf service for your reference.
etf-5f5c9f976d-f6qx5.log

Looking forward to your feedback.

@jonherrmann
Copy link
Collaborator

jonherrmann commented Sep 12, 2022

Since the last version the stacktrace is muted by default. Use the property etf.stacktrace.show = true in the etf-config.properties to enable it. (INSPIRE Validator still uses v2.0, overlooked stacktrace part)

The framework provides certain functionalities to avoid these kind of NullPointerExceptions. However, there are some test suites (i.e. the INSPIRE WMS ETS) that do not make use of the framework functionalities and then these errors occur due to their own implementations. Since this cannot be fixed in the framework, it is best to report the NPEs to the INSPIRE helpdesk.

If I run the above WMS view service directly on the INSPIRE validator then I do get the result of the test run.

This information indicates that there is a problem with your INSPIRE validator-specific deployment. So, from my point of view, there are two issues: 1. NPEs in general should not be thrown by the ETS and 2. there is a problem with local deployment.

@jonherrmann
Copy link
Collaborator

jonherrmann commented Sep 13, 2022

I overlooked the stacktrace part and misclassified the error thing. However, please report the problem to the INSPIRE helpdesk first, as I guess it is related to the SoapUI ETS.

@kapil-agnihotri
Copy link
Author

Thanks a lot @jonherrmann for your feedback. As proposed by you, I have created an issue on INSPIRE helpdesk GitHub page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants