首先:我是Apache Camel和Stack Overflow的新手!
我已经创建了一条从SFTP服务器过滤和下载文件并在处理后删除这些文件的路由。
我的问题:在我的本地计算机上,路由工作得很好。当我在生产服务器上部署这个路由(相同的.war)时,下载可以正常工作,但是当FTP组件试图删除文件时,我得到下面的异常。开发和生产的机器有相同的camel,tomcat和java版本。唯一的区别是操作系统(开发人员: Windows 7,产品: Windows Server2008 R2)
有什么想法吗?
java.lang.IllegalArgumentException: Resolving l
追踪:
org.apache.camel.FailedToStartRouteException: Failed to start route FromSAA because of null
at org.apache.camel.impl.engine.RouteService.setUp(RouteService.java:132)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doInitRoutes(InternalRouteStartupManager.java:92)
at org.a
我想向csv编组传递一个动态分隔符,如下所示。
<marshal>
<csv delimiter="${header.FIELD_DELIMITER}"/>
</marshal>
当我像上面那样尝试时,我得到了这个异常:
Caused by: java.lang.IllegalArgumentException: Delimiter must have a length of one!
at org.apache.camel.model.dataformat.CsvDataFormat.configureDataFormat(
需要在多线程环境中执行@Handler(导入org.apache.camel.Handler)方法。下面是我的当前代码和camelroute.xml文件。任何想法或建议都是值得赞赏的。
@Component("messagehandler")
public class HandleMessages {
@Handler
public void handle(String body, Exchange exchange) throws Exception {
// do some business operation
}
}
我正致力于在一个文件夹上创建一个自动轮询,我的路由是在spring XML文件中设置的,我如何才能保持应用程序在该文件夹上运行和轮询,我可以使用常规路由在java中输入它们作为from to,但现在由于使用XML route spring,我无法创建路由构建器或添加一个。我的主线是
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.apache.camel.main.Main;
public class FileTransferinSpring {
public
我是Apache Camel的新手。我正在尝试在Apache Camel中将报头与请求正文一起发送到路由。
// headers is a map
APIResponse response = (APIResponse) producer.requestBodyAndHeader("direct:route1",body,headers);
我收到以下错误:
java.lang.IllegalArgumentException: defaultEndpoint must be specified
at org.apache.camel.util.ObjectHelper
我在做这样的事
from(rabbitmq:pollingQueue?prefetchSize=1&concurrentConsumer=10)
.process(pollingRequestStatus) // check status of the request, if not ready, requeue = true
.Choice
.when(requeue == true) // request not ready
.to(rabbitmq:pollingQueue)//back to the
我将SFTP服务器放在一个docker容器中,位于localhost:2222,用户user/pass尝试通过camel 2.22.0路由在另一个容器中建立连接,例如
from("sftp:user@localhost:2222/sftp/in?password=pass"))
.log("${file:name}");
但由于以下原因无法连接
Error auto creating directory:/sftp/in due Cannot connect to sftp://user@localhost:2222. This exception
使用blueprint 的CXF的骆驼传输文档中写道,配置如下:
客户端:<camel:conduit id="*.camel-conduit" camelContextId="camel1" />
服务器:<camel:destination id="*.camel-destination" camelContextId="camel1" />
但蓝图抱怨:'*.camel-destination' is not a valid value for 'NCname'。
我试图调用camel/java/class(这是很长的程序,所以没有时间转换)。因此,目前的解决方案是从spring启动开始,然后调用主类。
这里是springboot的主要应用程序,它将调用javaee/class,我之前尝试过简单的bean调用,所以这是我最近的一次测试,因为我想到了正确的bean调用,但是不幸的是,即使是正确的bean调用也与简单的bean调用一样错误,
@SpringBootApplication
public class App {
public static void main(String[] args) throws Exception {
我目前有一个SOAP服务,我试图访问它的端点,但是我一直收到这个错误:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>
No such operation: (HTTP GET PATH_INFO: /camel-example