tFileExcelWorkbookOpenfailing in ESB, OK in Studio

Four Stars

tFileExcelWorkbookOpenfailing in ESB, OK in Studio

Hi,
I am trying to use Jan Lolling's Excel components. My job is working fine when I run it in Talend Studio, but when I publish it to the ESB I get a Java Exception in tFileExcelWorkbookOpen. I have tried both with and without "Use default xml parser" checked. If I have it checked I get an NoClassDefFoundError exception with a stack trace of:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller
 at org.apache.poi.openxml4j.opc.OPCPackage.init(OPCPackage.java:162)
 at org.apache.poi.openxml4j.opc.OPCPackage.<init>(OPCPackage.java:142)
 at org.apache.poi.openxml4j.opc.Package.<init>(Package.java:37)
 at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:88)
 at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:273)
 at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
 at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:273)
 at de.cimt.talendcomp.tfileexcelpoi.SpreadsheetFile.initializeWorkbook(SpreadsheetFile.java:343)
 at vm_bc_franchise_lut.vmlut_fetch_2_0.vmlut_fetch.tRouteInput_1Process(vmlut_fetch.java:2573)


If I don't have it checked I get a ... exception with a stack trace of:

java.lang.ExceptionInInitializerError
 at org.apache.poi.openxml4j.opc.OPCPackage.init(OPCPackage.java:162)
 at org.apache.poi.openxml4j.opc.OPCPackage.<init>(OPCPackage.java:142)
 at org.apache.poi.openxml4j.opc.Package.<init>(Package.java:37)
 at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:88)
 at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:273)
 at org.apache.poi.util.PackageHelper.open(PackageHelper.java:37)
 at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:273)
 at de.cimt.talendcomp.tfileexcelpoi.SpreadsheetFile.initializeWorkbook(SpreadsheetFile.java:343)
 at vm_bc_franchise_lut.vmlut_fetch_2_0.vmlut_fetch.tRouteInput_1Process(vmlut_fetch.java:2573)
 at vm_bc_franchise_lut.vmlut_fetch_2_0.vmlut_fetch.runJobInTOS(vmlut_fetch.java:17670)
 at org.talend.camel.TalendProducer.invokeTalendJob(TalendProducer.java:109)
 at org.talend.camel.TalendProducer.process(TalendProducer.java:65)
 at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
 at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)
 at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
 at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
 at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
 at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
 at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
 at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
 at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:165)
 at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:73)
 at java.util.TimerThread.mainLoop(Timer.java:555)
 at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassCastException: org.apache.xerces.stax.XMLEventFactoryImpl cannot be cast to javax.xml.stream.XMLEventFactory
 at javax.xml.stream.XMLEventFactory.newInstance(XMLEventFactory.java:30)
 at org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller.<clinit>(PackagePropertiesMarshaller.java:41)
 ... 24 more

Any help would be greatly appreciated as this is my last stumbling block to getting this project running live.
Moderator

Re: tFileExcelWorkbookOpenfailing in ESB, OK in Studio

Hi,
The tfileexcelworkbookopen is custom component written by talend community user and shared on Talend Exchange Portal.
Please feel free to contact to the author jlolling directly.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seventeen Stars

Re: tFileExcelWorkbookOpenfailing in ESB, OK in Studio

To be honest I have not tried it in a service in an OSGI bundle. I will check soon that and come back with a solution.
Four Stars

Re: tFileExcelWorkbookOpenfailing in ESB, OK in Studio

Thanks Jan. If you need any further information from my I will be happy to provide it. There is nothing confidential in what I am doing (either code or data) so I Can easily grab any logs etc. that would help.
Seventeen Stars

Re: tFileExcelWorkbookOpenfailing in ESB, OK in Studio

I have updated the component to release 7.1 and published on Talend Exchange. Unfortunately it takes usually some days until Talend approve this. I have tested it with a Talend Runtime 6.1.1 running under Debian 8 and Java 8 jdk (Oracle JDK).