[jcifs] jcifs-1.2.1 Exception

Michael B Allen mba2000 at ioplex.com
Fri Jul 8 17:42:39 GMT 2005

On Fri, 8 Jul 2005 09:18:51 -0700 (PDT)
Kevin Wunderlich <kwunderlich at yahoo.com> wrote:

> I am currently using jcifs-1.1.9 without any issues. 
> However, I decided to switch to jcifs-1.2.1 to try it
> out and noticed that I now get the following message
> in code that worked fine with 1.1.9.  Here is the
> operation I was performing:
> SmbFile logDirectory = new
> SmbFile("smb://CORP;blah:blah@aserver/ashare$/");
> jcifs.smb.SmbException: 
> jcifs.util.transport.TransportException
> java.net.SocketException: Invalid argument or cannot
> assign requested address
> 	at java.net.PlainSocketImpl.socketConnect(Native
> Method)
> 	at
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

This is a low-level socket error and has nothing to do with jCIFS other
than the fact that 1.2.x now tries port 445 first and falls back to
139. Try "smb://CORP;blah:blah@aserver:139/ashare$/". Do you have a

This might have to do with a bug that was reported about what types of
socket exceptions are being caught in the transport layer that determine
when to "fall back" to trying 139. I would think this should be one of
them but if not it's a bug and should be fixed.

I will add this to my "Processing" folder for futher examination.


More information about the jcifs mailing list