[jcifs] NPE on Win XP Home but not on Pro

Axel Seinsche axel.seinsche at innosystec.de
Fri Aug 25 08:03:09 GMT 2006


Hello list,

I an new in this list and didn't find any thread matching my problem in the
archive. So maybe it was not discussed before, but I hope someone can help
me.

I have written a little demo program to test file access via jcifs library.
This program works fine on my Windows XP Pro (SP2). When I run the program
on Windows XP Home (SP2) I get the following NullPointerException:

Exception in thread "main" java.lang.NullPointerException
        at
jcifs.smb.SmbComSessionSetupAndX.writeParameterWordsWireFormat(SmbComSession
SetupAndX.java:58)
        at
jcifs.smb.AndXServerMessageBlock.writeAndXWireFormat(AndXServerMessageBlock.
java:94)
        at
jcifs.smb.AndXServerMessageBlock.encode(AndXServerMessageBlock.java:65)
        at jcifs.smb.SmbTransport.doSend(SmbTransport.java:402)
        at jcifs.util.transport.Transport.sendrecv(Transport.java:70)
        at jcifs.smb.SmbTransport.send(SmbTransport.java:602)
        at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:269)
        at jcifs.smb.SmbSession.send(SmbSession.java:225)
        at jcifs.smb.SmbTree.treeConnect(SmbTree.java:147)
        at jcifs.smb.SmbFile.connect(SmbFile.java:791)
        at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
        at jcifs.smb.SmbFile.queryPath(SmbFile.java:1167)
        at jcifs.smb.SmbFile.exists(SmbFile.java:1253)
        at FileTester.main(FileTester.java:28)

As the NPE does not occur in my code I think it's related to the differences
in the OS. 

With the Windows Explorer I can access my files from both clients. The
properties I set are the same for both client. These are

java.protocol.handler.pkgs
jcifs.smb.client.username
jcifs.smb.client.password
jcifs.smb.client.tcpNoDelay
jcifs.netbios.cachePolicy (set to -1)
jcifs.netbios.wins

Any idea what's wrong here?

Thanks,
Axel



More information about the jcifs mailing list