URGENT: JAVA FTP problem
Hi,
I am trying to FTP (retreive) the files from external server, that is going through some proxy.
I am using commons-net-1.0.0.jar file to do the FTP (FTPClient)
2 files must be retreived (get) from that box. The local server is UNIX solaris.
It is working fine in BC box and Dev box. The process is able to GET both the files.
But in Production (Primary box), I am able to get only one file, and that is the smaller out of 2. Not getting the larger file.
Program is not throwing any errors either.
Not sure what I need to check or how to resolve this problem.
Any help is greatly appreciated.
There is little improvement from previous time (above mentioned problem)
Now, first time when I run the program, it is working fine and I am getting the files back from external source.
But if I run the program 2nd time (repeatedly) , it is not FTPing the files and program is hanging @ the retreival (FTP retreiveFile() ) part.
i.e. If I run the program after certain gap like 3-4hrs, first time it is working fine. But starts hanging if I run 2nd time.
Do I need to set something.
Please help. Very urgent.
Thanks in advance.
Similar Messages
-
[urgent] Java Serious Problem
Hello,
I've a very serious problem after installing Java. After the installation, the program asked me to restart my computer. After doing so, only my wallpaper can be seen. The taskbar, icons and other programs that will always startup automatically did not appear.
I opened Task Manager, closed and opened explorer.exe, then all the things came out. However, my antivirus, firewall etc did not startup as usual. I proceed on to uninstall Java and did a restart. The same problem appears again.
I called Microsoft and they told me to call Sun Microsystems instead. Sun Microsystems told me that they don't have technical support for the freeware Java.
I would like to know how can I solve this problem? Please help.hmm....
1) Where did you download from?
2) If you have active desktop enabled - what ie version are you running... the only change that a new jvm install affects as far as ms_w? is concerned is the jvm itself... nothing else.....
?? -
Java FTP client do not work in Solaris 10
We just upgrade our Solaris 8.0 system to Solaris10. A java FTP client don't work anymore when I try to download a remote file. It worked nicely in Solaris8. Specifically, this java program is using JDK FtpClient, the command that downloading a file is something like this:
TelnetInputStream in = ftpClient.get(remotefilename);
However, I still can send a file to a remote machine. Anyone knows this?
Thnak you very much!Hello Community,
the problem is solved. The VM on the workstation is very slow. The Java EE server use more than one hour to start. No problem with the hardware key or anything else, only a problem of my patience. It seems that the configuration file of the VM stores special entrys of the basic physical machine to run optimal. And which is optimal for the notebook is not optimal for the workstation.
Cheers
Stefan
Edited by: Stefan Schnell on Mar 4, 2008 2:10 PM -
Java ftp server which can use LDAP, how to integrate with WLS' implementation of LDAP?
Howdy.
I'm setting up a java ftp server
(http://www.mycgiserver.com/~ranab/ftp/index.html) which is capable of using
LDAP for it's user security. I would like to integrate this ftp server with
wls' implementation of LDAP so I only have to admin one user list.
Does wls put it's user list in the LDAP or in it's own proprietary setup? I
tried playing around with it, but the users don't seem to appear in the JNDI
tree. Is this where the LDAP stuff is located? I thought it was in there?
If it's in it's own setup, is there a way to propagate the users to LDAP?
If these look like newbie Q&A, I guess they kind of are, I'm new to LDAP.
Thanks for any input you might have.Peter,
If you are talking about using the embedded LDAP server in WLS 7.0 for this purpose
I think you are going done the wrong path.
Look at the following URL on how to use an external LDAP server for your custom
application
http://e-docs.bea.com/wls/docs70/secmanage/realm.html#1172008
Chuck Nelson
DRE
BEA Technical Support -
How to cancel downloading in JAVA FTP?
I tried to write a java ftp client to transfer files within our network. One of very usefully function I want to add is to cancel the transfer while files
are downloading or uploading. I can do this on file uploading by closing "ftpclient.put(filename) methods at anytime, but have trouble on closing "ftpClient.get(remoteFilename)". When I tried to close it by using "in.close()", the program stucked. I even tried to kill the thread, but no luck. Can any one give me a hint? Here is the code:
protected void downloadfile ()
byte [] buffer = new byte[BUFFER_SIZE];
try{
FileOutputStream out = new FileOutputStream(Localfilename);
InputStream in = ftpClient.get(remoteFilename); //downloading
// Write to local file
while (true && !cancelORnot)
// write to file
} catch ( Exception ex) { }
finally
try {
if (out ! = null)
out.close(); // this can be closed at any time
if (in != null)
in.close(); // This one stucked if it is in the middle
// of downloading and can not disconnect to the
// ftp server
catch ( IOException ex)
Thanks!Thank you for replying. I am sorry I forgot including FTP API
information.The FTP API I used is from SUN, JDK, sun.net.ftp.FtpClient. The method is " InputStream in = ftpClient.get(remoteFilename)"and "in.close()" should close downloading. while it is still downloading, in.close() will not work and hang my program on forever. I am just wondering if there is trick to close downloading whenever I want especially in case that network connection is too slow and I want to cancel the job. -
How to cancel downloading process in JAVA ftp?
I tried to write a java ftp client to transfer files within our network. One of very usefully function I want to add is to cancel the transfer while files
are downloading or uploading. I can do this on file uploading by closing "ftpclient.put(filename) methods at anytime, but have trouble on closing "ftpClient.get(remoteFilename)". When I tried to close it by using "in.close()", the program stucked. I even tried to kill the thread, but no luck. Can any one give me a hint? Here is the code:
protected void downloadfile ()
byte [] buffer = new byte[BUFFER_SIZE];
try{
FileOutputStream out = new FileOutputStream(Localfilename);
InputStream in = ftpClient.get(remoteFilename); //downloading
// Write to local file
while (true && !cancelORnot)
// write to file
} catch ( Exception ex) { }
finally
try {
if (out ! = null)
out.close(); // this can be closed at any time
if (in != null)
in.close(); // This one stucked if it is in the middle
// of downloading and can not disconnect to the
// ftp server
catch ( IOException ex)
}How does the ftpClient.get("fileName") work? Also, are you running everything in the EventDispatchThread? If your running everything in the EventDispatchThread then ftpClient.get() will need to finish before an event can be handled.
If thats the case, you could use a SwingWorker to do the downloading so that the Event Thread is available to handle the cancel event. -
Java Session problem while sending mail(using javamail) using Pl/SQL
Hello ...
i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
pls any help.props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
Please format your code when you post the next time, there is a nice 'code' button above the post area.
Mike -
Hi,
I have a little problem with my NAS200. When I try to connect to ftp, I got an error like this:
200 transfer type changed to ascii
227 entering passive mode
Whats wrong ?Hi gieras. Has this worked before? Have you tried to access it using another computer? Possble reason why you can't access it is Windows firewall settings on your computer. I am not really familiar with the error codes that you mentioned but I've read another post here that may help: https://community.linksys.com/t5/Network-Storage/NAS200-FTP-Problem/td-p/120996
-
Hi all,
I was looking for this java programming problem which had to do with a large building and there was some gallons of water involved in it too somehow and we had to figure out the height of the buiding using java. This problem is also in one of the java books and I really need to find out all details about this problem and the solution. NEED HELP!!
Thanks
macYes, it will. The water will drain from the bottom of
the tank until the pressure from the water inside the
tank equals the pressure from the pipe. In other
words, without a pump, the water will drain out until
there is the same amount of water in the tank as in
the pipe The water pressure depends on the depth of the water, not the volume. So once the depth of the water inside the pipe reaches the same depth as the water inside the tank it will stop flowing. This will never be above the height of the tank.
I found this applet which demonstrates our problem. If you run it you can drag the guy up to the top, when water in his hose reaches the level of the water in the tank it will stop flowing out. -
Java Uninstall Problem
This all came about because of a failed uninstall, using Your Uninstaller.
The {Java runtime which is all I want) is not listed now & I tried all the other fix bad uninstall type features, all to no avail.} )
When I DL & run the latest package (jxpiinstall-6u11-fcs-bin-b90-windows-i586-25_nov_2008.exe}
& run it I get:
1st message:
"This software has already been installed on your computer.
Would you like to install it?"
If I say no, it exits.
If I say yes, I get this second message:
:This action is only valid for products that are currently installed."
So Now I have no Java & have no idea what to do.
Any help would be greatly appreciated.
Thanks, Neuromancer23Sorry...after posting it i realized there was a more appropriate forum, of which it took quiet awhile to find.)
Now that I know where to find the forum list I will never double-post again.
I'll close the question if I can -
Please any one tel me about Sun Java security problems
with Desktop applicationHi.
If you're using SSGD 4.41, please download the Admin guide from here:
http://docs.sun.com/app/docs/doc/820-4907
There, at page #41 you'll find useful info concerning "Client Connections and Security Warnings".
Hope this helps,
Rob -
FTP Problems with Dreamweaver 8
The webmaster for the library I work for recently had
difficulty with her computer. She did a system restore from her
discs, and, after that, reinstalled Dreamweaver 8. She sent me an
email to let me know she needed my assistance setting her DW FTP
back up.
While her computer was down I decided to reorganize the
website files. There were dozens of old files and most of the
images and html were scattered throught the main part of the file
tree. She really liked the changes, but, after connecting her to
the site and downloading all the files, a problem arose.
Once she got her laptop back home every time she'd connect to
the FTP she got a group of folders named "Windows, Linux,
Speedtest" and a few others. I contacted our webhost and they told
me this meant she was logging in anonymously. We have our login
name and password in correctly, though, so this shouldn't happen.
No one at our ISP could help me do to them not being familiar with
Dreamweaver.
After playing around with the machine a bit I found that if I
deleted the site from the FTP and re-did it using the same folders
then the first connection was succesful. But, after disconnecting,
the same problem happens again.
I found this article and wondered if it could be causing our
problem.
http://kb.adobe.com/selfservice/viewContent.do?externalId=3491671c
The only thing that makes me think it might not be is the
fact that our login and password stays in the box, but, for some
reason, the FTP is connecting anonymously. Could her doing a
recovery have led to this? Maybe there's an update she needs to
apply that she didn't get after doing the recovery?It's hard to know what kind of things happened with your
moving stuff around
outside of DW.
Suffice it to say that most FTP problems are router/firewall
related. Does
this help at all?
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14834&sliceId=2
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"WesleyThomas" <[email protected]> wrote in
message
news:[email protected]...
> The webmaster for the library I work for recently had
difficulty with her
> computer. She did a system restore from her discs, and,
after that,
> reinstalled
> Dreamweaver 8. She sent me an email to let me know she
needed my
> assistance
> setting her DW FTP back up.
>
> While her computer was down I decided to reorganize the
website files.
> There
> were dozens of old files and most of the images and html
were scattered
> throught the main part of the file tree. She really
liked the changes,
> but,
> after connecting her to the site and downloading all the
files, a problem
> arose.
>
> Once she got her laptop back home every time she'd
connect to the FTP she
> got
> a group of folders named "Windows, Linux, Speedtest" and
a few others. I
> contacted our webhost and they told me this meant she
was logging in
> anonymously. We have our login name and password in
correctly, though, so
> this
> shouldn't happen. No one at our ISP could help me do to
them not being
> familiar
> with Dreamweaver.
>
> After playing around with the machine a bit I found that
if I deleted the
> site
> from the FTP and re-did it using the same folders then
the first
> connection was
> succesful. But, after disconnecting, the same problem
happens again.
>
> I found this article and wondered if it could be causing
our problem.
>
http://kb.adobe.com/selfservice/viewContent.do?externalId=3491671c
>
> The only thing that makes me think it might not be is
the fact that our
> login
> and password stays in the box, but, for some reason, the
FTP is connecting
> anonymously. Could her doing a recovery have led to
this? Maybe there's an
> update she needs to apply that she didn't get after
doing the recovery?
> -
OS X Lion - JAVA SCRIPT PROBLEM
I recently updated from Snow Leopard to OS X Lion. Now I seem to have a JAVA Script problem. Where do I start fixing this issue. I have checked updates etc etc but it seems to be updated. However, when I login to my web site backend, I have a problem. Any advice please?
Would you please write some more details? explain the problem and what web site backend you use. Thanks.
-
Ok here's my situation... I'm having to catch up in my software development class at university, missed a few lessons so now I'm finding it incredibly difficult.
I'm working through a bluej book 'Objects First with Java' and as much as I'd like to sit and work each question out, it is taking me far too long and I'm not gonna manage so this will probably be the first post of many.
So here's where I am
(pg. 110, ex. 4.28)
It's a simple auction program that lets you create a bidder, a lot(something to bid on), an auction and of course the ability to bid.
What I'm being asked...
Add a close method to the Auction class. This should iterate over the collection of lots and print out details of all the lots. You can use either a for-each loop or a while loop. Any lot that has had at least one bid for it is considered to be sold. For lots that have been sold, the details should include the name of the successful bidder, and the value of the winning bid. For lots that have not been sold, print a message that indicates this fact.
import java.util.ArrayList;
import java.util.Iterator;
* A simple model of an auction.
* The auction maintains a list of lots of arbitrary length.
* @author David J. Barnes and Michael Kolling.
* @version 2008.03.30
public class Auction
// The list of Lots in this auction.
private ArrayList<Lot> lots;
// The number that will be given to the next lot entered
// into this auction.
private int nextLotNumber;
* Create a new auction.
public Auction()
lots = new ArrayList<Lot>();
nextLotNumber = 1;
* Enter a new lot into the auction.
* @param description A description of the lot.
public void enterLot(String description)
lots.add(new Lot(nextLotNumber, description));
nextLotNumber++;
* Show the full list of lots in this auction.
public void showLots()
for(Lot lot : lots) {
System.out.println(lot.toString());
* Bid for a lot.
* A message indicating whether the bid is successful or not
* is printed.
* @param number The lot number being bid for.
* @param bidder The person bidding for the lot.
* @param value The value of the bid.
public void bidFor(int lotNumber, Person bidder, long value)
Lot selectedLot = getLot(lotNumber);
if(selectedLot != null) {
boolean successful = selectedLot.bidFor(new Bid(bidder, value));
if(successful) {
System.out.println("The bid for lot number " +
lotNumber + " was successful.");
else {
// Report which bid is higher.
Bid highestBid = selectedLot.getHighestBid();
System.out.println("Lot number: " + lotNumber +
" already has a bid of: " +
highestBid.getValue());
* Return the lot with the given number. Return null
* if a lot with this number does not exist.
* @param lotNumber The number of the lot to return.
public Lot getLot(int lotNumber)
if((lotNumber >= 1) && (lotNumber < nextLotNumber)) {
// The number seems to be reasonable.
Lot selectedLot = lots.get(lotNumber - 1);
// Include a confidence check to be sure we have the
// right lot.
if(selectedLot.getNumber() != lotNumber) {
System.out.println("Internal error: Lot number " +
selectedLot.getNumber() +
" was returned instead of " +
lotNumber);
// Don't return an invalid lot.
selectedLot = null;
return selectedLot;
else {
System.out.println("Lot number: " + lotNumber +
" does not exist.");
return null;
public void close(){
Iterator<Lot> it = lots.iterator();
for(Lot lot : lots){
if(lots.contains(null)){
System.out.println(lot.toString() + " has not been sold.");
}I know my 'close' method is a bit shoddy and doesn't utilise the iterator yet but I tested it and it compiled ok but nothing happened :/
Is the for-each loop a wise move? Ideas would be greatly appreciated! I tried a while loop first but wasn't really getting anywhere. One of my many problems in this is that I don't really understand where the methods I'm calling from are coming from either, I really don't have a good base understanding of the language :( for instance lots.toString() where does the .toString come from, thats an arraylist method then yeah?
I am feeling that the book is going pretty fast, some questions are fairly simple then suddenly I feel like it's never even taught me enough to even work a question out on my own - obviously just starting out at programming though so it may be completely obvious but if you don't know it you don't know it :/
Anyway folks I hope you can help as, like I said, it's pretty important to me and I don't know how the forum works but if I'm the one that will have the power to award the points for an answer then I will deal them out appropriately.
Cheers
Edited by: jpjenkins on Nov 14, 2008 2:00 AMjpjenkins wrote:
Wow what a nice introduction to the forum.
My time management skills are good, thanks for the advice though. We must have a different notion of what the word "good" means...
But how can I be 'all high an mighty' It sounded like you were doing us a favor by handing out some forum/duke points/stars while you are the one looking for help.
when I said I don't know how the forum works, sounds like you've got a complex man, was just trying to let peeps know I was going to be fair.Wow, your assessment of my psychic state is impressive! By studying your two posts here, I conclude you're a lazy twit.
I do apologise however, I wrote this after 3 hours of studying and my stress must have transferred into the post.Then study some more!
To the point: "I tested it and it compiled ok but nothing happened :/ " - I just wanted to know where I had gone wrong in the close method as I expected it to print out a lot that doesn't have a bid on it.
I have worked through the book at a steady pace, I simply don't have the luxury to sit and work out where I had gone wrong in each question, sorry if I misled you into thinking I expected you to do it for me, these aren't necessary questions for me to do, they're just giving me a good grounding for my project which has to be handed in on the 5th of December. Trying to speed my workrate up by getting advice on my shoddy code.
Hope someone can helpI still don't see a specific question. -
Urgent help java security problem
hi,
i am trying to run simple message example in tahiti but all the time i got this error:
java.security.AccessControlException: acces denied (com.ibm.aglets.security.contextPermission atp://mycomputername:4434/@ReplyChild create) java.lang.NullPointerException
please i have to submit this code iknow it is right but what is the problem??why i am getting this error??please helpWell what you are doing is trying to access a local file from an Applet, an operation that won't be permitted by the default applet security model.
I guess what you want is to fetch the file from a directory related to the path of the applet classes. To do this you need to use the URL class and the associated constructors of the ImageIcon class. To form the URL to the image file:
String fileName="warning.gif";
URL codeBase= this.getCodeBase();
URL imageURL= new URL(codeBase, fileName);
ImageIcon warning = new ImageIcon(imageURL);
Maybe you are looking for
-
HT1277 How can I add a second email account to my "Mail" tab on iMac?
All I have managed to do is add a Smartmail box, but that just specifies folders in my yahoo. I want to check my google email using the same icon. Setting both up on my iPhone was super simple, but for the life of me I can't figure it out on my mac.
-
Inserting image to jFrame and save it in a sql database
Hai guys, I have a problem in inseting a image in jfame and save it in database (my sql) does any one have an idea about this task reply me pls thanks bay !
-
Opening new excel file from available Template-Urgent
Hi Friends, I have the functionality like this. I have one excel template. In that i am getting two text files(header and row values) and filling it on the excel file. After that i am doing operation on it. These things i have succeded already. The p
-
Mail address scrambled when replying
Hi, A user in our company has the following problem on his Mac running Yosemite. When replying to specific users the address of these users is changed to an undeliverable address. The users' normal address looks like [email protected], but replying m
-
Hi I am creating a report in Graph View in OBIEE 11g. I was wondering if it is possible to remove the line below the graph title? Thanks!