我正在尝试使用下载记录程序,该记录程序应记录两个端点之间的任何类型的文件传输,如下面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 camel 2.9 jar。 请建议我是否遗漏任何配置。
提前致谢
Padmalaya
答案 0 :(得分:1)
在'from uri'和'to uri'之间使用以下
<convertBodyTo type="byte[]"/>
答案 1 :(得分:0)
我将它转换为字符串后工作,转换为字节并不真正起作用! :(
kivy.core.window.Window.size