You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Lars Gohlke (JIRA)" <ji...@apache.org> on 2010/09/22 11:23:40 UTC

[jira] Commented: (CAMEL-3145) FileComponent does not like points in path

    [ https://issues.apache.org/activemq/browse/CAMEL-3145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61986#action_61986 ] 

Lars Gohlke commented on CAMEL-3145:
------------------------------------

        
this is the source of the error, why not use ' !file.isDirectory() ' ?

// we assume its a file if the name has a dot in it (eg foo.txt)
        if (file.getName().contains(".")) {
            throw new IllegalArgumentException("Only directory is supported. Endpoint must be configured with a valid starting directory: " + file);
        }

> FileComponent does not like points in path
> ------------------------------------------
>
>                 Key: CAMEL-3145
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3145
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.4.0
>         Environment: ubuntu 10.4.1, 32bit, java sun 1.6.0.21
>            Reporter: Lars Gohlke
>            Priority: Trivial
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> when the first time the file consumer, poll for changes, this exception comes up
> not on configuring route
> java.lang.IllegalArgumentException: Only directory is supported. Endpoint must be configured with a valid starting directory: /tmp/camel-tmp-575302/nix7543804947501517726.temp_d
> 	at org.apache.camel.component.file.FileEndpoint.createConsumer(FileEndpoint.java:54)
> 	at org.apache.camel.component.file.FileEndpoint.createConsumer(FileEndpoint.java:32)
> 	at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:60)
> 	at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:75)
> 	at org.apache.camel.impl.RouteService.doStart(RouteService.java:132)
> 	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
> 	at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1328)
> 	at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1256)
> 	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:952)
> 	at de.lgohlke.services.wnotify.DataBaseChangeListenerServiceTest.setup(DataBaseChangeListenerServiceTest.java:39)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.