payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
883 stars 307 forks source link

Bug Report: NullPointerException in WebServiceTesterServlet / FISH-9803 #6968

Open robelcik opened 1 month ago

robelcik commented 1 month ago

Brief Summary

org.glassfish.webservices.monitoring.WebServiceTesterServlet.wsImport() does not populate wsimportArgs[9] which causes NullPointerException in WsimportTool.run().

Code: https://github.com/payara/Payara/blob/b161a0c4fcb3ebd26f79f110408f4bc3b5deb01e/appserver/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/monitoring/WebServiceTesterServlet.java#L549-L552

Related commit: https://github.com/payara/Payara/commit/321c088fb2bd003ca97c34aa0febe7476ea491cd#diff-eadcbc7652f76beffdef81b64d24379fc19ef8d8f668eb4bf6f05b0400988a0d

Expected Outcome

Tester works.

Current Outcome

java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "arg" is null
    at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:164)
    at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:158)
    at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsimport(WSToolsObjectFactoryImpl.java:35)
    at com.sun.tools.ws.spi.WSToolsObjectFactory.wsimport(WSToolsObjectFactory.java:63)
    at org.glassfish.webservices.monitoring.WebServiceTesterServlet.wsImport(WebServiceTesterServlet.java:558)
    at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:472)
    at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:177)
    at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:116)
    at org.glassfish.webservices.JAXWSServlet.doGet(JAXWSServlet.java:212)
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527)
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1554)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:259)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:166)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:757)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:158)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:372)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
    at java.base/java.lang.Thread.run(Thread.java:840)

Reproducer

Just add ?tester query param to working SOAP web service, like https://your-host/our-app/YourSoapWebService?tester

Operating System

Ubuntu 22.04.5 LTS

JDK Version

Zulu17.52+17-CA

Payara Distribution

Payara Server Full Profile

Elifzeynepedman commented 1 month ago

Hi @robelcik,

I was able to reproduce the issue and I have escalated this to the platform development team as FISH-9803.

Thank you, Elif

adLuk commented 1 month ago

This one should be fixed by https://github.com/payara/Payara/pull/6977