[jcifs] java.io.IOException: Failed to establish session

Adam Morgan adam.morgan at Q1Labs.com
Fri Jul 9 07:25:55 MDT 2010


Thank you for the response Mike.  However, I'm not sure this will fix my issue.  This will just log the exception to STDERR unless I'm mistaken.  Is there no way to pass the exception up the stack to my code?  Else there's no graceful way to handle the error. 

Thoughts?

Adam


-----Original Message-----
From: Michael B Allen [mailto:ioplex at gmail.com] 
Sent: Thursday, July 08, 2010 5:11 PM
To: Adam Morgan
Cc: jcifs at lists.samba.org
Subject: Re: [jcifs] java.io.IOException: Failed to establish session

Hi Adam,

That is indeed a mistake. The code should read:

243                         if (log.level >= 2)
244                             ex0.printStackTrace(log);

I have adjusted this in my local copy and it will be included in the
next release.

Thanks for the feedback.

Mike

On Wed, Jul 7, 2010 at 11:03 AM, Adam Morgan <adam.morgan at q1labs.com> wrote:
> Hello
>
>
>
> I'm running into an issue related to network connectivity.  We've setup a
> windows box with samba and are connecting successfully with a client.  We
> have a script running on the windows box to periodically turn off the
> network adapter.  This is resulting in an exception being written to STDOUT
> by the jcifs library, but the issue is never elevated to our code so we
> cannot handle it gracefully (ie try a reconnect).  We're not doing anything
> funky with configuration, just using the API in vanilla mode.
>
>
>
> Here's the exception:
>
>
>
> java.io.IOException: Failed to establish session with
> 0.0.0.0<00>/172.16.30.183
>
>     at jcifs.smb.SmbTransport.ssn139(SmbTransport.java:230)
>
>     at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:247)
>
>     at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:309)
>
>     at jcifs.util.transport.Transport.run(Transport.java:232)
>
>     at java.lang.Thread.run(Thread.java:619)
>
>
>
> I see in jcifs.util.transport.Transport, line 243, that the exception is
> being printed to STDOUT.
>
>
>
> Can u explain why this exception isn't passed on up thru to the code that is
> using the API so we can handle it gracefully?  I've seen other timeout
> exceptions that DO get passed up the chain so what might be making this one
> not get passed up?
>
>
>
> Thanks
>
>
>
> Adam



-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list