Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#637 NullPointerException when authenticating proxy

open
nobody
general (369)
7
2014-06-16
2012-09-03
JW
No

Hi,

We cannot authenticate to proxy. We use BASIC authentication, but I can see in logs:
"Fri Aug 31 10:48:44 CEST 2012:INFO:www-corporate-proxy.com:80 requires Windows authentication"

We should use BASIC authentication and have "Proxy-Authorization: Basic xxxxxx" header sent in the proxy request, There is no domain name as part of username or in any other place. Why its presuming that we need NTLM authentication?

This uis working in 4.0.1.

On the end we have this NullPointerException :

Fri Aug 31 10:48:44 CEST 2012:ERROR:Exception in request: java.lang.NullPointerException
Fri Aug 31 10:48:44 CEST 2012:ERROR:An error occured [java.lang.NullPointerException], see error log for details
Fri Aug 31 10:48:44 CEST 2012:INFO:Error getting response for [SPMbind.HotelAvail:availabilityRQ]; java.lang.NullPointerException
Fri Aug 31 10:48:44 CEST 2012:ERROR:java.lang.NullPointerException java.lang.NullPointerException
at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:175)
at org.apache.http.impl.auth.NTLMEngineImpl.convertDomain(NTLMEngineImpl.java:188)
at org.apache.http.impl.auth.NTLMEngineImpl.access$500(NTLMEngineImpl.java:45)
at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.<init>(NTLMEngineImpl.java:766)
at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:128)
at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1298)
at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:125)
at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:124)
at org.apache.http.client.protocol.RequestProxyAuthentication.process(RequestProxyAuthentication.java:113)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.preProcess(HttpClientSupport.java:106)
at org.apache.http.impl.client.DefaultRequestDirector.createTunnelToTarget(DefaultRequestDirector.java:830)
at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:739)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:565)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:236)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:345)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:242)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Discussion

  • JW
    JW
    2012-09-03

    • priority: 5 --> 7
     
  • JW
    JW
    2012-09-03

    This is blocker for us - we still use 4.0.1 due to proxy issues in latest releases.

     
  • Have you tried to check the "Authenticate Preemptively" flag in the http preferences?

     
  • JW
    JW
    2012-09-03

    Hi dahankzter,

    of course we did, "Authenticate Preemptively" flag is checked.

     
  • Ok, thanks for reporting this.

    We are delegating authentication to HttpClient but it seems something goes wrong anyway.

    I can't really give an eta as to when it can be fixed, sorry. It is added to our bug tracker so at some point we will fix it. No one else has reported a similar issue to my knowledge yet.

     
  • JW
    JW
    2012-09-03

    Thanks, hope to hear from you soon. As I said we must use old version 4.0.1 which is the last version doing the proxy job well.

    And it's true - I might be the first reporting this. NullPointerException came after fixing ClassCastException which was a pain - fix is available in nightly build (issue 3563333 in SF). When using regular 4.5.1 you will never see it. Please check this before releasing 4.5.2.

     
  • Can you try the latest nightly build?

     
  • meotau
    meotau
    2014-06-16

    from 5.0.0
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "POST http://prgen15.tmdev:5000/messaging/ HTTP/1.1[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "SOAPAction: ""[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "Authorization: Basic XXX[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "Content-Length: 1616[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "Host: prgen15.tmdev:5000[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "Proxy-Connection: Keep-Alive[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">[\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "[0x9]<SOAP-ENV:Header/>[\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "[0x9]<SOAP-ENV:Body>[\n]"
    ...
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "[0x9]</SOAP-ENV:Body>[\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:>> "</SOAP-ENV:Envelope>[\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "HTTP/1.1 407 Proxy Authentication Required[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Mime-Version: 1.0[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Date: Mon, 16 Jun 2014 16:55:01 CEST[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Content-Type: text/html[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Proxy-Authenticate: NTLM[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Connection: close[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Proxy-Connection: close[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "Content-Length: 2120[\r][\n]"
    Mon Jun 16 16:54:59 CEST 2014:DEBUG:<< "[\r][\n]"

    Mon Jun 16 16:54:59 CEST 2014:ERROR:java.lang.NullPointerException
    java.lang.NullPointerException
    at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:175)
    at org.apache.http.impl.auth.NTLMEngineImpl.convertDomain(NTLMEngineImpl.java:188)
    at org.apache.http.impl.auth.NTLMEngineImpl.access$500(NTLMEngineImpl.java:45)
    at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.<init>(NTLMEngineImpl.java:766)
    at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:128)
    at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1298)
    at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:125)
    at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:124)
    at org.apache.http.client.protocol.RequestProxyAuthentication.process(RequestProxyAuthentication.java:113)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
    at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.preProcess(HttpClientSupport.java:106)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:452)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:247)
    at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:362)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:324)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:237)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:127)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)