senthil12345 0 Newbie Poster

hi all,
i had developed an applet. This applet having one frame class. This applet is called inside a jsp page.The Process of this page is copying files from one folder to another folder in server. Actually this process is working fine in first time. but the problem is i am closing the Applet window not closing the browser. if i reload that applet means the applet is loading but when i am copying a file from SAMBA server then it throw an Exception like:

The Exception is====> jcifs.smb.SmbException:
jcifs.util.transport.TransportExceptio... Transport1[0.0.0.0<00>/172.16.2.1:445] timedout waiting for response to Trans2QueryPathInformation[command=SMB_C... ode=0,flags=0x0018,flags2=0xC003,signSeq... id=7121,uid=100,mid=224,wordCount=15,byt... ,totalParameterCount=102,totalDataCount=... eterCount=2,maxDataCount=40,maxSetupCoun... 0x00,timeout=0,parameterCount=102,parame... 66,parameterDisplacement=0,dataCount=0,d... 168,dataDisplacement=0,setupCount=1,pad=... nformationLevel=0x101,filename=\TEST_AUG...
at jcifs.smb.SmbTransport.send(SmbTransport...
my code is :

String sourceurl="smb://" + serverusername+":" + serverpassword+"@" + serverip + "/" + filename ; //source file path in samba server 
String destinationurl="smb://" + serverusername+":" + serverpassword + "@" + serverip + "/" + servernewfolder + "/" + filename; // copy file to already available folder 
SmbFileInputStream in = new SmbFileInputStream(sourceurl);
SmbFileOutputStream out = new SmbFileOutputStream(destinationurl);
if((in != null) && (out != null)) 
{
System.out.println("file copy");
out = new SmbFileOutputStream(destinationurl);
byte[] buf1 = new byte[1024];
int len1; 
while((len1 = in.read(buf1)) > 0)
{
out.write(buf1, 0, len1);
}
in.close();
in = null;
out.close();
out.flush();
out = null; 
}

can any one solve my problem please..................

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.