jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingomar Otter <ingomar.ot...@valtech.de>
Subject Faulty XML import / property export?
Date Tue, 20 Dec 2011 16:22:07 GMT
Folks,

I am implementing a primitive replication based on XMLImport/Export on 2.2.10.

Having written nodes into a Repo using Session.importXML I get the following exception when

accessing any document through WebDav:

java.io.IOException: not a long: 2011-12-20T09:24:30.608+01:00
        org.apache.jackrabbit.server.io.DefaultHandler.exportProperties(DefaultHandler.java:497)
        org.apache.jackrabbit.server.io.DefaultHandler.exportContent(DefaultHandler.java:399)
        org.apache.jackrabbit.server.io.DefaultHandler.exportContent(DefaultHandler.java:421)
        org.apache.jackrabbit.server.io.IOManagerImpl.exportContent(IOManagerImpl.java:177)
        org.apache.jackrabbit.webdav.simple.DavResourceImpl.spool(DavResourceImpl.java:282)
        org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.spoolResource(AbstractWebdavServlet.java:507)
        org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.doGet(AbstractWebdavServlet.java:473)
        org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.execute(AbstractWebdavServlet.java:314)
        org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:263)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

I looked at DefaultHandler, this seems to try to interpret "jcr:created" as Long:

protected void exportProperties(ExportContext context, boolean isCollection, Node contentNode)
throws IOException {
        try {
            // only non-collections: 'jcr:created' is present on the parent 'fileNode' only
            if (!isCollection && contentNode.getDepth() > 0 && contentNode.getParent().hasProperty(JcrConstants.JCR_CREATED))
{
                long cTime = contentNode.getParent().getProperty(JcrConstants.JCR_CREATED).getValue().getLong();

jcr:created is defined as date.

Where is the problem? Parsing the value? The value itself?

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