[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
Germany

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

Registered Office: Wiesbaden/Germany, Court of Registration: Wiesbaden, HRB
10000
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 
             rian.jirschik=lin                                             
             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                                              
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           




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>/145.225.92.10:445] timedout waiting for response to
>
Trans2FindFirst2[command=SMB_COM_TRANSACTION2,received=false,errorCode=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=2048,pid=40562,uid=2048,mid=9,wordCount=15,byteCount=29,totalParameterCount=28,totalDataCount=0,maxParameterCount=10,maxDataCount=65535,maxSetupCount=0,flags=0x00,timeout=0,parameterCount=28,parameterOffset=66,parameterDisplacement=0,dataCount=0,dataOffset=94,dataDisplacement=0,setupCount=1,pad=1,pad1=0,searchAttributes=0x16,searchCount=200,flags=0x00,informationLevel=0x104,searchStorageType=0,filename=\pool\]

>       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.

Mike

--
Michael B Allen
PHP Active Directory Kerberos SSO
http://www.ioplex.com/



More information about the jcifs mailing list