Seven Stars

Error Calling DI Job from ESB Route - tRouteInput_1_In Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

I have simple requirement :

  • I have created route that looks for file on FTP, 
  • Copy that file onto shared location
  • Call DI job to process that file

    Route
    FTP Route.PNG

DI Job screenshot
DI Job.PNG

however i keep getting this error 

 

Any idea?

 

Exception in component tRouteInput_1_In (TestRouteDIJob)
org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at routines.system.ParserUtils.parseTo_Document(ParserUtils.java:280)
at routines.system.ParserUtils.parseTo_Document(ParserUtils.java:259)
at routines.system.ParserUtils.parseTo_Document(ParserUtils.java:255)
at misc_projects.testroutedijob_0_1.TestRouteDIJob.tRouteInput_1_LoopProcess(TestRouteDIJob.java:1074)
at misc_projects.testroutedijob_0_1.TestRouteDIJob.runJobInTOS(TestRouteDIJob.java:1949)
at misc_projects.testroutedijob_0_1.TestRouteDIJob$1.runSingleUseJob(TestRouteDIJob.java:364)
at org.talend.camel.TalendProducer.invokeTalendJob(TalendProducer.java:206)
at org.talend.camel.TalendProducer.process(TalendProducer.java:122)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:95)
at misc_projects.ncoa_dummy_route_0_1.NCOA_Dummy_Route$1$1$1.process(NCOA_Dummy_Route.java:150)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:95)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:63)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:172)
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454)
at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:137)
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:226)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:190)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Nested exception:
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at routines.system.ParserUtils.parseTo_Document(ParserUtils.java:280)
at routines.system.ParserUtils.parseTo_Document(ParserUtils.java:259)
at routines.system.ParserUtils.parseTo_Document(ParserUtils.java:255)
at misc_projects.testroutedijob_0_1.TestRouteDIJob.tRouteInput_1_LoopProcess(TestRouteDIJob.java:1074)
at misc_projects.testroutedijob_0_1.TestRouteDIJob.runJobInTOS(TestRouteDIJob.java:1949)
at misc_projects.testroutedijob_0_1.TestRouteDIJob$1.runSingleUseJob(TestRouteDIJob.java:364)
at org.talend.camel.TalendProducer.invokeTalendJob(TalendProducer.java:206)
at org.talend.camel.TalendProducer.process(TalendProducer.java:122)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)

 

Eventually I will update my DI job to process file something tFilelist-->tFileInputDelimited-->tMap-->SQL once I figure out this error.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: Error Calling DI Job from ESB Route - tRouteInput_1_In Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

I think I solved this issue, the issue was that I had tRouteInput component input as document type & incoming file was txt that I was trying to parse as xml hence this error.

 

I changed that to string & added another component as  tFilelist-->tFileInputDelimited-->tMap-->SQL to process my file in DI job.

 

 

 
 
1 REPLY
Seven Stars

Re: Error Calling DI Job from ESB Route - tRouteInput_1_In Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.

I think I solved this issue, the issue was that I had tRouteInput component input as document type & incoming file was txt that I was trying to parse as xml hence this error.

 

I changed that to string & added another component as  tFilelist-->tFileInputDelimited-->tMap-->SQL to process my file in DI job.