You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Serge Merzliakov (JIRA)" <ji...@apache.org> on 2009/12/22 11:43:40 UTC
[jira] Created: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
"preMove" option creates unwanted .camel directory
--------------------------------------------------
Key: CAMEL-2309
URL: https://issues.apache.org/activemq/browse/CAMEL-2309
Project: Apache Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.1.0
Environment: OS X 10.6
Windows 7
JDK 1.6.16, 1.6.17
Reporter: Serge Merzliakov
Priority: Minor
Given the following Camel context to copy a text file to a JMS queue
<camel:camelContext id="camel">
<camel:route id="file-to-jms">
<camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
<camel:to uri="activemq:queue:dest"/>
</camel:route>
</camel:camelContext>
I noticed that the "preMove" attribute puts the file in:
./before/.camel/FILE-moved.TXT
instead of what I expected:
./before/FILE-moved.TXT
the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Serge Merzliakov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56625#action_56625 ]
Serge Merzliakov commented on CAMEL-2309:
-----------------------------------------
I have tried on both Windows 7 and OS X 10.6 and issue still occurs. I have reviewed the unit tests Claus wrote and they are the same as mine. Changing JMS endpoint to other type makes no difference.
I switched on debug logging (on Windows) and noticed that the file appears to be moved to /before directory but then later moves it to /before/.camel by the "GenericFileRenameProcessStrategy". Here is the debug log:
2009-12-23 09:35:53,152 - DEBUG {GenericFileRenameProcessStrategy} - Renaming file: GenericFile[file1.txt] to: GenericFile[before\file1-moved.txt]
2009-12-23 09:35:53,152 - DEBUG {FileUtil} - Tried 1 to rename file: C:\dev\CamelSquared\resource\test\runtime\file1.txt to: resource\test\runtime\before\file1-moved.txt with result: true
2009-12-23 09:35:53,153 - DEBUG {FileConsumer} - About to process file: GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage with body: resource\test\runtime\before\file1-moved.txt]
2009-12-23 09:35:53,179 - DEBUG {DefaultManagementAgent} - Registered MBean with objectname: org.apache.camel:context=sergepc/camel,type=producers,name=JmsProducer(0x500c954e)
<...JMS Stuff here>
2009-12-23 09:35:53,301 - DEBUG {GenericFileOnCompletion} - Done processing file: GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage with body: hello from file1-SIMPLE]
2009-12-23 09:35:53,302 - DEBUG {FileUtil} - Tried 1 to delete file: C:\dev\CamelSquared\resource\test\runtime\file1.txt.camelLock with result: true
2009-12-23 09:35:53,303 - DEBUG {GenericFileRenameProcessStrategy} - Renaming file: GenericFile[before\file1-moved.txt] to: GenericFile[before\.camel\file1-moved.txt]
2009-12-23 09:35:53,304 - DEBUG {FileUtil} - Tried 1 to rename file: resource\test\runtime\before\file1-moved.txt to: resource\test\runtime\before\.camel\file1-moved.txt with result: true
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2309.
--------------------------------
Resolution: Working as Designed
Fix Version/s: 2.2.0
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.2.0
>
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56616#action_56616 ]
Claus Ibsen commented on CAMEL-2309:
------------------------------------
I have created an unit test using your preMove and it works for me
http://svn.apache.org/viewvc?rev=893163&view=rev
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56610#action_56610 ]
Claus Ibsen commented on CAMEL-2309:
------------------------------------
Works for me on trunk with OS X. Also the Spring XML variation.
Have you tried on both OS X and Windows 7?
Can you try with 2.2-SNAPSHOT? even though I cannot recall any important fixes in this area.
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56609#action_56609 ]
Claus Ibsen commented on CAMEL-2309:
------------------------------------
I suspect its the XML variation that messes up with ${. It should work when using regular Java DSL route
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2309:
----------------------------------
Assignee: Claus Ibsen
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2309) "preMove" option creates unwanted
.camel directory
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56633#action_56633 ]
Claus Ibsen commented on CAMEL-2309:
------------------------------------
The {{preMove}} is just to move it during processing. The {{move}} option still kicks in, and it will by default move it to a {{.camel}} sub directory.
I fail to see a problem.
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (CAMEL-2309) "preMove" option creates
unwanted .camel directory
Posted by "Serge Merzliakov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56625#action_56625 ]
Serge Merzliakov edited comment on CAMEL-2309 at 12/22/09 10:54 PM:
--------------------------------------------------------------------
I have tried on both Windows 7 and OS X 10.6 and issue still occurs. (Have not tried 2.2 snapshot yet) I have reviewed the unit tests Claus wrote and they are the same as mine. Changing JMS endpoint to other type makes no difference.
I switched on debug logging (on Windows) and noticed that the file appears to be moved to /before directory but then later moves it to /before/.camel by the "GenericFileRenameProcessStrategy". Here is the debug log:
2009-12-23 09:35:53,152 - DEBUG {GenericFileRenameProcessStrategy} - Renaming file: GenericFile[file1.txt] to: GenericFile[before\file1-moved.txt]
2009-12-23 09:35:53,152 - DEBUG {FileUtil} - Tried 1 to rename file: C:\dev\CamelSquared\resource\test\runtime\file1.txt to: resource\test\runtime\before\file1-moved.txt with result: true
2009-12-23 09:35:53,153 - DEBUG {FileConsumer} - About to process file: GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage with body: resource\test\runtime\before\file1-moved.txt]
2009-12-23 09:35:53,179 - DEBUG {DefaultManagementAgent} - Registered MBean with objectname: org.apache.camel:context=sergepc/camel,type=producers,name=JmsProducer(0x500c954e)
<...JMS Stuff here>
2009-12-23 09:35:53,301 - DEBUG {GenericFileOnCompletion} - Done processing file: GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage with body: hello from file1-SIMPLE]
2009-12-23 09:35:53,302 - DEBUG {FileUtil} - Tried 1 to delete file: C:\dev\CamelSquared\resource\test\runtime\file1.txt.camelLock with result: true
2009-12-23 09:35:53,303 - DEBUG {GenericFileRenameProcessStrategy} - Renaming file: GenericFile[before\file1-moved.txt] to: GenericFile[before\.camel\file1-moved.txt]
2009-12-23 09:35:53,304 - DEBUG {FileUtil} - Tried 1 to rename file: resource\test\runtime\before\file1-moved.txt to: resource\test\runtime\before\.camel\file1-moved.txt with result: true
was (Author: sergemerz):
I have tried on both Windows 7 and OS X 10.6 and issue still occurs. I have reviewed the unit tests Claus wrote and they are the same as mine. Changing JMS endpoint to other type makes no difference.
I switched on debug logging (on Windows) and noticed that the file appears to be moved to /before directory but then later moves it to /before/.camel by the "GenericFileRenameProcessStrategy". Here is the debug log:
2009-12-23 09:35:53,152 - DEBUG {GenericFileRenameProcessStrategy} - Renaming file: GenericFile[file1.txt] to: GenericFile[before\file1-moved.txt]
2009-12-23 09:35:53,152 - DEBUG {FileUtil} - Tried 1 to rename file: C:\dev\CamelSquared\resource\test\runtime\file1.txt to: resource\test\runtime\before\file1-moved.txt with result: true
2009-12-23 09:35:53,153 - DEBUG {FileConsumer} - About to process file: GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage with body: resource\test\runtime\before\file1-moved.txt]
2009-12-23 09:35:53,179 - DEBUG {DefaultManagementAgent} - Registered MBean with objectname: org.apache.camel:context=sergepc/camel,type=producers,name=JmsProducer(0x500c954e)
<...JMS Stuff here>
2009-12-23 09:35:53,301 - DEBUG {GenericFileOnCompletion} - Done processing file: GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage with body: hello from file1-SIMPLE]
2009-12-23 09:35:53,302 - DEBUG {FileUtil} - Tried 1 to delete file: C:\dev\CamelSquared\resource\test\runtime\file1.txt.camelLock with result: true
2009-12-23 09:35:53,303 - DEBUG {GenericFileRenameProcessStrategy} - Renaming file: GenericFile[before\file1-moved.txt] to: GenericFile[before\.camel\file1-moved.txt]
2009-12-23 09:35:53,304 - DEBUG {FileUtil} - Tried 1 to rename file: resource\test\runtime\before\file1-moved.txt to: resource\test\runtime\before\.camel\file1-moved.txt with result: true
> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
> Key: CAMEL-2309
> URL: https://issues.apache.org/activemq/browse/CAMEL-2309
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.1.0
> Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
> Reporter: Serge Merzliakov
> Assignee: Claus Ibsen
> Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
> <camel:camelContext id="camel">
> <camel:route id="file-to-jms">
> <camel:from uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
> <camel:to uri="activemq:queue:dest"/>
> </camel:route>
> </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
> ./before/.camel/FILE-moved.TXT
> instead of what I expected:
> ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in ./before/FILE-moved.TXT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.