DZone Forums
Go Back   DZone Forums > Community > Languages & Frameworks > Java
Reload this Page TransportException in applet reloading
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Sep 2008
Question TransportException in applet reloading - 09-13-2008, 07:25 AM

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.TransportException: Transport1[0.0.0.0<00>/172.16.2.1:445] timedout waiting for response to Trans2QueryPathInformation[command=SMB_COM_TRANSACTION2,received=false,errorC ode=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=1,p id=7121,uid=100,mid=224,wordCount=15,byteCount=103 ,totalParameterCount=102,totalDataCount=0,maxParam eterCount=2,maxDataCount=40,maxSetupCount=0,flags= 0x00,timeout=0,parameterCount=102,parameterOffset= 66,parameterDisplacement=0,dataCount=0,dataOffset= 168,dataDisplacement=0,setupCount=1,pad=1,pad1=0,i nformationLevel=0x101,filename=\TEST_AUG18-9780123699999\Latex-P369999\Ch01-v4]
at jcifs.smb.SmbTransport.send(SmbTransport.java:589)

my code is :

Code:
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..................
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Applet in Dynamic Web Project in eclipse armali Java 1 10-10-2008 05:12 PM
IllegalThreadStateException in applet using SwingWorker? randy ortan Java 1 09-26-2008 08:48 AM
Applet to upload files and folder over HTTP jfileupload Java 2 03-11-2008 05:29 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com