-
1. Re: Jboss ESB - FS provider strange issue
beve Feb 12, 2009 9:11 PM (in response to srufus)Hi,
Is this a problem with ESB 4.4 or am I missing something in the configuration ?
Yes there seems to be a change in the code and I've been able to reproduce this issue. I'll look into this and hopefully post back with a solution.
Can you confirm that you are seeing the following in the server.log:2009-02-13 02:52:28,986 DEBUG [org.jboss.soa.esb.util.FileUtil] Unable to rename file '/opt/jboss/esb/trunk/product/samples/quickstarts/helloworld_file_action/build/dirs/input/test.dat.esbInProcess' to '/opt/jboss/esb/trunk/product/samples/quickstarts/helloworld_file_action/build/dirs/output/test.dat.esbDone'. '/opt/jboss/esb/trunk/product/samples/quickstarts/helloworld_file_action/build/dirs/output/test.dat.esbDone' already exist.
Apologies for this.
Regards,
/Daniel -
2. Re: Jboss ESB - FS provider strange issue
srufus Feb 12, 2009 11:52 PM (in response to srufus)Hi Daniel,
This is the log statement I see on my server log :2009-02-13 10:07:20,282 DEBUG [org.jboss.soa.esb.util.FileUtil] Unable to rename file 'C:\abc\FileA.xml.esbInProcess' to 'C:\abc\processed\FileA.xml.esbDone'. 'C:\abc\processed\FileA.xml.esbDone' already exist. 2009-02-13 10:07:20,282 DEBUG [org.jboss.soa.esb.util.FileUtil] Unable to rename file
Please let me know how to resolve this.
Thanks in advance,
srufus -
3. Re: Jboss ESB - FS provider strange issue
beve Feb 13, 2009 12:38 AM (in response to srufus)I've created a jira for this here: http://jira.jboss.org/jira/browse/JBESB-2401
About the options you have for this would be:
1. If you have a support contract you can request a patch which will be provided for you.
2. Update the jbossesb-rosetta.jar with the version of org.jboss.soa.esb.util.FileUtil.class from 4.3.
Regards,
/Daniel -
4. Re: Jboss ESB - FS provider strange issue
srufus Feb 13, 2009 1:56 AM (in response to srufus)Thanks Daniel !
srufus -
5. Re: Jboss ESB - FS provider strange issue
sem Feb 13, 2009 5:00 AM (in response to srufus)Is it possible instead of rewriting FileA.esbInProcess in process directory configure JBossESB to create file like FileA.esbInProcess.1 to keep track of all the files processed by ESB?
thanks -
6. Re: Jboss ESB - FS provider strange issue
srufus Feb 16, 2009 12:31 PM (in response to srufus)Hi Daniel,
I have replace the FileUtil.class in jbossesb-rosetta.jar but I still face the issue.
Are there any other files which need replacement too ?
Thanks in advance,
srufus -
7. Re: Jboss ESB - FS provider strange issue
beve Feb 16, 2009 9:01 PM (in response to srufus)Hi,
Are there any other files which need replacement too ?
no that is the only file that I updated when I tested this. If you send me your jbossesb-rosetta.jar I'll take a look.
Regards,
/Daniel -
8. Re: Jboss ESB - FS provider strange issue
jbossisgr8 Feb 17, 2009 3:03 PM (in response to srufus)I think this is a bug which creeped in because of
https://jira.jboss.org/jira/browse/SOA-1024
https://jira.jboss.org/jira/browse/JBESB-2079
And these talk about changes to "FileGatewayListener.renameFile()" where this method no longer delete the file for renaming.
This holds good in case of multiple instances of listeners looking at the same location, but if only one listener is looking at a destination then if the files are not deleted then this issue arises.
Is it possible to give a naming convention like ".esbdone.1" and ".esbdone.2" etc... though i doubt that -
9. Re: Jboss ESB - FS provider strange issue
beve Feb 17, 2009 5:02 PM (in response to srufus)Hi Guys.
I've reopened https://jira.jboss.org/jira/browse/JBESB-2079 to make sure that the issues here are addressed.
jbossisgr8: Thanks for point out those jiras. I'll double check this issue with Kevin when he gets back.
srufus: Did you have a chance to send me your jbossesb-rosetta.jar and I'll take a look.
sem: With 4.x I'm not sure if this is possible. I'll need to look into this. You can always create a feature request for this.
Thanks for your feeback on this!
Regards,
/Daniel -
10. Re: Jboss ESB - FS provider strange issue
srufus Feb 18, 2009 1:41 AM (in response to srufus)Hi Daniel,
I think I had tested with the wrong version of the jar.
The good news is that the jar which has the FileUtil from 4.3 is working fine.
Thanks a lot for your help.
Thanks,
srufus -
11. Re: Jboss ESB - FS provider strange issue
kconner Feb 25, 2009 10:55 AM (in response to srufus)There was never any intention to allow a copy to overwrite an existing file. The fact that it allowed it was a bug and checking was added to tighten this up.
Why is this something you need to use? -
12. Re: Jboss ESB - FS provider strange issue
kconner Feb 25, 2009 11:21 AM (in response to srufus)BTW The reason this was a bug is that it was possible to have multiple threads attempt to process the same message. Having all but one fail prevents this, especially across different VMs.
-
13. Re: Jboss ESB - FS provider strange issue
mccloud Aug 26, 2009 10:32 AM (in response to srufus)Hi Kevin,
I can understand that this behavior (overwriting files in the output dir) was a bug. However, the current behavior is rather strange as well. I tried the helloworld file action quickstart, and this is what happens when adding the same file, say 'testFile.dat' to the input dir.
1) On the first attempt, the file gets picked up by JBoss-ESB, enters the action pipeline, file is renamed to 'testFile.dat.esbWorking' and the actions are processed. After processing, the file is moved to the post-directory and renamed to 'testFile.dat.sentToEsb'.
2) On the second attempt, the 'testFile.dat' gets picked up by th ESB, enters the action pipeline, the file is renamed to 'testFile.data.esbWorking' and the actions are processed. After processing, the ESB tries to move the file to the output dir, but is unable to do so because this would overwrite the file created in our previous step. So the file remains in the input directory as 'testFile.dat.esbWorking'.
3) On the third attempt, 'testFile.dat' isn't picked up anymore because there is still a 'testFile.dat.esbWorking' present in the input dir from our second attempt.
What I don't understand is why:
a) I don't see an error in my error log on the second attempt.
b) On the second attempt, the actions get processed although it will be impossible to move the message to the output dir.
I do understand why it happens, but I don't think that this is desired behavior. I would expect that either the message doesn't get processed at all on the second attempt or that, after processing, it wouldn't block the next file. So, either support processing multiple files with the same name, or don't support it. Currently actions get processed on the first and second attempt.