Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 85002 invoked from network); 18 Nov 2008 19:44:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Nov 2008 19:44:06 -0000 Received: (qmail 22847 invoked by uid 500); 18 Nov 2008 19:44:13 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 22816 invoked by uid 500); 18 Nov 2008 19:44:13 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 22751 invoked by uid 99); 18 Nov 2008 19:44:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 11:44:13 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 19:42:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 46176234C28C for ; Tue, 18 Nov 2008 11:43:44 -0800 (PST) Message-ID: <164815592.1227037424286.JavaMail.jira@brutus> Date: Tue, 18 Nov 2008 11:43:44 -0800 (PST) From: "Alex Lukin (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1852) session.exportDocumentView() does not work with jaxb 2.1.x UnmarshallerHandler In-Reply-To: <240906394.1226525384436.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648721#action_12648721 ] Alex Lukin commented on JCR-1852: --------------------------------- Thak you very much, my app works as it should. I just moved file from trunk to 1.5 branch, compiled commons and replaced in my app libs. Everything works fine. Pleas include this fix in 1.5 release. > session.exportDocumentView() does not work with jaxb 2.1.x UnmarshallerHandler > ------------------------------------------------------------------------------- > > Key: JCR-1852 > URL: https://issues.apache.org/jira/browse/JCR-1852 > Project: Jackrabbit > Issue Type: Bug > Components: jackrabbit-jcr-commons > Affects Versions: 1.5.0 > Environment: jdk 1.6.10 Linux > Reporter: Alex Lukin > Assignee: Jukka Zitting > Fix For: 1.5.0 > > Original Estimate: 3h > Remaining Estimate: 3h > > I tried to update my project from Jackrabbit 1.4 to 1.5 and found following error, that is critical for my app. > Project uses Import/Export features of JCR and JAXB to map XML from JCR to java objects. > exportDocumentView() works with streams when I call it like this: > Unmarshaller umr = getUnmarshaller(); > ... > fo = new FileOutputStream("/tmp/export-node.xml"); > jcrs.exportDocumentView(path,fo , false, false); > fi = new FileInputStream("/tmp/export-node.xml"); > umr.unmarshal(new InputSource(fi)); > But it does not work when I call it using SAX event handler: > UnmarshallerHandler ctxh = umr.getUnmarshallerHandler(); > jcrs.exportDocumentView(path, ctxh, false, false); > giving following exception: > java.lang.NullPointerException > at org.xml.sax.helpers.AttributesImpl.getIndex(AttributesImpl.java:203) > at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor$AttributesImpl.getIndex(InterningXmlVisitor.java:112) > at com.sun.xml.bind.v2.runtime.unmarshaller.XsiNilLoader.selectLoader(XsiNilLoader.java:62) > at com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:53) > at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:449) > at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:427) > at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:71) > at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:137) > at org.apache.jackrabbit.commons.xml.Exporter.startElement(Exporter.java:438) > at org.apache.jackrabbit.commons.xml.DocumentViewExporter.exportNode(DocumentViewExporter.java:76) > at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:298) > at org.apache.jackrabbit.commons.xml.Exporter.exportNodes(Exporter.java:214) > at org.apache.jackrabbit.commons.xml.DocumentViewExporter.exportNode(DocumentViewExporter.java:77) > at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:298) > at org.apache.jackrabbit.commons.xml.Exporter.exportNodes(Exporter.java:214) > at org.apache.jackrabbit.commons.xml.DocumentViewExporter.exportNode(DocumentViewExporter.java:77) > at org.apache.jackrabbit.commons.xml.Exporter.exportNode(Exporter.java:298) > at org.apache.jackrabbit.commons.xml.Exporter.export(Exporter.java:144) > at org.apache.jackrabbit.commons.AbstractSession.export(AbstractSession.java:461) > at org.apache.jackrabbit.commons.AbstractSession.exportDocumentView(AbstractSession.java:241) > at ua.org.dg.semaril.helpers.AbstractTypeResolver.getContent(AbstractTypeResolver.java:31 > Version 1.4. works fine. > Jukka, please check your changes to org.apache.jackrabbit.commons.xml.Exporter. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.