0
好吧,仍然忙于使用MySQL文件使用者的文件。我开始遇到某些大文件的错误,并希望将它们发送到另一条路径进行处理。所以这个想法是一个简单的基于内容的路由器,它将查看文件大小,如果它是一个大文件,则将其复制到另一个目录并保留在那里(再次简单了解如何执行此操作)。如何根据Apache Camel中的大小路由文件
所以我开始阅读关于CBR以及如何在我的骆驼环境中使用简单的表达式语言。所以我添加了一个CBR到camel-context.xml文件,现在我甚至不能运行任何路由。构建失败,出现以下错误:
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 48 in XML document from class path resource [META-INF/spring/camel-context.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
右键所以很明显,我得到了一些不好的XML在那里,但对我的生活我不能似乎可能找到问题的一些较有经验的车友可以给我一些通过快速浏览我的xml文件,在此建议。
<errorHandler id="defaultEH" type="DefaultErrorHandler">
<redeliveryPolicy
maximumRedeliveries="5"
retryAttemptedLogLevel="WARN"
backOffMultiplier="1"
useExponentialBackOff="true"/>
</errorHandler>
<threadPoolProfile id="myDefaultProfile"
defaultProfile="true"
maxPoolSize="16"/>
<threadPool id="myPool" threadName="Cool" poolSize="4" maxPoolSize="4" maxQueueSize="100"/>
<route handleFault="true">
<from uri="file://c:/CTest/BadFiles?noop=true&recursive=true&delay=3000"/>
<choice>
<when>
<simple>${file:length}<20000000</simple>
<threads executorServiceRef="myPool">
<to uri="bean://fileToSQL"/>
</threads>
</when>
<otherwise>
<to uri="file://c:/CTest/outbox"/>
<stop/>
</otherwise>
</choice>
<!--<to uri="jdbc://timlogdb"/>-->
</route>
我到处看着,根据我的理解,这应该是有效的XML。
我认为这是愚蠢的。今天工作太多的人认为是冰冷啤酒的时候了。谢谢 – Namphibian 2012-03-26 14:29:26