Thanks for the stack trace.
Actually this has recently been fixed for the upcoming 5.1.5.
This particular error is due to:
Exception: javax.jcr.query.InvalidQueryException. message: Parse
error: data is not a RelationQueryNode
...
at
org
.apache
.jackrabbit
.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:85)
at
org
.nuxeo
.ecm.core.repository.jcr.JCRSession.findProxyNodes(JCRSession.java:413)
The core reason is that one of the parent documents has a name (short
name, not title) that starts with digits. Because we were not quoting
correctly the path before passing it to an JCR query using XPath, the
XPath query parser failed.
For the actual fix, see:
http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/43c1e5742e29
http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/1fecdf567f04
(and previous related changesets, but you get the gist).
As a workaround, in the meantime, you should ensure that no document
is created with a name that starts with digits.
Florent
On 22 May 2008, at 13:39, Romain FERE wrote:
> Thanks for your answer.
>
> Here is my source code :
>
> @In(required = false)
> CoreSession documentManager;
>
> @In(create = true)
> NavigationContext navigationContext;
>
> public boolean isCurrentDocumentPublished() throws ClientException {
> DocumentModel doc = null;
> if (navigationContext != null)
> doc = navigationContext.getCurrentDocument();
> if (doc == null)
> return false;
> return !documentManager.getProxies(doc.getRef(),
> doc.getParentRef()).isEmpty();
> }
>
> The error message is the one from the getProxies() function, the
> document 2478a973-3128-4f9d-a1ad-b056768da3eb is the parent document
> of the "doc" present in my function above.
>
> If it can help, I join my stack trace named stack-
> trace-20-05-18-30.txt.
>
> I make more tests since this afternoon and I discover that I have
> the same error with this function (with the same Seam context etc) :
>
> public String getPublishedVersion() throws ClientException {
> DocumentModel doc = null;
> DocumentModelList proxies = null;
> if (navigationContext != null)
> doc = navigationContext.getCurrentDocument();
> if (documentManager != null)
> proxies = documentManager.getProxies(doc.getRef(),
> doc.getParentRef());
> if (proxies != null)
> if (!proxies.isEmpty()) {
> DocumentModel proxy = proxies.get(0);
> return String.format("%02d.%02d",
> proxy.getProperty("uid:major_version").getValue(Long.class),
> proxy.getProperty("uid:minor_version").getValue(Long.class));
> } else {
> throw new ClientException("document is not published");
> }
> return "document is not available";
> }
>
> Thanks in advance.
> --
> Romain FERE <stack-
> trace-20-05-18-30.txt>_______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm