Results 1 to 6 of 6
  1. #1
    Mimmo is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Default PPTX Error: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExcepti

    consider that i use Tomcat 4.1.18 and jvm 1.5, when i execute this line:
    XMLSlideShow ppt = new XMLSlideShow()

    i receive thsi error:
    org.apache.poi.POIXMLException: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
    at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>( XMLSlideShow.java:82)
    at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>( XMLSlideShow.java:68)
    at it.sword.dei.client.taglib.GeneratorePowerPoint.co ncatFilesPPTX(GeneratorePowerPoint.java:65)
    at it.oxero.dei.client.ext.action.ExecuteConcatReport Action.internalProcess(ExecuteConcatReportAction.j ava:260)
    at it.sword.dei.client.function.AbstractFunctionManag er.executeAction(AbstractFunctionManager.java:62)
    at it.oxero.dei.client.ext.function.FunctionManager.e xecuteFunction(FunctionManager.java:119)
    at it.sword.dei.client.function.AbstractFunctionManag er.manageFunction(AbstractFunctionManager.java:151 )
    at it.sword.dei.client.model.jsp.ModelManagerServlet. invokeFunction(ModelManagerServlet.java:57)
    at it.sword.dei.client.model.jsp.ModelManagerServlet. performTask(ModelManagerServlet.java:92)
    at it.sword.dei.jsp.DeiServlet.service(DeiServlet.jav a:1144)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:260)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:641)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:432)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:386)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:534)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:530)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
    at org.apache.poi.xslf.usermodel.XSLFFactory.createDo cumentPart(XSLFFactory.java:66)
    at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocum entPart.java:403)
    at org.apache.poi.POIXMLDocument.load(POIXMLDocument. java:155)
    at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>( XMLSlideShow.java:80)
    ... 39 more
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.apache.poi.xslf.usermodel.XSLFFactory.createDo cumentPart(XSLFFactory.java:64)
    ... 42 more
    Caused by: java.lang.NoClassDefFoundError
    at org.openxmlformats.schemas.presentationml.x2006.ma in.SldMasterDocument$Factory.parse(Unknown Source)
    at org.apache.poi.xslf.usermodel.XSLFSlideMaster.<ini t>(XSLFSlideMaster.java:68)
    ... 47 more


    What can i do to solve this problem?
    Thanks in advance
    Last edited by Mimmo; 04-25-2013 at 01:04 AM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: PPTX Error: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExc

    Looks like you haven't got the poi-ooxml jar(s) in your runtime classpath.
    At least not the schemas one.
    Here's the components page, which goes through the requires jars.
    Please do not ask for code as refusal often offends.

  3. #3
    Mimmo is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Default Re: PPTX Error: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExc

    Hi,
    i use these library:
    1) poi-3.9-20121203.jar
    2) poi-ooxml-3.9-20121203.jar
    3) poi-ooxml-schemas-3.9-20121203.jar
    4) xbean.jar
    5) dom4j-1.6.1.jar

    If i use a standalone class with main in which i use poi, it's O, but if i insert my class in my web application that run on Tomcat (4.1.18 or 5.5.27) i receive the error.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: PPTX Error: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExc

    Then you haven't got the jar files on your class path.
    In the case of your Tomcat webapp that would be in the WEB-INF/lib directory.
    Please do not ask for code as refusal often offends.

  5. #5
    Mimmo is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Default Re: PPTX Error: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExc

    Quote Originally Posted by Tolls View Post
    Then you haven't got the jar files on your class path.
    In the case of your Tomcat webapp that would be in the WEB-INF/lib directory.
    I explained myself bad, I put the 5 classes also in my classpath.

  6. #6
    Mimmo is offline Member
    Join Date
    Apr 2013
    Posts
    7
    Rep Power
    0

    Default Re: PPTX Error: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExc

    SOLVED!!
    I forgot to insert the other jar stax-api-1.0.1.jar as indicated on the components page, even if the strange thing is that when I tried it as a standalone did not give error...
    Thanks for your help.

Similar Threads

  1. java.lang.reflect.InvocationTargetException
    By Dissonance in forum Java Applets
    Replies: 30
    Last Post: 06-10-2012, 01:22 AM
  2. How to unwrap java.lang.reflect.InvocationTargetException
    By iamlearning in forum Advanced Java
    Replies: 0
    Last Post: 09-28-2011, 04:03 PM
  3. Problems with java.lang.reflect
    By Boreeas in forum New To Java
    Replies: 9
    Last Post: 08-07-2011, 11:22 PM
  4. Replies: 13
    Last Post: 07-09-2010, 05:50 AM
  5. Replies: 0
    Last Post: 01-06-2010, 01:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •