[jcifs] Null pointer exception in ServerMessageBlock.java

Jake Goulding goulding at vivisimo.com
Wed Jun 21 18:19:58 GMT 2006

I agree with you completely. However, I think I was unclear in my prior 
email... it is actually Jarapac that does this.

On line 88 of RpcTransport.java:
pipe = new SmbNamedPipe(address, (0x2019f << 16) |
                                SmbNamedPipe.PIPE_TYPE_RDWR | 

where address is a String field that has the URL in the format of 

My code was just used as an test case to see what happens.

On a side note, Jarapac also has a debug Hexdump... is development of 
Jarapac still happening? Is this the right list to send comments about it?

Michael B Allen wrote:
> Never put your password in the URL. That's a hack for dirty scripts and
> developers that just want to test something. Either put your credentials
> in a properties file and run the VM like:
>   java -Djcifs.properties=beta.prp MyProgram
> or better still, create an NPA and pass that to the SmbFile constructor:
>   NtlmPasswordAuthentication creds =
>       new NtlmPasswordAuthentication("alpha", "beta", "gamma#");
>   SmbFile file = new SmbFile(url, creds);
> or if you must put your credentials in the URL you must URL encode
> any characters reserved for use within URLs. In particular if you
> have a '#' or a '%' you need to substitute that with the '%xx'
> where 'xx' is the hexadecimal value for that ASCII character like:
>    http://alpha;beta:gamma%23@delta/foo/bar
> Mike
> On Wed, 21 Jun 2006 10:19:28 -0400
> Jake Goulding <goulding at vivisimo.com> wrote:
>> I think I have figured this out, and I believe it has to do with the 
>> discrepancy of URL and URI and how things get encoded...
>> My password has a hash (#) in it. To see what happens, use this test 
>> program:
>> URL a = new URL("http://alpha;beta:gamma#@delta/foo/bar");

Jake Goulding
Software Engineer
Vivísimo, Inc.

"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination
of their C programs."

More information about the jcifs mailing list