我正在尝试使用一个下载记录器,它应该记录两个端点之间的任何类型的文件传输,如下面在 camel-context.xml 中定义的那样
<process ref="downloadLogger"/>
<to uri="file:src/main/resources/META-INF?noop=true"/>
<!-- Prepare the message for calling OFBiz service -->
<setHeader headerName="Ofbiz.ServiceName">
<constant>DownLoadLogger</constant>
</setHeader>
<setHeader headerName="Ofbiz.Param.note">
<simple>${in.body}</simple>
</setHeader>
<!-- Call the OFBiz service -->
<camel:process ref="ofbizDispatcher"/>
</camel:route>
但这会导致
java.io.NotSerializableException: org.apache.camel.component.file.GenericFile
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1196)[camel-core-2.9.0.jar:2.9.0]
at org.apache.camel.component.bean.BeanInvocation.invoke(BeanInvocation.java:87)[camel-core-2.9.0.jar:2.9.0]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:128)[camel-core-2.9.0.jar:2.9.0]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)[camel-core-2.9.0.jar:2.9.0]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:73)[camel-core-2.9.0.jar:2.9.0]
at org.apache.camel.component.rmi.RmiProducer.process(RmiProducer.java:45)[camel-rmi-2.9.0.jar:2.9.0]
我正在使用 jdk 1.6 骆驼 2.9 罐子。请建议我是否在任何地方缺少任何配置。
提前致谢
帕德马拉雅