3 Replies Latest reply on Jun 6, 2013 12:20 AM by KevinLiujw

    failed while import excel 2007 [xlsx]

    KevinLiujw

      Hi All,

       

      A strange thing, I import the 'xls' and 'csv' in my code is well done, but for the 'XLSX' throw the following exception,

      I have already check the 'com.adobe.granite.poi-1.0.2.jar', it miss the org.w3c.dom.Node (seems exist in jre/rt.jar)

      environment :

          jdk 1.6.0_37

          CQ 5.5

       

       

      Could you help ??

       

       

       

      org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

                at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62)

                at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:414)

                at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155)

                at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:181)

                at hps.hec.bulky.XlsxAnalysis.readEvents(hps.hec.bulky.XlsxAnalysis.java:267)

                at hps.hec.bulky.EventAnalysis.readEvents(hps.hec.bulky.EventAnalysis.java:64)

                at hps.hec.servlet.ImportEventServlet.doPost(hps.hec.servlet.ImportEventServlet.java:73)

                at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.ja va:148)

                at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:344)

                at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:375)

                at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:500)

                at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilter Chain.java:45)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

                at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:147)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:308 )

                at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:141)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProce ssorImpl.java:257)

                at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChai n.java:49)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

                at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:296)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgre ssTrackerLogFilter.java:59)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.j ava:220)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:76)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:117)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:89)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServle tStarterFilter.java:135)

                at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

                at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcess orImpl.java:153)

                at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:206)

                at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:9 6)

                at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)

                at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java: 42)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:49)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:117)

                at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

                at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:179)

                at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

                at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:238)

                at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

                at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75 )

                at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

                at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

                at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

                at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

                at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java: 48)

                at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)

                at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

                at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.ja va:250)

                at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:315)

                at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:334)

                at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:377)

                at com.day.j2ee.servletengine.ServletHandlerImpl.process(ServletHandlerImpl.java:351)

                at com.day.j2ee.servletengine.HttpListener$Worker.run(HttpListener.java:625)

                at java.lang.Thread.run(Unknown Source)

      Caused by: java.lang.reflect.InvocationTargetException

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

                at java.lang.reflect.Constructor.newInstance(Unknown Source)

                at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60)

                ... 76 more

      Caused by: java.lang.NoClassDefFoundError

                at org.apache.xmlbeans.XmlBeans.class$(XmlBeans.java:43)

                at org.apache.xmlbeans.XmlBeans.buildNodeMethod(XmlBeans.java:195)

                at org.apache.xmlbeans.XmlBeans.buildNodeToCursorMethod(XmlBeans.java:232)

                at org.apache.xmlbeans.XmlBeans.<clinit>(XmlBeans.java:131)

                at org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument$Factory.parse(Unknown Source)

                at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:39)

                ... 81 more

      Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node not found by com.adobe.granite.poi [250]

                at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787 )

                at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)

                at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)

                at java.lang.ClassLoader.loadClass(Unknown Source)

                at java.lang.Class.forName0(Native Method)

                at java.lang.Class.forName(Unknown Source)

                ... 87 more