You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "raghu.j" <r_...@hotmail.com> on 2010/09/15 00:50:02 UTC

How to specify route to folder with $ in actual name

We have requirement setup a route to a shared drive on NAS and the folder
name on the NAS has name like
# Network Location
edi.error.report.pdf = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
edi.error.report.txt = \\mltpnfs13\EDI$\dev1\XE.TO.ST\

The bean is reporting errors since it is trying to pick everything after $
as variable.
We have tried - \$ - to no luck.

Unfortunately - there is no guarantee where the $ sign will be encountered
in the folder name - client is using this to hide folders on NAS.

Thanks in advance for your help

-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-route-to-folder-with-in-actual-name-tp2839895p2839895.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to specify route to folder with $ in actual name

Posted by "raghu.j" <r_...@hotmail.com>.
Thank you Claus - I will work our team to wait for 2.5.0.
Incidentally we found that using $\ creates the problem but using $/ is a
work-around
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-route-to-folder-with-in-actual-name-tp2839895p2848979.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to specify route to folder with $ in actual name

Posted by Claus Ibsen <cl...@gmail.com>.
I found an issue on the latest version so I created a ticket
https://issues.apache.org/activemq/browse/CAMEL-3128

Are you sure you use Camel 2.0 which is a 1 year old release?
Are you not using Camel 2.3 or 2.4 ?



On Thu, Sep 16, 2010 at 3:13 PM, Claus Ibsen <cl...@gmail.com> wrote:
> You can try defining the endpoint using spring bean style
>
> <bean id="myFileEndpoint" class="org.apache.camel.component.file.FileEndpoint">
>    <property name="fileName" value="\\mltpnfs13\EDI$\dev1\XE.TO.ST\"/>
> </bean>
>
> And then refer to it in the from
>
> <from ref="myFileEndpoint"/>
>
>
>
>
> On Wed, Sep 15, 2010 at 12:50 AM, raghu.j <r_...@hotmail.com> wrote:
>>
>> We have requirement setup a route to a shared drive on NAS and the folder
>> name on the NAS has name like
>> # Network Location
>> edi.error.report.pdf = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
>> edi.error.report.txt = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
>>
>> The bean is reporting errors since it is trying to pick everything after $
>> as variable.
>> We have tried - \$ - to no luck.
>>
>> Unfortunately - there is no guarantee where the $ sign will be encountered
>> in the folder name - client is using this to hide folders on NAS.
>>
>> Thanks in advance for your help
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-route-to-folder-with-in-actual-name-tp2839895p2839895.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: How to specify route to folder with $ in actual name

Posted by Claus Ibsen <cl...@gmail.com>.
You can try defining the endpoint using spring bean style

<bean id="myFileEndpoint" class="org.apache.camel.component.file.FileEndpoint">
    <property name="fileName" value="\\mltpnfs13\EDI$\dev1\XE.TO.ST\"/>
</bean>

And then refer to it in the from

<from ref="myFileEndpoint"/>




On Wed, Sep 15, 2010 at 12:50 AM, raghu.j <r_...@hotmail.com> wrote:
>
> We have requirement setup a route to a shared drive on NAS and the folder
> name on the NAS has name like
> # Network Location
> edi.error.report.pdf = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
> edi.error.report.txt = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
>
> The bean is reporting errors since it is trying to pick everything after $
> as variable.
> We have tried - \$ - to no luck.
>
> Unfortunately - there is no guarantee where the $ sign will be encountered
> in the folder name - client is using this to hide folders on NAS.
>
> Thanks in advance for your help
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-route-to-folder-with-in-actual-name-tp2839895p2839895.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: How to specify route to folder with $ in actual name

Posted by "raghu.j" <r_...@hotmail.com>.
- Camel version (2.0)
- OS (Windows - Windows 2003 Server (64 bit)
- Log of the error reported - I don't have it handy 
- Snippet of Camel route 
<route>
                <from ref="EP_LDNS_XML_REPORT_QUEUE"/>
                <bean ref="reportGenerator"/>
</route>

<bean id="reportGenerator" class="com.edifecs.eip.report.ReportGenerator">
                <property name="reportPathPDF"
value="#{edi.error.report.pdf}"></property>
                <property name="reportPathTXT"
value="#{edi.error.report.txt}"></property>
</bean>


Where the properties are loaded using the fallowing PlaceHolder configurer
<bean id="var"
class="com.edifecs.eip.spring.EnvPropertyPlaceholderConfigurer">
    <property name="placeholderPrefix" value="#{"/>
    <property name="placeholderSuffix" value="}"/>
    <property name="location"
value="file:#{ECRootPath}/TM/ServiceManager/EIPServices/conf/eip-params.properties"/>
  </bean>

Where EnvPropertyPlaceholderConfigurer has the following code:

public class EnvPropertyPlaceholderConfigurer extends
PropertyPlaceholderConfigurer {
    @Override
    public void setLocation(Resource location) {
        try {
            String resolvedLocation =
parseStringValue(location.getURL().toExternalForm(), new Properties(), new
HashSet());
            location = SpringConverters.toResource(resolvedLocation);
        } catch (IOException e) {
            logger.error("Error resolving location: " + location, e);
        }
        super.setLocation(location);
    }
}

-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-route-to-folder-with-in-actual-name-tp2839895p2842208.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to specify route to folder with $ in actual name

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Please read this page how to ask for help
http://camel.apache.org/support

We need more details than you provide here such as
- Camel version
- OS
- Log of the error reported
- Snippet of Camel route
- etc.



On Wed, Sep 15, 2010 at 12:50 AM, raghu.j <r_...@hotmail.com> wrote:
>
> We have requirement setup a route to a shared drive on NAS and the folder
> name on the NAS has name like
> # Network Location
> edi.error.report.pdf = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
> edi.error.report.txt = \\mltpnfs13\EDI$\dev1\XE.TO.ST\
>
> The bean is reporting errors since it is trying to pick everything after $
> as variable.
> We have tried - \$ - to no luck.
>
> Unfortunately - there is no guarantee where the $ sign will be encountered
> in the folder name - client is using this to hide folders on NAS.
>
> Thanks in advance for your help
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-specify-route-to-folder-with-in-actual-name-tp2839895p2839895.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus