Forum Stats

  • 3,816,115 Users
  • 2,259,144 Discussions
  • 7,893,390 Comments

Discussions

XMLSlideShow

managed BEAN
managed BEAN Member Posts: 948 Silver Badge
edited Apr 6, 2018 11:05AM in Java Programming

Hello,

I am developing an application that is getting a file (can be pdf,html,pptx,rtf and xlsx extensions) and should create a picture (png) of first page and store in DB has Blob.

I successfully done it to PDF, but now i am trying for the other formats.

I am following this: https://www.tutorialspoint.com/apache_poi_ppt/apache_poi_ppt_to_image.htm  for pptx.

But when i run the method it is giving error:

<oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl> <DiagnosticsDataExtractorImpl> <createADRIncident> <incident 1399 created with problem key "ADFC-00032 [ADFc]"> <oracle.adf.view> <RichExceptionHandler> <_logUnhandledException> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5> javax.el.ELException: //oracle/app/.jdeveloper12212/system12.2.1.2.42.170105.1224/o.j2ee/drs/Booq/ViewControllerWebApp.war/pages/mainareas/reports/ReportParameters.jsff @179,102 actionListener="#{viewScope.reportParametersBean.pptxTeste}": org.apache.poi.POIXMLException: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExceptionat com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:147)at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:1127)at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)at oracle.adf.view.rich.event.ProxyEvent.broadcastWrappedEvent(ProxyEvent.java:72)at oracle.adf.view.rich.component.fragment.UIXRegion._handleProxyEvent(UIXRegion.java:933)at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:117)at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)at oracle.adf.view.rich.event.ProxyEvent.broadcastWrappedEvent(ProxyEvent.java:72)at oracle.adf.view.rich.component.fragment.UIXRegion._handleProxyEvent(UIXRegion.java:933)at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:117)at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1243)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeInvokeApplication(LifecycleImpl.java:686)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:364)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:227)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:650)at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:207)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:354)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:232)at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:169)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:141)at java.security.AccessController.doPrivileged(Native Method)at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:124)at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:232)at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:141)at java.security.AccessController.doPrivileged(Native Method)at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:124)at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:232)at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691)at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651)at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)Caused by: org.apache.poi.POIXMLException: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExceptionat org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:82)at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:87)at com.concept.booq.view.beans.pages.mainareas.reports.ReportParameters.pptxTeste(ReportParameters.java:433)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:181)at com.sun.el.parser.AstValue.invoke(AstValue.java:289)at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)... 76 moreCaused by: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExceptionat org.apache.poi.xslf.usermodel.XSLFFactory.createDocumentPart(XSLFFactory.java:66)at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403)at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155)at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:80)... 86 moreCaused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at org.apache.poi.xslf.usermodel.XSLFFactory.createDocumentPart(XSLFFactory.java:64)... 89 moreCaused by: java.lang.NoClassDefFoundError: org/openxmlformats/schemas/presentationml/x2006/main/SldMasterDocument$Factoryat org.apache.poi.xslf.usermodel.XSLFSlideMaster.<init>(XSLFSlideMaster.java:68)... 94 more<oracle.adf.view> <PartialResponseUtils> <handleError> <ADF_FACES-60096:Server Exception during PPR, #1> javax.el.ELException: //oracle/app/.jdeveloper12212/system12.2.1.2.42.170105.1224/o.j2ee/drs/Booq/ViewControllerWebApp.war/pages/mainareas/reports/ReportParameters.jsff @179,102 actionListener="#{viewScope.reportParametersBean.pptxTeste}": org.apache.poi.POIXMLException: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExceptionat com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:147)at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:1127)at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)at oracle.adf.view.rich.event.ProxyEvent.broadcastWrappedEvent(ProxyEvent.java:72)at oracle.adf.view.rich.component.fragment.UIXRegion._handleProxyEvent(UIXRegion.java:933)at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:117)at org.apache.myfaces.trinidad.component.UIXComponent.broadcastInContext(UIXComponent.java:364)at oracle.adf.view.rich.event.ProxyEvent.broadcastWrappedEvent(ProxyEvent.java:72)at oracle.adf.view.rich.component.fragment.UIXRegion._handleProxyEvent(UIXRegion.java:933)at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:117)at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1243)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeInvokeApplication(LifecycleImpl.java:686)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:364)at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:227)at javax.faces.webapp.FacesServlet.service(FacesServlet.java:650)at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:207)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:354)at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:232)at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:169)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:141)at java.security.AccessController.doPrivileged(Native Method)at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:124)at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:232)at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:141)at java.security.AccessController.doPrivileged(Native Method)at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:124)at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:232)at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683)at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691)at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651)at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)Caused by: org.apache.poi.POIXMLException: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExceptionat org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:82)at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:87)at com.concept.booq.view.beans.pages.mainareas.reports.ReportParameters.pptxTeste(ReportParameters.java:433)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:181)at com.sun.el.parser.AstValue.invoke(AstValue.java:289)at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)... 76 moreCaused by: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetExceptionat org.apache.poi.xslf.usermodel.XSLFFactory.createDocumentPart(XSLFFactory.java:66)at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403)at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155)at org.apache.poi.xslf.usermodel.XMLSlideShow.<init>(XMLSlideShow.java:80)... 86 moreCaused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at org.apache.poi.xslf.usermodel.XSLFFactory.createDocumentPart(XSLFFactory.java:64)... 89 moreCaused by: java.lang.NoClassDefFoundError: org/openxmlformats/schemas/presentationml/x2006/main/SldMasterDocument$Factoryat org.apache.poi.xslf.usermodel.XSLFSlideMaster.<init>(XSLFSlideMaster.java:68)... 94 more

The line where the error occurs is:

XMLSlideShow ppt = new XMLSlideShow(new FileInputStream(file));

Can you help me figure it out?

Thanks and regards,

Carlos

Best Answer

Answers

This discussion has been closed.