Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39169 > unrolled thread

JCR ModeShape non-existant column 'mode:localName'

Started byArne Vajhøj <arne@vajhoej.dk>
First post2019-10-04 21:12 -0400
Last post2019-11-17 20:00 -0500
Articles 2 — 1 participant

Back to article view | Back to comp.lang.java.programmer


Contents

  JCR ModeShape non-existant column 'mode:localName' Arne Vajhøj <arne@vajhoej.dk> - 2019-10-04 21:12 -0400
    Re: JCR ModeShape non-existant column 'mode:localName' Arne Vajhøj <arne@vajhoej.dk> - 2019-11-17 20:00 -0500

#39169 — JCR ModeShape non-existant column 'mode:localName'

FromArne Vajhøj <arne@vajhoej.dk>
Date2019-10-04 21:12 -0400
SubjectJCR ModeShape non-existant column 'mode:localName'
Message-ID<qn8ql6$11c4$1@gioia.aioe.org>
I am playing a little bit with JCR.

I have this piece of code doing a JCR SQL2 query:

Query q = ses.getWorkspace().getQueryManager().createQuery("SELECT 
author,time,title,body FROM [nt:unstructured] WHERE author = '" + author 
+ "' AND title IS NOT NULL", Query.JCR_SQL2);
QueryResult q1 = q.execute();

When using JackRabbit as implementation it works.

When using ModeShape as implementation then execute gives me:

Exception in thread "main" 
org.modeshape.jcr.query.parse.InvalidQueryException: The view references 
a non-existant column 'mode:localName' in '__ALLNODES__'

I tried both version 5.4.1 and 4.6.2 - same exception in both.

It is documented that ModeShape use a pseudo property/column
mode:localName.

https://docs.jboss.org/author/display/MODE50/Query+and+search

<quote>
ModeShape adds support for several columns that don't really exist on 
any node types but that are implicit in JCR. You can use these columns 
anywhere in a query that columns can normally be used.
...
mode:localName 	The local name of the node. The value is equivalent to 
jcr:name except without the namespace portion of the name.
</quote>

So it is supposed to be there.

But per exception message it is not.

And furthermore I am not trying to use it (explicitly).

Anybody with ModeShape experience that can provide some
hints about what I am doing wrong?

Arne


[toc] | [next] | [standalone]


#39178

FromArne Vajhøj <arne@vajhoej.dk>
Date2019-11-17 20:00 -0500
Message-ID<qqsqeo$g1r$1@gioia.aioe.org>
In reply to#39169
On 10/4/2019 9:12 PM, Arne Vajhøj wrote:
> I am playing a little bit with JCR.
> 
> I have this piece of code doing a JCR SQL2 query:
> 
> Query q = ses.getWorkspace().getQueryManager().createQuery("SELECT 
> author,time,title,body FROM [nt:unstructured] WHERE author = '" + author 
> + "' AND title IS NOT NULL", Query.JCR_SQL2);
> QueryResult q1 = q.execute();
> 
> When using JackRabbit as implementation it works.
> 
> When using ModeShape as implementation then execute gives me:
> 
> Exception in thread "main" 
> org.modeshape.jcr.query.parse.InvalidQueryException: The view references 
> a non-existant column 'mode:localName' in '__ALLNODES__'
> 
> I tried both version 5.4.1 and 4.6.2 - same exception in both.
> 
> It is documented that ModeShape use a pseudo property/column
> mode:localName.
> 
> https://docs.jboss.org/author/display/MODE50/Query+and+search
> 
> <quote>
> ModeShape adds support for several columns that don't really exist on 
> any node types but that are implicit in JCR. You can use these columns 
> anywhere in a query that columns can normally be used.
> ...
> mode:localName     The local name of the node. The value is equivalent 
> to jcr:name except without the namespace portion of the name.
> </quote>
> 
> So it is supposed to be there.
> 
> But per exception message it is not.
> 
> And furthermore I am not trying to use it (explicitly).

Problem went away when I stopped using namespace in
node names.

What can I say.

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web