[jcifs] exception constructing SmbFileInputStream

Michael B Allen mba2000 at ioplex.com
Wed Mar 17 16:12:47 GMT 2004

Jeff Brown said:
> I am trying to get started with JCIFS and I am having trouble.
> When I construct a SmbFileInputStream, an exception is thrown.  This
> code is running in Tomcat 5 which is installed as a Windows Service on a
> Windows XP machine (I get same problem on Win 2000 machine).  I am
> working with JCIFS 0.8.1.
> // constructing input stream throws exception
> new SmbFileInputStream(smbFile);
> Output...
> INFO: found file?: true
> Mar 17 08:49:10.417 - exception reading from socket input:
> ourmachinename<20>/<dotted ip address here>
> java.io.IOException: no andx command supplied with response
>     at
> jcifs.smb.AndXServerMessageBlock.readAndXWireFormat(AndXServerMessageBlock.java:274)

Very odd. Looks like packets are getting mangled. What type of server is
ourmachinename? Samba, NT, etc? Can you get a packet capture to go with
this [1]? You might try setting jcifs.smb.client.useBatching=false to turn
off batching (ie. andx commands) but I suspect the problem is larger than


[1] http://jcifs.samba.org/capture.html

More information about the jcifs mailing list