java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Jeffrey Rajan
, 1 year ago
Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.lang.String)' on a null object reference
at jcifs.smb.NtlmPasswordAuthentication.nTOWFv2(NtlmPasswordAuthentication.java:212)
at jcifs.ntlmssp.Type3Message.(Type3Message.java:232)
at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:130)
at org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcessor.java:295)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:414)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:492)
at org.ksoap2.transport.NtlmTransport.call(NtlmTransport.java:114)
at org.ksoap2.transport.NtlmTransport.call(NtlmTransport.java:92)
at org.ksoap2.transport.Transport.call(Transport.java:261)
at obs.ksoap2.MainActivity$BGTask.getResponse(MainActivity.java:190)
at obs.ksoap2.MainActivity$BGTask.doInBackground(MainActivity.java:212)
at obs.ksoap2.MainActivity$BGTask.doInBackground(MainActivity.java:46)
at android.os.AsyncTask$2.call(AsyncTask.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.