The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

File Not Saving

I'm having a bit of an annoying issue which I cannot figure out.
My goal is that I have an xml file which I am attempting to save. It is doing this saving via FTP, and the file which I am writing to is on a local VM (with Apache and FileZilla enabled on the VM). I can write other files a similar way, but this one file is not working for some reason.

Here is a unit test I have to narrow down the issue:

@Test
publicvoid testUpdateConfigurations(){
ConfigurationsQuery.readConfigurationsFile();// Increment the simulation date by one month
ConfigurationProcess.setMonthData();// Get the weather data for the new month
Map<WeatherType, WeatherEvent> weatherEvents = WeatherQuery.getWeatherEventsForMonth(Database.getSystemDate().get(Calendar.MONTH));// Clear the old weather data and set the new weather data
Database.getWeather().clear();
ConfigurationProcess.setWeatherData(weatherEvents);
logger.info(SimulationDatabase.getWeatherEventsForMonth().toString());// Set the new simulation dates
ConfigurationProcess.setSimDates();Assert.assertTrue(UpdateDatabaseQuery.updateConfigurations());}

I am not getting any exceptions thrown or error messages in the log, and the test passes successfully. The file is just not being updated. Does anyone have any thoughts? I know there is a lot here, so please ask questions if you need something clarified.

NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.

Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Re: File Not Saving

EDIT:
Here is a list of things I've tried so far to debug the issue:
1. Remove the old file and ran again to see if the file would be created: the test still passed, but the file was not created
2. Tested against the real server to see if it was a problem with my VM: the test still passed, but the file on the real server was not changed
3. Added a second transform which prints to the console instead of a file, by changing the tranform's Result parameter to System.out: the xml file is successfully printed to the console correctly, which proves there is no issue with the xml object or the transforming mechanism. Still no change to the file.
4. Attempted to flush the output stream before closing it: the test still passed, but the file was not changed

NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.

Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Re: File Not Saving

So after banging my head against the wall for like a week over this, I found out what happened. The url I was using was the http address to the file, not the ftp address which I had forgotten that I needed to use, lol. So...this is now resolved, and I feel like an idiot.

NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.

Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/