You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Abdeslam El Abbassi <ab...@thalesgroup.com> on 2008/01/15 16:32:49 UTC

recursive file polling don't work on linux

Hi,
in windows plate forme the recursive file polling work very well.
but when we deploy in linux plate form, this don't work

here my code :

<file:poller service="ws_eai:fileservice" endpoint="poller" recursive="true"
			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
targetEndpoint="jmsselect" period="1000">

filepoller.path is path to directory as "/opt/dir"

We use servicemix 3.2 version
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533s12049p14841533.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Ok, that was a good idea and it works (btw. I don't need the dependency in
the pom because commons-io is also in smx lib). But I see one problem with
this class because it don't offers support for recursive directories here
the accept()-method from the source:
    public boolean accept(File file) {

        if (file.isDirectory()) {

            return false;

        }

        

        for (int i = 0; i < wildcards.length; i++) {

            if (FilenameUtils.wildcardMatch(file.getName(), wildcards[i])) {

                return true;

            }

        }

        

        return false;

    }

So maybe I use my filter with the extension from before it works but first I
will look if there is another filter in commons-io which offers support for
that.

/Steffen


lhe77 wrote:
> 
> No, the version is ok.
> The error is btw really strange. I can remember we had this issue before
> but 
> I am not sure how to solve it.
> 
> A workaround could be:
> 
> ...
> <beans ...>
> 
> <file:poller service="brockhaus:inbox" 
>                  endpoint="endpoint"
>         	 targetService="brockhaus:transformer"
>                  targetUri="operation:http://brockhaus-
> gruppe.de/products/ProductTransformerService/process"             
>                  file="file:///home/smx/input/products/" 
>                 deleteFile="true"
>                 recursive="true" 
>                 period="10000"
>                 filter="#XMLFilter" />
> 
> <bean id="XMLFilter"
> class="org.apache.commons.io.filefilter.WildcardFilter">
>    <constructor-arg value="*.xml" />
> </bean>
> 
> </beans>
> 
> 
> -- 
> Am Dienstag 23 September 2008 15:35:21 schrieb steff aka sid:
>> Hm don't really works during deployment I got following exception:
>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'org.apache.servicemix.file.FilePollerEndpoint'
>> defined in file
>> [/home/smx/apache-servicemix-3.2.2/data/smx/service-assemblies/BrockhausPro
>>ductsAssembly/version_1/sus/servicemix-file/BrockhausProductsInbox/xbean.xml
>>]: Error setting property values; nested exception is
>> org.springframework.beans.NotWritablePropertyException: Invalid property
>> 'property' of bean class [org.apache.servicemix.file.FilePollerEndpoint]:
>> Bean property 'property' is not writable or has an invalid setter method.
>> Does the parameter type of the setter match the return type of the
>> getter?
>>
>> My configuration was:
>> <file:poller service="brockhaus:inbox" endpoint="endpoint"
>> 	targetService="brockhaus:transformer"
>>
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformer
>>Service/process" file="file:///home/smx/input/products/" deleteFile="true"
>> recursive="true" period="10000">
>> 	<property name="filter">
>> 		<bean class="org.apache.commons.io.filefilter.WildcardFilter">
>> 			<constructor-arg value="*.xml" />
>> 		</bean>
>> 	</property>
>> </file:poller>
>> And in the pom I added:
>> <dependency>
>> 	<groupId>commons-io</groupId>
>> 	<artifactId>commons-io</artifactId>
>> 	<version>1.4</version>
>> </dependency>
>>
>> is there a specific version of commons-io to use?
>>
>> Regards
>> /Steffen
>>
>> steff aka sid wrote:
>> > Ok,
>> > I've read about that but from root directory my solution works so I
>> don't
>> > changed it. Maybe this works better with recursion. Thank you.
>> >
>> > Regards
>> > /Steffen
>> >
>> > lhe77 wrote:
>> >> Actually I never wrote my own filters and in your case it's not needed
>> >> to write
>> >> your own filter because you can use the predefined WildcardFilter from
>> >> commons.io lib.
>> >>
>> >> Just add the dependency to your su's pom.xml and have something like
>> the
>> >> below:
>> >>
>> >>
>> >>  <f:poller
>> >>       service="my:filePoller"
>> >>       endpoint="pollerEndpoint"
>> >>       autoCreateDirectory="true"
>> >>       file="/home/user/myinput/"
>> >>       targetService="..."
>> >>       targetOperation="..."
>> >>       period="10000"
>> >>       recursive="true">
>> >>
>> >>     <property name="filter">
>> >>         <bean class="org.apache.commons.io.filefilter.WildcardFilter">
>> >>             <constructor-arg value="*.xml" />
>> >>         </bean>
>> >>     </property>
>> >>
>> >>   </f:poller>
>> >>
>> >> Lars
>> >>
>> >> Am Dienstag 23 September 2008 14:50:16 schrieb steff aka sid:
>> >>> No, thats not enough :) you have to read the contents of the
>> directory
>> >>> and
>> >>> to check them e.g. with pathname.listFiles() The problem is that it
>> is
>> >>> not
>> >>> possible. To get a result for each file... but I will try it maybe it
>> >>> works
>> >>> as asspected.
>> >>>
>> >>> Regards
>> >>> /Steffen
>> >>>
>> >>> lhe77 wrote:
>> >>> > public class XMLFilter implements FileFilter {
>> >>> >
>> >>> >         public static String XML_FILEEXTENSION = ".xml";
>> >>> >
>> >>> >         public boolean accept(File pathname) {
>> >>> >
>> >>> > 		if (pathname.isDirectory() ||
>> >>> >                     (pathname.isFile() &&
>> >>> >                      strFilename.endsWith(XML_FILEEXTENSION))
>> >>> >                      ) {
>> >>> >                         return true;
>> >>> >                 }
>> >>> >                 return false;
>> >>> >         }
>> >>> > }
>> >>> >
>> >>> > should do the trick.
>> >>> >
>> >>> > Lars
>> >>> >
>> >>> > Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
>> >>> >> public class XMLFilter implements FileFilter {
>> >>> >>
>> >>> >>         public static String XML_FILEEXTENSION = ".xml";
>> >>> >>
>> >>> >>         public boolean accept(File pathname) {
>> >>> >>                 System.out.println(pathname);
>> >>> >>                 String strFilename = pathname.getName();
>> >>> >>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
>> >>> >>                         return true;
>> >>> >>                 }
>> >>> >>                 return false;
>> >>> >>         }
>> >>> >> }
>> >>>
>> >>> -----
>> >>> Brockhaus GmbH
>> >>> COMPETITIVE THROUGH KNOWLEDGE
>> >>>
>> >>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>> >>> http://www.brockhaus-group.com www.brockhaus-group.com
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>> http://www.brockhaus-group.com www.brockhaus-group.com
> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19628151.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by Lars Heinemann <la...@compart.net>.
No, the version is ok.
The error is btw really strange. I can remember we had this issue before but 
I am not sure how to solve it.

A workaround could be:

...
<beans ...>

<file:poller service="brockhaus:inbox" 
                 endpoint="endpoint"
        	 targetService="brockhaus:transformer"
                 targetUri="operation:http://brockhaus-
gruppe.de/products/ProductTransformerService/process"             
                 file="file:///home/smx/input/products/" 
                deleteFile="true"
                recursive="true" 
                period="10000"
                filter="#XMLFilter" />

<bean id="XMLFilter" class="org.apache.commons.io.filefilter.WildcardFilter">
   <constructor-arg value="*.xml" />
</bean>

</beans>


-- 
Am Dienstag 23 September 2008 15:35:21 schrieb steff aka sid:
> Hm don't really works during deployment I got following exception:
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.servicemix.file.FilePollerEndpoint'
> defined in file
> [/home/smx/apache-servicemix-3.2.2/data/smx/service-assemblies/BrockhausPro
>ductsAssembly/version_1/sus/servicemix-file/BrockhausProductsInbox/xbean.xml
>]: Error setting property values; nested exception is
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'property' of bean class [org.apache.servicemix.file.FilePollerEndpoint]:
> Bean property 'property' is not writable or has an invalid setter method.
> Does the parameter type of the setter match the return type of the getter?
>
> My configuration was:
> <file:poller service="brockhaus:inbox" endpoint="endpoint"
> 	targetService="brockhaus:transformer"
>
> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformer
>Service/process" file="file:///home/smx/input/products/" deleteFile="true"
> recursive="true" period="10000">
> 	<property name="filter">
> 		<bean class="org.apache.commons.io.filefilter.WildcardFilter">
> 			<constructor-arg value="*.xml" />
> 		</bean>
> 	</property>
> </file:poller>
> And in the pom I added:
> <dependency>
> 	<groupId>commons-io</groupId>
> 	<artifactId>commons-io</artifactId>
> 	<version>1.4</version>
> </dependency>
>
> is there a specific version of commons-io to use?
>
> Regards
> /Steffen
>
> steff aka sid wrote:
> > Ok,
> > I've read about that but from root directory my solution works so I don't
> > changed it. Maybe this works better with recursion. Thank you.
> >
> > Regards
> > /Steffen
> >
> > lhe77 wrote:
> >> Actually I never wrote my own filters and in your case it's not needed
> >> to write
> >> your own filter because you can use the predefined WildcardFilter from
> >> commons.io lib.
> >>
> >> Just add the dependency to your su's pom.xml and have something like the
> >> below:
> >>
> >>
> >>  <f:poller
> >>       service="my:filePoller"
> >>       endpoint="pollerEndpoint"
> >>       autoCreateDirectory="true"
> >>       file="/home/user/myinput/"
> >>       targetService="..."
> >>       targetOperation="..."
> >>       period="10000"
> >>       recursive="true">
> >>
> >>     <property name="filter">
> >>         <bean class="org.apache.commons.io.filefilter.WildcardFilter">
> >>             <constructor-arg value="*.xml" />
> >>         </bean>
> >>     </property>
> >>
> >>   </f:poller>
> >>
> >> Lars
> >>
> >> Am Dienstag 23 September 2008 14:50:16 schrieb steff aka sid:
> >>> No, thats not enough :) you have to read the contents of the directory
> >>> and
> >>> to check them e.g. with pathname.listFiles() The problem is that it is
> >>> not
> >>> possible. To get a result for each file... but I will try it maybe it
> >>> works
> >>> as asspected.
> >>>
> >>> Regards
> >>> /Steffen
> >>>
> >>> lhe77 wrote:
> >>> > public class XMLFilter implements FileFilter {
> >>> >
> >>> >         public static String XML_FILEEXTENSION = ".xml";
> >>> >
> >>> >         public boolean accept(File pathname) {
> >>> >
> >>> > 		if (pathname.isDirectory() ||
> >>> >                     (pathname.isFile() &&
> >>> >                      strFilename.endsWith(XML_FILEEXTENSION))
> >>> >                      ) {
> >>> >                         return true;
> >>> >                 }
> >>> >                 return false;
> >>> >         }
> >>> > }
> >>> >
> >>> > should do the trick.
> >>> >
> >>> > Lars
> >>> >
> >>> > Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
> >>> >> public class XMLFilter implements FileFilter {
> >>> >>
> >>> >>         public static String XML_FILEEXTENSION = ".xml";
> >>> >>
> >>> >>         public boolean accept(File pathname) {
> >>> >>                 System.out.println(pathname);
> >>> >>                 String strFilename = pathname.getName();
> >>> >>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
> >>> >>                         return true;
> >>> >>                 }
> >>> >>                 return false;
> >>> >>         }
> >>> >> }
> >>>
> >>> -----
> >>> Brockhaus GmbH
> >>> COMPETITIVE THROUGH KNOWLEDGE
> >>>
> >>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
> >>> http://www.brockhaus-group.com www.brockhaus-group.com
>
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
>
> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
> http://www.brockhaus-group.com www.brockhaus-group.com


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Hm don't really works during deployment I got following exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.servicemix.file.FilePollerEndpoint'
defined in file
[/home/smx/apache-servicemix-3.2.2/data/smx/service-assemblies/BrockhausProductsAssembly/version_1/sus/servicemix-file/BrockhausProductsInbox/xbean.xml]:
Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'property' of bean class [org.apache.servicemix.file.FilePollerEndpoint]:
Bean property 'property' is not writable or has an invalid setter method.
Does the parameter type of the setter match the return type of the getter?

My configuration was:
<file:poller service="brockhaus:inbox" endpoint="endpoint"
	targetService="brockhaus:transformer"

targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformerService/process"
	file="file:///home/smx/input/products/" deleteFile="true" recursive="true"
	period="10000">
	<property name="filter">
		<bean class="org.apache.commons.io.filefilter.WildcardFilter">
			<constructor-arg value="*.xml" />
		</bean>
	</property>
</file:poller>
And in the pom I added:
<dependency>
	<groupId>commons-io</groupId>
	<artifactId>commons-io</artifactId>
	<version>1.4</version>
</dependency>

is there a specific version of commons-io to use?

Regards
/Steffen

steff aka sid wrote:
> 
> Ok,
> I've read about that but from root directory my solution works so I don't
> changed it. Maybe this works better with recursion. Thank you.
> 
> Regards
> /Steffen
> 
> 
> lhe77 wrote:
>> 
>> Actually I never wrote my own filters and in your case it's not needed to
>> write 
>> your own filter because you can use the predefined WildcardFilter from 
>> commons.io lib.
>> 
>> Just add the dependency to your su's pom.xml and have something like the 
>> below:
>> 
>> 
>>  <f:poller
>>       service="my:filePoller"
>>       endpoint="pollerEndpoint"
>>       autoCreateDirectory="true"
>>       file="/home/user/myinput/"
>>       targetService="..."
>>       targetOperation="..."
>>       period="10000"
>>       recursive="true">
>> 
>>     <property name="filter">
>>         <bean class="org.apache.commons.io.filefilter.WildcardFilter">
>>             <constructor-arg value="*.xml" />
>>         </bean>
>>     </property>
>> 
>>   </f:poller>
>> 
>> Lars
>> 
>> 
>> Am Dienstag 23 September 2008 14:50:16 schrieb steff aka sid:
>>> No, thats not enough :) you have to read the contents of the directory
>>> and
>>> to check them e.g. with pathname.listFiles() The problem is that it is
>>> not
>>> possible. To get a result for each file... but I will try it maybe it
>>> works
>>> as asspected.
>>>
>>> Regards
>>> /Steffen
>>>
>>> lhe77 wrote:
>>> > public class XMLFilter implements FileFilter {
>>> >         
>>> >         public static String XML_FILEEXTENSION = ".xml";
>>> >         
>>> >         public boolean accept(File pathname) {
>>> >                 
>>> > 		if (pathname.isDirectory() ||
>>> >                     (pathname.isFile() &&
>>> >                      strFilename.endsWith(XML_FILEEXTENSION))
>>> >                      ) {
>>> >                         return true;
>>> >                 }
>>> >                 return false;
>>> >         }
>>> > }
>>> >
>>> > should do the trick.
>>> >
>>> > Lars
>>> >
>>> > Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
>>> >> public class XMLFilter implements FileFilter {
>>> >>         
>>> >>         public static String XML_FILEEXTENSION = ".xml";
>>> >>         
>>> >>         public boolean accept(File pathname) {
>>> >>                 System.out.println(pathname);
>>> >>                 String strFilename = pathname.getName();
>>> >>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
>>> >>                         return true;
>>> >>                 }
>>> >>                 return false;
>>> >>         }
>>> >> }
>>>
>>> -----
>>> Brockhaus GmbH
>>> COMPETITIVE THROUGH KNOWLEDGE
>>>
>>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>>> http://www.brockhaus-group.com www.brockhaus-group.com
>> 
>> 
>> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19627803.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Ok,
I've read about that but from root directory my solution works so I don't
changed it. Maybe this works better with recursion. Thank you.

Regards
/Steffen


lhe77 wrote:
> 
> Actually I never wrote my own filters and in your case it's not needed to
> write 
> your own filter because you can use the predefined WildcardFilter from 
> commons.io lib.
> 
> Just add the dependency to your su's pom.xml and have something like the 
> below:
> 
> 
>  <f:poller
>       service="my:filePoller"
>       endpoint="pollerEndpoint"
>       autoCreateDirectory="true"
>       file="/home/user/myinput/"
>       targetService="..."
>       targetOperation="..."
>       period="10000"
>       recursive="true">
> 
>     <property name="filter">
>         <bean class="org.apache.commons.io.filefilter.WildcardFilter">
>             <constructor-arg value="*.xml" />
>         </bean>
>     </property>
> 
>   </f:poller>
> 
> Lars
> 
> 
> Am Dienstag 23 September 2008 14:50:16 schrieb steff aka sid:
>> No, thats not enough :) you have to read the contents of the directory
>> and
>> to check them e.g. with pathname.listFiles() The problem is that it is
>> not
>> possible. To get a result for each file... but I will try it maybe it
>> works
>> as asspected.
>>
>> Regards
>> /Steffen
>>
>> lhe77 wrote:
>> > public class XMLFilter implements FileFilter {
>> >         
>> >         public static String XML_FILEEXTENSION = ".xml";
>> >         
>> >         public boolean accept(File pathname) {
>> >                 
>> > 		if (pathname.isDirectory() ||
>> >                     (pathname.isFile() &&
>> >                      strFilename.endsWith(XML_FILEEXTENSION))
>> >                      ) {
>> >                         return true;
>> >                 }
>> >                 return false;
>> >         }
>> > }
>> >
>> > should do the trick.
>> >
>> > Lars
>> >
>> > Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
>> >> public class XMLFilter implements FileFilter {
>> >>         
>> >>         public static String XML_FILEEXTENSION = ".xml";
>> >>         
>> >>         public boolean accept(File pathname) {
>> >>                 System.out.println(pathname);
>> >>                 String strFilename = pathname.getName();
>> >>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
>> >>                         return true;
>> >>                 }
>> >>                 return false;
>> >>         }
>> >> }
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>> http://www.brockhaus-group.com www.brockhaus-group.com
> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19627294.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by Lars Heinemann <la...@compart.net>.
Actually I never wrote my own filters and in your case it's not needed to write 
your own filter because you can use the predefined WildcardFilter from 
commons.io lib.

Just add the dependency to your su's pom.xml and have something like the 
below:


 <f:poller
      service="my:filePoller"
      endpoint="pollerEndpoint"
      autoCreateDirectory="true"
      file="/home/user/myinput/"
      targetService="..."
      targetOperation="..."
      period="10000"
      recursive="true">

    <property name="filter">
        <bean class="org.apache.commons.io.filefilter.WildcardFilter">
            <constructor-arg value="*.xml" />
        </bean>
    </property>

  </f:poller>

Lars


Am Dienstag 23 September 2008 14:50:16 schrieb steff aka sid:
> No, thats not enough :) you have to read the contents of the directory and
> to check them e.g. with pathname.listFiles() The problem is that it is not
> possible. To get a result for each file... but I will try it maybe it works
> as asspected.
>
> Regards
> /Steffen
>
> lhe77 wrote:
> > public class XMLFilter implements FileFilter {
> >         
> >         public static String XML_FILEEXTENSION = ".xml";
> >         
> >         public boolean accept(File pathname) {
> >                 
> > 		if (pathname.isDirectory() ||
> >                     (pathname.isFile() &&
> >                      strFilename.endsWith(XML_FILEEXTENSION))
> >                      ) {
> >                         return true;
> >                 }
> >                 return false;
> >         }
> > }
> >
> > should do the trick.
> >
> > Lars
> >
> > Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
> >> public class XMLFilter implements FileFilter {
> >>         
> >>         public static String XML_FILEEXTENSION = ".xml";
> >>         
> >>         public boolean accept(File pathname) {
> >>                 System.out.println(pathname);
> >>                 String strFilename = pathname.getName();
> >>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
> >>                         return true;
> >>                 }
> >>                 return false;
> >>         }
> >> }
>
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
>
> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
> http://www.brockhaus-group.com www.brockhaus-group.com


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
No, thats not enough :) you have to read the contents of the directory and to
check them e.g. with pathname.listFiles() The problem is that it is not
possible. To get a result for each file... but I will try it maybe it works
as asspected.

Regards
/Steffen



lhe77 wrote:
> 
> public class XMLFilter implements FileFilter {
>         
>         public static String XML_FILEEXTENSION = ".xml";
>         
>         public boolean accept(File pathname) {
>                 
> 		if (pathname.isDirectory() || 
>                     (pathname.isFile() &&  
>                      strFilename.endsWith(XML_FILEEXTENSION))
>                      ) {
>                         return true;
>                 }
>                 return false;
>         }
> }
> 
> should do the trick.
> 
> Lars
> 
> 
> Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
>> public class XMLFilter implements FileFilter {
>>         
>>         public static String XML_FILEEXTENSION = ".xml";
>>         
>>         public boolean accept(File pathname) {
>>                 System.out.println(pathname);
>>                 String strFilename = pathname.getName();
>>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
>>                         return true;
>>                 }
>>                 return false;
>>         }
>> }
> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19626989.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by Lars Heinemann <la...@compart.net>.
public class XMLFilter implements FileFilter {
        
        public static String XML_FILEEXTENSION = ".xml";
        
        public boolean accept(File pathname) {
                
		if (pathname.isDirectory() || 
                    (pathname.isFile() &&  
                     strFilename.endsWith(XML_FILEEXTENSION))
                     ) {
                        return true;
                }
                return false;
        }
}

should do the trick.

Lars


Am Dienstag 23 September 2008 14:38:13 schrieb steff aka sid:
> public class XMLFilter implements FileFilter {
>         
>         public static String XML_FILEEXTENSION = ".xml";
>         
>         public boolean accept(File pathname) {
>                 System.out.println(pathname);
>                 String strFilename = pathname.getName();
>                 if (strFilename.endsWith(XML_FILEEXTENSION)) {
>                         return true;
>                 }
>                 return false;
>         }
> }


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Hm this is a little bit strange hier is my filter class:

public class XMLFilter implements FileFilter {
	
	public static String XML_FILEEXTENSION = ".xml";
	
	public boolean accept(File pathname) {
		System.out.println(pathname);
		String strFilename = pathname.getName();
		if (strFilename.endsWith(XML_FILEEXTENSION)) {
			return true;
		}
		return false;
	}
}

So in my opinion this must be possible to filter the subfolders. But the
output shows me that Servicemix only tries to filter the pathes of the
subfolders not the files themself:
/home/smx/input/products/nl-NL
/home/smx/input/products/test

(the root folder is /home/smx/input/products) but all files in the
subfolders are ignored by the filter so it is always false for the
subfolders...

Regards
/Steffen


lhe77 wrote:
> 
> Ah, that is what I expected actually.
> Your filter should be changed so that folders and files with extension
> .xml are 
> allowed.
> 
> Lars
> 
> 
> Am Dienstag 23 September 2008 14:28:45 schrieb steff aka sid:
>> Ok, I found out, that in my case it belongs to the filter I've created.
>> So
>> I think I have to change my filter condition. Because the subfolders
>> don't
>> have an extension like *.xml so they are not polled. Hm its maybe a good
>> idea to change that behaviour? So that the condition is applied to the
>> subdirectories too not only on root folder?
>>
>> Regards
>> /Steff
>>
>> steff aka sid wrote:
>> > Hm,
>> > I've Ubuntu too, but its not working for me. Allrights are set correct.
>> I
>> > tried first:
>> > <file:poller service="brockhaus:inbox"
>> >                endpoint="endpoint"
>> >                targetService="brockhaus:transformer"
>> >
>> >
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransform
>> >erService/process" file="/home/smx/input/products/"
>> >                deleteFile="true"
>> >                recursive="true"
>> >                period="10000"
>> >                filter="#XMLFilter" />
>> > and second:
>> > <file:poller service="brockhaus:inbox"
>> >                endpoint="endpoint"
>> >                targetService="brockhaus:transformer"
>> >
>> >
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransform
>> >erService/process" file="file:///home/smx/input/products/"
>> >                deleteFile="true"
>> >                recursive="true"
>> >                period="10000"
>> >                filter="#XMLFilter" />
>> >
>> > I thought about the directory names but also a directory called 'test'
>> > was not polled.
>> >
>> > So is here someone how knows why that happens?
>> >
>> > Regards
>> > /Steff
>> >
>> > lhe77 wrote:
>> >> Hi,
>> >>
>> >> I use the file poller under Ubuntu Linux and it works fine.
>> >> This can have 2 reasons in my opinion:
>> >>
>> >> 1. the directory you specified in ${filepoller.path} is not a valid
>> one
>> >> As comparison, this is what I have here in my case:
>> >> <f:poller
>> >>       service="cp:filePoller"
>> >>       endpoint="pollerEndpoint"
>> >>       file="file:///home/lhe/smxtest/input/"
>> >>       targetService="cp:workflow"
>> >>       period="5000"
>> >>       recursive="true"
>> >>       autoCreateDirectory="true" />
>> >> Maybe these slashes in file attribute have something to do with it, I
>> >> don't know exactly.
>> >>
>> >> 2. Maybe you simply don't have the rights to poll these directory or
>> >> specific sub-directories
>> >>
>> >> Regards,
>> >> Lars
>> >>
>> >> Abdeslam El Abbassi wrote:
>> >>> Hi,
>> >>> in windows plate forme the recursive file polling work very well.
>> >>> but when we deploy in linux plate form, this don't work
>> >>>
>> >>> here my code :
>> >>>
>> >>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>> >>> recursive="true"
>> >>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>> >>> targetEndpoint="jmsselect" period="1000">
>> >>>
>> >>> filepoller.path is path to directory as "/opt/dir"
>> >>>
>> >>> We use servicemix 3.2 version
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>> http://www.brockhaus-group.com www.brockhaus-group.com
> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19626780.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by Lars Heinemann <la...@compart.net>.
Ah, that is what I expected actually.
Your filter should be changed so that folders and files with extension .xml are 
allowed.

Lars


Am Dienstag 23 September 2008 14:28:45 schrieb steff aka sid:
> Ok, I found out, that in my case it belongs to the filter I've created. So
> I think I have to change my filter condition. Because the subfolders don't
> have an extension like *.xml so they are not polled. Hm its maybe a good
> idea to change that behaviour? So that the condition is applied to the
> subdirectories too not only on root folder?
>
> Regards
> /Steff
>
> steff aka sid wrote:
> > Hm,
> > I've Ubuntu too, but its not working for me. Allrights are set correct. I
> > tried first:
> > <file:poller service="brockhaus:inbox"
> >                endpoint="endpoint"
> >                targetService="brockhaus:transformer"
> >
> > targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransform
> >erService/process" file="/home/smx/input/products/"
> >                deleteFile="true"
> >                recursive="true"
> >                period="10000"
> >                filter="#XMLFilter" />
> > and second:
> > <file:poller service="brockhaus:inbox"
> >                endpoint="endpoint"
> >                targetService="brockhaus:transformer"
> >
> > targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransform
> >erService/process" file="file:///home/smx/input/products/"
> >                deleteFile="true"
> >                recursive="true"
> >                period="10000"
> >                filter="#XMLFilter" />
> >
> > I thought about the directory names but also a directory called 'test'
> > was not polled.
> >
> > So is here someone how knows why that happens?
> >
> > Regards
> > /Steff
> >
> > lhe77 wrote:
> >> Hi,
> >>
> >> I use the file poller under Ubuntu Linux and it works fine.
> >> This can have 2 reasons in my opinion:
> >>
> >> 1. the directory you specified in ${filepoller.path} is not a valid one
> >> As comparison, this is what I have here in my case:
> >> <f:poller
> >>       service="cp:filePoller"
> >>       endpoint="pollerEndpoint"
> >>       file="file:///home/lhe/smxtest/input/"
> >>       targetService="cp:workflow"
> >>       period="5000"
> >>       recursive="true"
> >>       autoCreateDirectory="true" />
> >> Maybe these slashes in file attribute have something to do with it, I
> >> don't know exactly.
> >>
> >> 2. Maybe you simply don't have the rights to poll these directory or
> >> specific sub-directories
> >>
> >> Regards,
> >> Lars
> >>
> >> Abdeslam El Abbassi wrote:
> >>> Hi,
> >>> in windows plate forme the recursive file polling work very well.
> >>> but when we deploy in linux plate form, this don't work
> >>>
> >>> here my code :
> >>>
> >>> <file:poller service="ws_eai:fileservice" endpoint="poller"
> >>> recursive="true"
> >>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
> >>> targetEndpoint="jmsselect" period="1000">
> >>>
> >>> filepoller.path is path to directory as "/opt/dir"
> >>>
> >>> We use servicemix 3.2 version
>
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
>
> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
> http://www.brockhaus-group.com www.brockhaus-group.com


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Ok, I found out, that in my case it belongs to the filter I've created. So I
think I have to change my filter condition. Because the subfolders don't
have an extension like *.xml so they are not polled. Hm its maybe a good
idea to change that behaviour? So that the condition is applied to the
subdirectories too not only on root folder?

Regards
/Steff


steff aka sid wrote:
> 
> Hm,
> I've Ubuntu too, but its not working for me. Allrights are set correct. I
> tried first:
> <file:poller service="brockhaus:inbox"
>                endpoint="endpoint" 
>                targetService="brockhaus:transformer"
>               
> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformerService/process" 
>                file="/home/smx/input/products/"
>                deleteFile="true" 
>                recursive="true" 
>                period="10000" 
>                filter="#XMLFilter" />
> and second:
> <file:poller service="brockhaus:inbox"
>                endpoint="endpoint" 
>                targetService="brockhaus:transformer"
>               
> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformerService/process" 
>                file="file:///home/smx/input/products/"
>                deleteFile="true"
>                recursive="true"
>                period="10000"
>                filter="#XMLFilter" />
> 
> I thought about the directory names but also a directory called 'test' was
> not polled.
> 
> So is here someone how knows why that happens?
> 
> Regards
> /Steff
> 
> 
> lhe77 wrote:
>> 
>> Hi,
>> 
>> I use the file poller under Ubuntu Linux and it works fine.
>> This can have 2 reasons in my opinion:
>> 
>> 1. the directory you specified in ${filepoller.path} is not a valid one 
>> As comparison, this is what I have here in my case:
>> <f:poller
>>       service="cp:filePoller"
>>       endpoint="pollerEndpoint"
>>       file="file:///home/lhe/smxtest/input/"
>>       targetService="cp:workflow"
>>       period="5000"
>>       recursive="true"
>>       autoCreateDirectory="true" />
>> Maybe these slashes in file attribute have something to do with it, I
>> don't know exactly.
>> 
>> 2. Maybe you simply don't have the rights to poll these directory or
>> specific sub-directories
>> 
>> Regards,
>> Lars
>> 
>> 
>> 
>> 
>> Abdeslam El Abbassi wrote:
>>> 
>>> Hi,
>>> in windows plate forme the recursive file polling work very well.
>>> but when we deploy in linux plate form, this don't work
>>> 
>>> here my code :
>>> 
>>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>>> recursive="true"
>>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>>> targetEndpoint="jmsselect" period="1000">
>>> 
>>> filepoller.path is path to directory as "/opt/dir"
>>> 
>>> We use servicemix 3.2 version
>>> 
>> 
>> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19626581.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Jap, see my next post this was the problem in my case. Thank you for your
answer.

Regards
/Steffen


lhe77 wrote:
> 
> Could you try to comment out the filter stuff and try again?
> 
> Lars
> 
> 
> 
> Am Dienstag 23 September 2008 14:23:43 schrieb steff aka sid:
>> Hm,
>> I've Ubuntu too, but its not working for me. Allrights are set correct. I
>> tried first:
>> <file:poller service="brockhaus:inbox"
>>                endpoint="endpoint"
>>                targetService="brockhaus:transformer"
>>
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformer
>>Service/process" file="/home/smx/input/products/"
>>                deleteFile="true"
>>                recursive="true"
>>                period="10000"
>>                filter="#XMLFilter" />
>> and second:
>> <file:poller service="brockhaus:inbox"
>>                endpoint="endpoint"
>>                targetService="brockhaus:transformer"
>>
>> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformer
>>Service/process" file="file:///home/smx/input/products/"
>>                deleteFile="true"
>>                recursive="true"
>>                period="10000"
>>                filter="#XMLFilter" />
>>
>> I thought about the directory names but also a directory called 'test'
>> was
>> not polled.
>>
>> So is here someone how knows why that happens?
>>
>> Regards
>> /Steff
>>
>> lhe77 wrote:
>> > Hi,
>> >
>> > I use the file poller under Ubuntu Linux and it works fine.
>> > This can have 2 reasons in my opinion:
>> >
>> > 1. the directory you specified in ${filepoller.path} is not a valid one
>> > As comparison, this is what I have here in my case:
>> > <f:poller
>> >       service="cp:filePoller"
>> >       endpoint="pollerEndpoint"
>> >       file="file:///home/lhe/smxtest/input/"
>> >       targetService="cp:workflow"
>> >       period="5000"
>> >       recursive="true"
>> >       autoCreateDirectory="true" />
>> > Maybe these slashes in file attribute have something to do with it, I
>> > don't know exactly.
>> >
>> > 2. Maybe you simply don't have the rights to poll these directory or
>> > specific sub-directories
>> >
>> > Regards,
>> > Lars
>> >
>> > Abdeslam El Abbassi wrote:
>> >> Hi,
>> >> in windows plate forme the recursive file polling work very well.
>> >> but when we deploy in linux plate form, this don't work
>> >>
>> >> here my code :
>> >>
>> >> <file:poller service="ws_eai:fileservice" endpoint="poller"
>> >> recursive="true"
>> >> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>> >> targetEndpoint="jmsselect" period="1000">
>> >>
>> >> filepoller.path is path to directory as "/opt/dir"
>> >>
>> >> We use servicemix 3.2 version
>>
>> -----
>> Brockhaus GmbH
>> COMPETITIVE THROUGH KNOWLEDGE
>>
>> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
>> http://www.brockhaus-group.com www.brockhaus-group.com
> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19626646.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by Lars Heinemann <la...@compart.net>.
Could you try to comment out the filter stuff and try again?

Lars



Am Dienstag 23 September 2008 14:23:43 schrieb steff aka sid:
> Hm,
> I've Ubuntu too, but its not working for me. Allrights are set correct. I
> tried first:
> <file:poller service="brockhaus:inbox"
>                endpoint="endpoint"
>                targetService="brockhaus:transformer"
>
> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformer
>Service/process" file="/home/smx/input/products/"
>                deleteFile="true"
>                recursive="true"
>                period="10000"
>                filter="#XMLFilter" />
> and second:
> <file:poller service="brockhaus:inbox"
>                endpoint="endpoint"
>                targetService="brockhaus:transformer"
>
> targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformer
>Service/process" file="file:///home/smx/input/products/"
>                deleteFile="true"
>                recursive="true"
>                period="10000"
>                filter="#XMLFilter" />
>
> I thought about the directory names but also a directory called 'test' was
> not polled.
>
> So is here someone how knows why that happens?
>
> Regards
> /Steff
>
> lhe77 wrote:
> > Hi,
> >
> > I use the file poller under Ubuntu Linux and it works fine.
> > This can have 2 reasons in my opinion:
> >
> > 1. the directory you specified in ${filepoller.path} is not a valid one
> > As comparison, this is what I have here in my case:
> > <f:poller
> >       service="cp:filePoller"
> >       endpoint="pollerEndpoint"
> >       file="file:///home/lhe/smxtest/input/"
> >       targetService="cp:workflow"
> >       period="5000"
> >       recursive="true"
> >       autoCreateDirectory="true" />
> > Maybe these slashes in file attribute have something to do with it, I
> > don't know exactly.
> >
> > 2. Maybe you simply don't have the rights to poll these directory or
> > specific sub-directories
> >
> > Regards,
> > Lars
> >
> > Abdeslam El Abbassi wrote:
> >> Hi,
> >> in windows plate forme the recursive file polling work very well.
> >> but when we deploy in linux plate form, this don't work
> >>
> >> here my code :
> >>
> >> <file:poller service="ws_eai:fileservice" endpoint="poller"
> >> recursive="true"
> >> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
> >> targetEndpoint="jmsselect" period="1000">
> >>
> >> filepoller.path is path to directory as "/opt/dir"
> >>
> >> We use servicemix 3.2 version
>
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
>
> Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  /
> http://www.brockhaus-group.com www.brockhaus-group.com


Re: recursive file polling don't work on linux

Posted by steff aka sid <sr...@brockhaus-gruppe.de>.
Hm,
I've Ubuntu too, but its not working for me. Allrights are set correct. I
tried first:
<file:poller service="brockhaus:inbox"
               endpoint="endpoint" 
               targetService="brockhaus:transformer"
              
targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformerService/process" 
               file="/home/smx/input/products/"
               deleteFile="true" 
               recursive="true" 
               period="10000" 
               filter="#XMLFilter" />
and second:
<file:poller service="brockhaus:inbox"
               endpoint="endpoint" 
               targetService="brockhaus:transformer"
              
targetUri="operation:http://brockhaus-gruppe.de/products/ProductTransformerService/process" 
               file="file:///home/smx/input/products/"
               deleteFile="true"
               recursive="true"
               period="10000"
               filter="#XMLFilter" />

I thought about the directory names but also a directory called 'test' was
not polled.

So is here someone how knows why that happens?

Regards
/Steff


lhe77 wrote:
> 
> Hi,
> 
> I use the file poller under Ubuntu Linux and it works fine.
> This can have 2 reasons in my opinion:
> 
> 1. the directory you specified in ${filepoller.path} is not a valid one 
> As comparison, this is what I have here in my case:
> <f:poller
>       service="cp:filePoller"
>       endpoint="pollerEndpoint"
>       file="file:///home/lhe/smxtest/input/"
>       targetService="cp:workflow"
>       period="5000"
>       recursive="true"
>       autoCreateDirectory="true" />
> Maybe these slashes in file attribute have something to do with it, I
> don't know exactly.
> 
> 2. Maybe you simply don't have the rights to poll these directory or
> specific sub-directories
> 
> Regards,
> Lars
> 
> 
> 
> 
> Abdeslam El Abbassi wrote:
>> 
>> Hi,
>> in windows plate forme the recursive file polling work very well.
>> but when we deploy in linux plate form, this don't work
>> 
>> here my code :
>> 
>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>> recursive="true"
>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>> targetEndpoint="jmsselect" period="1000">
>> 
>> filepoller.path is path to directory as "/opt/dir"
>> 
>> We use servicemix 3.2 version
>> 
> 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533p19626509.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by lhe77 <la...@compart.net>.
Ok, I tried to test this with some right issues.

1. Test: 
The user which is running the smx has no rights to a subdirectory of the
folder to poll in. In this case there are error messages in the smx console
and log referring to some IOException. So just check if this is the reason
in your case as well.

2. Test:
The user has the right to access the subfolder, but no right to access the
file. In this case there is also a more detailed exception thrown in the
console and log of smx. So just check console outputs and your logfile.

Lars





lhe wrote:
> 
> I will try out this tomorrow and give you some feedback if the issue is
> still not resolved.
> 
> Regards,
> Lars
> 
> 
> 
> Abdeslam El Abbassi wrote:
>> 
>> Thanks, but still not working.
>> We use Red Hat OS.
>> 
>> 1/
>> i try this 
>> <file:poller service="ws_eai:fileservice" 
>> 			 endpoint="poller"
>> 			
>> file="file:/opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"
>> 			 targetService="ws_eai:jmsselect"
>> 			 period="1000"
>> 			 recursive="true"
>> 			 autoCreateDirectory="true">
>> 
>> and this
>> file="file:///opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"
>> 
>> But nothing work.
>> 
>> 2/
>> if the file is in the root, it will we consumed by the polling.
>> So i think it's a problem of directory right.
>> 
>> Regards
>> 
>> 
>> lhe77 wrote:
>>> 
>>> Hi,
>>> 
>>> I use the file poller under Ubuntu Linux and it works fine.
>>> This can have 2 reasons in my opinion:
>>> 
>>> 1. the directory you specified in ${filepoller.path} is not a valid one 
>>> As comparison, this is what I have here in my case:
>>> <f:poller
>>>       service="cp:filePoller"
>>>       endpoint="pollerEndpoint"
>>>       file="file:///home/lhe/smxtest/input/"
>>>       targetService="cp:workflow"
>>>       period="5000"
>>>       recursive="true"
>>>       autoCreateDirectory="true" />
>>> Maybe these slashes in file attribute have something to do with it, I
>>> don't know exactly.
>>> 
>>> 2. Maybe you simply don't have the rights to poll these directory or
>>> specific sub-directories
>>> 
>>> Regards,
>>> Lars
>>> 
>>> 
>>> 
>>> 
>>> Abdeslam El Abbassi wrote:
>>>> 
>>>> Hi,
>>>> in windows plate forme the recursive file polling work very well.
>>>> but when we deploy in linux plate form, this don't work
>>>> 
>>>> here my code :
>>>> 
>>>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>>>> recursive="true"
>>>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>>>> targetEndpoint="jmsselect" period="1000">
>>>> 
>>>> filepoller.path is path to directory as "/opt/dir"
>>>> 
>>>> We use servicemix 3.2 version
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533s12049p14872015.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by lhe <lr...@web.de>.
I will try out this tomorrow and give you some feedback if the issue is still
not resolved.

Regards,
Lars



Abdeslam El Abbassi wrote:
> 
> Thanks, but still not working.
> We use Red Hat OS.
> 
> 1/
> i try this 
> <file:poller service="ws_eai:fileservice" 
> 			 endpoint="poller"
> 			
> file="file:/opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"
> 			 targetService="ws_eai:jmsselect"
> 			 period="1000"
> 			 recursive="true"
> 			 autoCreateDirectory="true">
> 
> and this
> file="file:///opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"
> 
> But nothing work.
> 
> 2/
> if the file is in the root, it will we consumed by the polling.
> So i think it's a problem of directory right.
> 
> Regards
> 
> 
> lhe77 wrote:
>> 
>> Hi,
>> 
>> I use the file poller under Ubuntu Linux and it works fine.
>> This can have 2 reasons in my opinion:
>> 
>> 1. the directory you specified in ${filepoller.path} is not a valid one 
>> As comparison, this is what I have here in my case:
>> <f:poller
>>       service="cp:filePoller"
>>       endpoint="pollerEndpoint"
>>       file="file:///home/lhe/smxtest/input/"
>>       targetService="cp:workflow"
>>       period="5000"
>>       recursive="true"
>>       autoCreateDirectory="true" />
>> Maybe these slashes in file attribute have something to do with it, I
>> don't know exactly.
>> 
>> 2. Maybe you simply don't have the rights to poll these directory or
>> specific sub-directories
>> 
>> Regards,
>> Lars
>> 
>> 
>> 
>> 
>> Abdeslam El Abbassi wrote:
>>> 
>>> Hi,
>>> in windows plate forme the recursive file polling work very well.
>>> but when we deploy in linux plate form, this don't work
>>> 
>>> here my code :
>>> 
>>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>>> recursive="true"
>>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>>> targetEndpoint="jmsselect" period="1000">
>>> 
>>> filepoller.path is path to directory as "/opt/dir"
>>> 
>>> We use servicemix 3.2 version
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533s12049p14842436.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 15, 2008 9:43 AM, Abdeslam El Abbassi
<ab...@thalesgroup.com> wrote:
>
> Thanks, but still not working.
> We use Red Hat OS.

What exactly do you mean by not working. Do you have any errors or
exceptions that you can post? If not, I encourage you to enable debug
level logging in ServiceMix to see if it will provide more insight:

http://servicemix.apache.org/how-do-i-change-the-logging.html


> 1/
> i try this
> <file:poller service="ws_eai:fileservice"
>                          endpoint="poller"
>                          file="file:/opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"
>                          targetService="ws_eai:jmsselect"
>                          period="1000"
>                          recursive="true"
>                          autoCreateDirectory="true">
>
> and this
> file="file:///opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"

I'm very surprised that the above URI (file://) wouldn't point at the
directory because it is well-formed whereas the URI used in the
file:poller (file:) is not well-formed.

> But nothing work.
>
> 2/
> if the file is in the root, it will we consumed by the polling.
> So i think it's a problem of directory right.

This sounds like a permissions problem on the filesystem.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: recursive file polling don't work on linux

Posted by Abdeslam El Abbassi <ab...@thalesgroup.com>.
Thanks, but still not working.
We use Red Hat OS.

1/
i try this 
<file:poller service="ws_eai:fileservice" 
			 endpoint="poller"
			 file="file:/opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"
			 targetService="ws_eai:jmsselect"
			 period="1000"
			 recursive="true"
			 autoCreateDirectory="true">

and this
file="file:///opt/eai/apache-tomcat-6.0.9/webapps/servicemix/data/INBOX/"

But nothing work.

2/
if the file is in the root, it will we consumed by the polling.
So i think it's a problem of directory right.

Regards


lhe77 wrote:
> 
> Hi,
> 
> I use the file poller under Ubuntu Linux and it works fine.
> This can have 2 reasons in my opinion:
> 
> 1. the directory you specified in ${filepoller.path} is not a valid one 
> As comparison, this is what I have here in my case:
> <f:poller
>       service="cp:filePoller"
>       endpoint="pollerEndpoint"
>       file="file:///home/lhe/smxtest/input/"
>       targetService="cp:workflow"
>       period="5000"
>       recursive="true"
>       autoCreateDirectory="true" />
> Maybe these slashes in file attribute have something to do with it, I
> don't know exactly.
> 
> 2. Maybe you simply don't have the rights to poll these directory or
> specific sub-directories
> 
> Regards,
> Lars
> 
> 
> 
> 
> Abdeslam El Abbassi wrote:
>> 
>> Hi,
>> in windows plate forme the recursive file polling work very well.
>> but when we deploy in linux plate form, this don't work
>> 
>> here my code :
>> 
>> <file:poller service="ws_eai:fileservice" endpoint="poller"
>> recursive="true"
>> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
>> targetEndpoint="jmsselect" period="1000">
>> 
>> filepoller.path is path to directory as "/opt/dir"
>> 
>> We use servicemix 3.2 version
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533s12049p14841697.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: recursive file polling don't work on linux

Posted by lhe77 <la...@compart.net>.
Hi,

I use the file poller under Ubuntu Linux and it works fine.
This can have 2 reasons in my opinion:

1. the directory you specified in ${filepoller.path} is not a valid one 
As comparison, this is what I have here in my case:
<f:poller
      service="cp:filePoller"
      endpoint="pollerEndpoint"
      file="file:///home/lhe/smxtest/input/"
      targetService="cp:workflow"
      period="5000"
      recursive="true"
      autoCreateDirectory="true" />
Maybe these slashes in file attribute have something to do with it, I don't
know exactly.

2. Maybe you simply don't have the rights to poll these directory or
specific sub-directories

Regards,
Lars




Abdeslam El Abbassi wrote:
> 
> Hi,
> in windows plate forme the recursive file polling work very well.
> but when we deploy in linux plate form, this don't work
> 
> here my code :
> 
> <file:poller service="ws_eai:fileservice" endpoint="poller"
> recursive="true"
> 			file="file:${filepoller.path}" targetService="ws_eai:jmsselect"
> targetEndpoint="jmsselect" period="1000">
> 
> filepoller.path is path to directory as "/opt/dir"
> 
> We use servicemix 3.2 version
> 

-- 
View this message in context: http://www.nabble.com/recursive-file-polling-don%27t-work-on-linux-tp14841533s12049p14841544.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.