使用smook进行xml转换的EDI

时间:2012-10-05 06:30:06

标签: apache-camel edi smooks

我尝试使用 org.milyn.smooks.camel.processor.SmooksProcessor 将包含EDI消息的文件转换为xml,该 org.apache.camel.Processor 接口。包含该文件的目录设置为camel源端点。但在尝试解析消息时,会发生一些错误,并按如下方式抛出 SmooksException

  

org.milyn.SmooksException:无法过滤源。       在org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:97)[milyn-smooks-core-1.5.1.jar:]       在org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:64)[milyn-smooks-core-1.5.1.jar:]       在org.milyn.Smooks._filter(Smooks.java:526)[milyn-smooks-core-1.5.1.jar:]       在org.milyn.Smooks.filterSource(Smooks.java:482)[milyn-smooks-core-1.5.1.jar:]       在org.milyn.smooks.camel.processor.SmooksProcessor.process(SmooksProcessor.java:95)[milyn-smooks-camel-1.4.jar:]       at org.apache.camel.util.AsyncProcessorConverterHelper $ ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.processor.Pipeline.process(Pipeline.java:117)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:336)[camel-core-2.10.1.jar:2.10.1]       at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139)[camel-core-2.10.1.jar:2.10.1]       在org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91)[camel-core-2.10.1.jar:2.10.1]       at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:441)[:1.6.0_33]       at java.util.concurrent.FutureTask $ Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_33]       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_33]       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_33]       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_33]       at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_33]       at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_33]       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_33]       在java.lang.Thread.run(Thread.java:662)[:1.6.0_33]

EDI消息和edi-to-xml配置与smooks网站中给出的相同。 可能是什么问题? 我使用的是milyn-smooks-camel v1.4和milyn-smooks-core v1.5.1。

提前致谢。

0 个答案:

没有答案