[jcifs] Exception when accessing Smb files from an applet which has been Reloaded

Florian.Jirschik at Linde-LE.com Florian.Jirschik at Linde-LE.com
Fri Aug 10 10:09:02 GMT 2007

Hello Michael,

thanks a lot for your hint. Unfortunately I couldn't figure out how to
disconnect the SMB connection.
Are there any code examples?

Kind Regards / Mit freundlichen Grüßen
Florian Jirschik

Linde AG - Linde Engineering Division
Department IE
Dr.-Carl-von-Linde-Str. 6-14
82049 Pullach

Sitz der Gesellschaft: Wiesbaden, Registergericht: Wiesbaden, HRB 10000
Aufsichtsrat: Manfred Schneider (Vorsitzender), Vorstand: Wolfgang Reitzle
Aldo Belloni, Trevor Burt, Georg Denoke, Kent Masters

Registered Office: Wiesbaden/Germany, Court of Registration: Wiesbaden, HRB
Supervisory Board: Manfred Schneider (Chairman), Executive Board: Wolfgang
Reitzle (Chairman),
Aldo Belloni, Trevor Burt, Georg Denoke, Kent Masters

             Michael B Allen                                               
             <miallen at ioplex.c                                             
             om>                                                        To 
             Sent by:                  jcifs at lists.samba.org               
             jcifs-bounces+flo                                          cc 
             de-le.com at lists.s                                     Subject 
             amba.org                  Re: [jcifs] Exception when          
                                       accessing Smb files from an applet  
                                       which has been Reloaded             
             08/09/2007 08:40                                              

On Thu, 9 Aug 2007 17:23:41 +0200
Florian.Jirschik at Linde-LE.com wrote:

> Dear All,
> maybe you can help me with this issue. I've got an Java Applet which
> connects to a SMB ressource to list a shared directory's content.
> It is run in the Sun Applet Viewer. If I start the applet for the first
> time or restart it (a menu entry within the Applet Viewer), everything
> works fine.
> But if I reload the applet, the SMB connection fails with this error
> message after a timeout of 30000 ms:
> jcifs.smb.SmbException:
> jcifs.util.transport.TransportException:
> Transport1[T50559<00>/] timedout waiting for response to

>       at jcifs.smb.SmbTransport.send(SmbTransport.java:585)
>       at jcifs.smb.SmbSession.send(SmbSession.java:239)
>       at jcifs.smb.SmbTree.send(SmbTree.java:109)
>       at jcifs.smb.SmbFile.send(SmbFile.java:695)
>       at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1942)
>       at jcifs.smb.SmbFile.doEnum(SmbFile.java:1658)

Hi Florian,

There's not much I can do about this. Basically the client is trying to
read from the socket but the socket has quietly disappeared. It really
would have been more polite for the Applet viewer to throw a "not
connected" exception or something like that. The only way I can think
of getting around this problem would be to add a disconnect method to
SmbFile and call that in the applet deinitialization routine. Either
that or use the ClassLoader to load a new instance of JCIFS classes
thereby forcing a new transport to be created when the applet reloads.


Michael B Allen
PHP Active Directory Kerberos SSO

More information about the jcifs mailing list