I have weird problem. When I'm running jar from project folder which goes:
java -jar ./target/project.jar
everything works fine, path is read correctly.
1107 [main] INFO org.apache.camel.core.xml.AbstractCamelContextFactoryBean - JMXAgent enabled: CamelJMXAgent[usePlatformMBeanServer=true, createConnector=true, registryPort=10098, serviceUrlPath=/, statisticsLevel=All, onlyRegisterProcessorWithCustomId=false, registerAlways=true, registerNewRoutes=true, mask=false]
2657 [main] INFO org.apache.camel.impl.converter.DefaultTypeConverter - Loaded 179 type converters
2853 [main] INFO org.apache.camel.spring.SpringCamelContext - Apache Camel 2.12.2 (CamelContext: data-feed-camel) is starting
2853 [main] INFO org.apache.camel.management.ManagedManagementStrategy - JMX is enabled
3078 [Camel Thread #1 - Camel Thread #0 - JMXConnector: service:jmx:rmi:///jndi/rmi://pjanik-pc:10098/] INFO org.apache.camel.management.DefaultManagementAgent - JMX Connector thread started and listening at: service:jmx:rmi:///jndi/rmi://pjanik-pc:10098/f
3089 [main] INFO org.apache.camel.spring.SpringCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
3107 [main] INFO org.apache.camel.spring.SpringCamelContext - Total 0 routes, of which 0 is started.
3128 [main] INFO org.apache.camel.spring.SpringCamelContext - Apache Camel 2.12.2 (CamelContext: data-feed-camel) started in 0.255 seconds
org.apache.camel.component.file.FileEndpoint - Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
59471 [RMI TCP Connection(5)-10.88.55.167] INFO org.apache.camel.spring.SpringCamelContext - Route: flt_data_for_0543 started and consuming from: Endpoint[file://src/main/resources/view/flight/following/default/3648/flt_data?idempotentRepository=%23repo-flt_data_for_0543&noop=true&readLock=none]
60552 [Camel (data-feed-camel) thread #4 -
but when I run jar inside target folder
1149 [main] INFO org.apache.camel.core.xml.AbstractCamelContextFactoryBean - JMXAgent enabled: CamelJMXAgent[usePlatformMBeanServer=true, createConnector=true, registryPort=10098, serviceUrlPath=/, statisticsLevel=All, onlyRegisterProcessorWithCustomId=false, registerAlways=true, registerNewRoutes=true, mask=false]
2688 [main] INFO org.apache.camel.impl.converter.DefaultTypeConverter - Loaded 179 type converters
2796 [main] INFO org.apache.camel.spring.SpringCamelContext - Apache Camel 2.12.2 (CamelContext: data-feed-camel) is starting
2796 [main] INFO org.apache.camel.management.ManagedManagementStrategy - JMX is enabled
2975 [Camel Thread #1 - Camel Thread #0 - JMXConnector: service:jmx:rmi:///jndi/rmi://pjanik-pc:10098/] INFO org.apache.camel.management.DefaultManagementAgent - JMX Connector thread started and listening at: service:jmx:rmi:///jndi/rmi://pjanik-pc:10098/
2981 [main] INFO org.apache.camel.spring.SpringCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2989 [main] INFO org.apache.camel.spring.SpringCamelContext - Total 0 routes, of which 0 is started.
2991 [main] INFO org.apache.camel.spring.SpringCamelContext - Apache Camel 2.12.2 (CamelContext: data-feed-camel) started in 0.194 seconds
21055 [RMI TCP Connection(4)-10.88.55.167] INFO org.apache.camel.component.file.FileEndpoint - Endpoint is configured with noop=true so forcing endpoint to be idempotent as well
21588 [RMI TCP Connection(4)-10.88.55.167] INFO org.apache.camel.spring.SpringCamelContext - Route: flt_data_for_0432 started and consuming from: Endpoint[file://src/main/resources/view/flight/following/default/3648/flt_data?idempotentRepository=%23repo-flt_data_for_0432&noop=true&readLock=none]
it stucks and nothing is doing further
The path is all the time the same:
private static final String DEFAULT_DATA_PATH = "view/flight/following/default/3648/";
What can be wrong? How can I avoid such a situation?