Forum Discussion

smurf667's avatar
smurf667
Occasional Visitor
9 years ago

SoapUI Maven plugin 5.2.1 bug report

We've found that after the SoapUI Maven plugin has run the default ProxySelector in the Java network stack is messed up. Looking at the code it appears that the plugin sets the proxy selector to null (line 186, see e.g. ProxyUtils.java).

 

While not explicitly stated in the JavaDoc, I think it should not be set to null. If SoapUI needs a null value here, it should restore the original proxy selector that was nulled once the plugin finished. With the proxy selector being null, other code running after the plugin fails, e.g. Apache HttpClient 4.5.2 cannot work any more and produces a NullPointerException.

  • ascheman's avatar
    ascheman
    Occasional Visitor

    Is there anything new to this problem?

     

    I am using soapui-maven-plugin 5.3.0 and I was fighting more than half a day with SonarQube problems. SonarQube Plugin starts after SoapUi and failed to connect the server:

     

    Caused by: java.lang.IllegalStateException: Fail to download libraries from server
    at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
    at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
    at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
    ... 30 more
    Caused by: java.lang.NullPointerException: proxySelector == null
    at org.sonarsource.scanner.api.internal.shaded.okhttp.Address.<init>(Address.java:77)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.createAddress(HttpEngine.java:1036)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.HttpEngine.<init>(HttpEngine.java:180)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponse(RealCall.java:232)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
    at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:57)
    at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:113)
    at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:98)
    at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78)

     

     

    It turned out that the error only occurs when I have a soapui-settings.xml (without any proxy settings). I could not even override the proxy params with explicit <soapuiProperties> in the Maven plugin configuration.

     

    I would expect the following:

    - Explicit settings in the Maven plugin configuration should override settings from a settings file!

    - If neither explicit settings or a settings file is provided, system settings should be used (at least for Proxies)

    - Switching on debug output should report used settings!

    - If the SOAP UI plugin (or SOAP UI itself) is changing any default (proxy settings) it should report this as a log entry (at least when run with debug output/Maven -X flag)

    - The SOAP UI should reset to the former state when finishing