Apache Camel聚合器存储库引发OverlappingFileLockException

时间:2019-03-25 11:39:01

标签: java spring-boot apache-camel

我有3条不同的路线使用Aggregator EIP进行存储。他们定义了不同的商店。

在Tomcat上重新启动我的Camel应用程序时,我的应用程序引发类型为OverlappingFileLockException的异常。

错误并不总是相同的,它在存储库中可能有所不同。

  

org.apache.camel.RuntimeCamelException:   org.apache.camel.FailedToCreateRouteException:无法创建路由   route1:Route(route1)[[From [direct:brexit]]-> [Aggregate [true->   [L ...由于OverlappingFileLockException位于   org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1826)     在   org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:136)     在   org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:174)     在   org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)     在   org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)     在   org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)     在   org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)     在   org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)     在   org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:896)     在   org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163)     在   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)     在   org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)     在   org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)     在   org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)     在   org.springframework.boot.SpringApplication.run(SpringApplication.java:316)     在   org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157)     在   org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)     在   org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)     在   org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)     在   org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)     在   org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)     在   org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)     在   org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)     在   org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)     在   org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988)     在   org.apache.catalina.startup.HostConfig $ DeployWar.run(HostConfig.java:1860)     在java.util.concurrent.Executors $ RunnableAdapter.call(未知   源)位于java.util.concurrent.FutureTask.run(未知源)位于   java.util.concurrent.ThreadPoolExecutor.runWorker(未知源),位于   java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源)   java.lang.Thread.run(未知源)造成原因:   org.apache.camel.FailedToCreateRouteException:无法创建路由   route1:Route(route1)[[From [direct:brexit]]-> [Aggregate [true->   [L ...由于OverlappingFileLockException位于   org.apache.camel.impl.RouteService.warmUp(RouteService.java:147)在   org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3953)     在   org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3860)     在   org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3646)     在   org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3489)     在   org.apache.camel.impl.DefaultCamelContext $ 4.call(DefaultCamelContext.java:3248)     在   org.apache.camel.impl.DefaultCamelContext $ 4.call(DefaultCamelContext.java:3244)     在   org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3267)     在   org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3244)     在   org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)     在   org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3160)     在   org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:133)     ...省略了29个共同的框架   java.nio.channels.OverlappingFileLockException:在处为null   sun.nio.ch.SharedFileLockTable.checkList(未知源)位于   sun.nio.ch.SharedFileLockTable.add(未知来源)在   sun.nio.ch.FileChannelImpl.tryLock(未知源)位于   java.nio.channels.FileChannel.tryLock(未知源)   org.iq80.leveldb.impl.DbLock。(DbLock.java:47)在   org.iq80.leveldb.impl.DbImpl。(DbImpl.java:169)在   org.iq80.leveldb.impl.Iq80DBFactory.open(Iq80DBFactory.java:83)在   org.apache.camel.component.leveldb.LevelDBFile.start(LevelDBFile.java:175)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)     在   org.apache.camel.component.leveldb.LevelDBAggregationRepository.doStart(LevelDBAggregationRepository.java:412)     在   org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)     在   org.apache.camel.processor.aggregate.AggregateProcessor.doStart(AggregateProcessor.java:1384)     在   org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)     在   org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1484)     在   org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)     在   org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)     在   org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:160)     在   org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:104)     在   org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:90)     在   org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:80)     在   org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)     在   org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)     在   org.apache.camel.impl.RouteService.startChildService(RouteService.java:370)     在org.apache.camel.impl.RouteService.doWarmUp(RouteService.java:196)     在org.apache.camel.impl.RouteService.warmUp(RouteService.java:145)     ...省略了40个普通框架

所有三个路由都使用LevelDBAggregationRepository,而repositoryNamepersistenFileName却是这样:

     LevelDBAggregationRepository shuttleRepo = new LevelDBAggregationRepository("shuttleArt26",
                    "mifir/data/shuttle/article26.dat");

 LevelDBAggregationRepository myTransRepoBrexit = new LevelDBAggregationRepository("jmstransBrexit",
                "mifir/data/brexit/jmstransBrexit.dat");

   LevelDBAggregationRepository myTransRepo = new LevelDBAggregationRepository("jmstrans",
                "mifir/data/art26/jmstrans.dat");

停止和重新启动Tomcat服务时,不会引发异常。

问题是在实现了多个聚合器之后出现的。

骆驼:2.23.1
春季靴:2.1.3.RELEASE
Tomcat:8.5 Windows

怎么了?

Thx

迈克

0 个答案:

没有答案