Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 6474 invoked from network); 17 Nov 2008 15:31:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Nov 2008 15:31:31 -0000 Received: (qmail 1853 invoked by uid 500); 17 Nov 2008 15:31:39 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 1354 invoked by uid 500); 17 Nov 2008 15:31:38 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 1343 invoked by uid 99); 17 Nov 2008 15:31:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2008 07:31:37 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alessandro.bologna@gmail.com designates 209.85.198.233 as permitted sender) Received: from [209.85.198.233] (HELO rv-out-0506.google.com) (209.85.198.233) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2008 15:30:14 +0000 Received: by rv-out-0506.google.com with SMTP id k40so2564251rvb.31 for ; Mon, 17 Nov 2008 07:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=NWEifvoxZrMTZbuazcb6JEfQEi0QhYio7rFt8R1tNZ4=; b=FkjhyMdLhgtj2b/QKC87Y/BJ8fWXCroB3z7t/Ckh9ItwttErlNpYrHpxCtBPBYYHXp ll/W445e3vn1hAn0bel4ZEWUH+QJ8IRmTzOOnoJVsAHwDsd8pGi1TIGbBJJwQ/lRmJiX QK4zMrk4kjRzes+OVrS5lcycYDUtf681pB+jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=gwqsquHEH5U3Hmp6JHR+W+31+V9i03rJsdPkIC64ptWrQ9vVsICyHlHncCGyKxtcnE 3KH935k2tTSOH/M5Z0byrXdk0E2ZhrzDSYQCBEp7ThyperexWoqZ91s/Sw3QOg7nVVUH Hmd48+zup4uzYkSkSEUMghDM0fdpL/rEpMR14= Received: by 10.140.128.3 with SMTP id a3mr2289490rvd.232.1226935858657; Mon, 17 Nov 2008 07:30:58 -0800 (PST) Received: by 10.141.190.6 with HTTP; Mon, 17 Nov 2008 07:30:58 -0800 (PST) Message-ID: <29a095670811170730k7ec3c777g5b0b2bc89f35fa2d@mail.gmail.com> Date: Mon, 17 Nov 2008 10:30:58 -0500 From: "Alessandro Bologna" To: users@jackrabbit.apache.org Subject: Re: Re: exportDocumentView() and Jaxb - help needed In-Reply-To: <200811141123.33186.lukin@stu.cn.ua> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_45749_28574526.1226935858656" References: <200811132213.30506.lukin@stu.cn.ua> <29a095670811131439m5564b3bbhef213111dfa9bf63@mail.gmail.com> <200811141123.33186.lukin@stu.cn.ua> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_45749_28574526.1226935858656 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Alex, it's a bit of a shot in the dark, but looking at the code here http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java and here: http://www.docjar.com/html/api/org/xml/sax/helpers/AttributesImpl.java.html I feel inclined to think that the problem is caused by your attributes to be in no namespace. Would it be complicated (just to test) for you to try to see what happens if you set all your attributes (archiveDAte, creator etc) in some namespace (for instance, pib)? Alessandro On Fri, Nov 14, 2008 at 4:23 AM, Aleksei Lukin wrote: > Hi there! > > Thank you for response, I attached xml that > jcr_session.exportDocumentView() puts to file. > Jackrabbit adds a lot of its own namespacxes but my namespace is registerd > and present as > xmlns:pib="http://www.e-ukraine.org/datatypes/pib" > > May be other namespaces are causing JAXB exception becuase JAXB does not > know how to operate with? > But I really do not want to put all those XSDs into my app... > > On Friday 14 November 2008 00:39:18 Alessandro Bologna wrote: > > Could you possibly just post the (whole) XML that comes out from > > jcr_session.exportDocumentView(path, output, false, false)? > > It would help a lot too see what could be your issue. It could have to do > > with how namespace are registered in your repository, I had once a maybe > > similar issue. > > > > Alessandro > > > > On Thu, Nov 13, 2008 at 3:13 PM, Aleksei Lukin wrote: > > > Hi, all! > > > > > > This little piece of code worked fine with jackrabbit 1.4: > > > > > > Unmarshaller umr = getUnmarshaller(); > > > UnmarshallerHandler ctxh = umr.getUnmarshallerHandler(); > > > jcr_session.exportDocumentView(path, ctxh, false, false); > > > Object res = ctxh.getResult(); > > > > > > This little fragment allowed me fast object construction from > repository > > > xml representation. > > > > > > But now with 1.5b2 and java 1.6 native jaxb it gives > NullPointerException > > > somewhere inside of jaxb implementation. > > > There is trace: > > > > > > org.xml.sax.helpers.AttributesImpl.getIndex(AttributesImpl.java:203) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor$Att > > >ributesImpl.getIndex(InterningXmlVisitor.java:76) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader.selectLoad > > >er(XsiNilLoader.java:26) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.ProxyLoader.startElemen > > >t(ProxyLoader.java:17) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._s > > >tartElement(UnmarshallingContext.java:402) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.st > > >artElement(UnmarshallingContext.java:380) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.sta > > >rtElement(InterningXmlVisitor.java:35) > > > > > > > > > > com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startEleme > > >nt(SAXConnector.java:101) > > > > > > > > > > org.apache.jackrabbit.commons.xml.Exporter.startElement(Exporter.java:438 > > >) > > > > > > > > > > org.apache.jackrabbit.commons.xml.DocumentViewExporter.exportNode(Documen > > >tViewExporter.java:76) .... > > > Could somebody point me where to find loosed ends? I googled entire day > > > and found nothing. > > > I ended changing code that uses temporary XML file and it works but too > > > slooooow. :( > > > > > > Ofcourse I filled JIRA issue but I'm not sure it is jackrabbit only bug > > > and developers have time for such exotic use case. > > > > > > -- > > > SY, Alex Lukin > > > RIPE NIC HDL: LEXA1-RIPE > > -- > SY, Alex Lukin > RIPE NIC HDL: LEXA1-RIPE > ------=_Part_45749_28574526.1226935858656--