Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FA1D188D3 for ; Thu, 18 Feb 2016 06:19:47 +0000 (UTC) Received: (qmail 71581 invoked by uid 500); 18 Feb 2016 06:19:47 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 71538 invoked by uid 500); 18 Feb 2016 06:19:47 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 71501 invoked by uid 99); 18 Feb 2016 06:19:47 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2016 06:19:47 +0000 Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPS id 432781A0519 for ; Thu, 18 Feb 2016 06:19:47 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id 079F360DC0; Thu, 18 Feb 2016 06:19:45 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 59026] New: NullPointerException when try to Exports XLSX data using Custom XML Mapping Date: Thu, 18 Feb 2016 06:19:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: XSSF X-Bugzilla-Version: 3.14-dev X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: ehtasham37@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 https://bz.apache.org/bugzilla/show_bug.cgi?id=59026 Bug ID: 59026 Summary: NullPointerException when try to Exports XLSX data using Custom XML Mapping Product: POI Version: 3.14-dev Hardware: All OS: All Status: NEW Severity: critical Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: ehtasham37@gmail.com Created attachment 33568 --> https://bz.apache.org/bugzilla/attachment.cgi?id=33568&action=edit Zip containing sample xsd, XLSX with Custom Mapping and code to reproduce this issue I got the following exception when try to export XLSX data using my Custom XML Mapping. Its due to the following line. I comment out this line as a workaround in my project because xml in sorted order is not my requirement. This issue occur because my XML Schema contains Anonymous complex types and Abstract complex types. I need a lot of changes to use all named complex types and remove abstract types from my schema. Can I go with this workaround and expect you will fix this issue in next release, so I don't need to rebuild the whole project for this single line change. You may give an overrided method with an additional boolean parameter to get whether need sorting or not like validation as a quick fix for this. XSSFExportToXml:153 Collections.sort(xpaths, this); Here is the exception. Exception in thread "main" java.lang.NullPointerException at org.apache.poi.xssf.extractor.XSSFExportToXml.indexOfElementInComplexType(XSSFExportToXml.java:449) at org.apache.poi.xssf.extractor.XSSFExportToXml.compare(XSSFExportToXml.java:430) at org.apache.poi.xssf.extractor.XSSFExportToXml.compare(XSSFExportToXml.java:1) at java.util.TimSort.countRunAndMakeAscending(Unknown Source) at java.util.TimSort.sort(Unknown Source) at java.util.TimSort.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.Collections.sort(Unknown Source) at org.apache.poi.xssf.extractor.XSSFExportToXml.exportToXML(XSSFExportToXml.java:153) at org.apache.poi.xssf.extractor.XSSFExportToXml.exportToXML(XSSFExportToXml.java:106) I attached a zip containing sample xsd, XLSX with Custom Mapping and code to reproduce this issue. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org