jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Purpura <dpurp...@uci.edu>
Subject Jackrabbit OCM Querying
Date Mon, 16 Mar 2009 09:06:57 GMT

When I try to retrieve an object from Jackrabbit using the
ObjectContentManager, I get the exception
³org.apache.jackrabbit.ocm.exception.IncorrectPersistentClassException: Node
type: nt:unstructured has no descriptor.²  When I am searching by the node
path, I can get around this error by supplying the class name to the
getObject function; however, the option is not available when supplying the
getObject function with a Query parameter.  It seems to me, that it should
know the type via the supplied filter.  (see code below)

Do you know a way to fix this?

            QueryManager queryManager = ocm.getQueryManager();
            // Build the search filter
            Filter filter = queryManager.createFilter(DocumentImpl.class);
            filter.addContains("personName", simpleKeyword);

            // Build the query
            Query query = queryManager.createQuery(filter);
            DocumentImpl doc = (DocumentImpl) ocm.getObject(query);

Thanks in advance,

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