jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Bologna" <alessandro.bolo...@gmail.com>
Subject Re: Re: exportDocumentView() and Jaxb - help needed
Date Mon, 17 Nov 2008 15:30:58 GMT
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 <lukin@stu.cn.ua> 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 <lukin@stu.cn.ua> 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<http://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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message