| Summary: | Cannot run JCRSQL query with PATH thoruch ModeShape VDB | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 5 | Reporter: | Jiri Pechanec <jpechane> |
| Component: | Documentation, EDS | Assignee: | Van Halbert <vhalbert> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.1.0.ER3 | ||
| Target Milestone: | --- | ||
| Target Release: | 5.1.0.ER4 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/SOA-2534 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-11-10 14:35:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Link: Added: This issue is related to TEIID-1106 Due to the documentation is lagging in this regard, here is link has some information discussing how to query ModeShape thru Teiid. Additional documentation regarding the pseudo columns can be found here: http://docs.jboss.org/modeshape/2.3.0.Final/manuals/reference/html_single/reference-guide-en.html#jcr-sql2-pseudo-columns The correct syntax for your query is: SELECT * FROM nt_base WHERE nt_base.jcr_path = '/queryNode' The PATH() function is not usable when querying ModeShape thru Teiid, instead the pseudo column of jcr_path is used instead. See the pseudo column documentation on the above comment. The statement suggested does not work as table nt_base does not exist but this statement works SELECT * FROM 'nt:base' WHERE 'nt:base'.'jcr:path' = '/queryNode' If this syntax is correct then please resolve the issue again The syntax, thru Teiid, should look like: select * from nt_base where nt_base.jcr_path = '/queryNode' Wrong datasource - my bad, sorry for this Verified in ER4 |
project_key: SOA If i directly query ModeShape datasource using SELECT * FROM [nt:base] WHERE PATH([nt:base]) = '/queryNode' then I got proper result If I use ModeShape VDB I cannot get any syntax running SELECT * FROM nt_base WHERE PATH([nt:base]) = '/queryNode' throws 10:04:37,753 WARN [PROCESSOR] Processing exception 'Lexical error: Lexical error at line 1, column 34. Encountered: "[" (91), after : ""' for request C6VtYWzw9vqI.0. Exception type org.teiid.api.exception.query.QueryParserException thrown from org.teiid.query.parser.QueryParser.handleTokenMgrError(QueryParser.java:209). Enable more detailed logging to see the entire stacktrace. SELECT * FROM nt_base WHERE PATH(nt_base) = '/queryNode' throws 10:04:10,028 WARN [PROCESSOR] Processing exception 'Element "nt_base" is not defined by any relevant group.' for request TpmZ4gS2CbJG.0. Exception type org.teiid.api.exception.query.QueryResolverException thrown from org.teiid.query.resolver.util.ResolverVisitor.handleUnresolvedElement(ResolverVisitor.java:121). Enable more detailed logging to see the entire stacktrace. SELECT * FROM nt_base WHERE PATH(nt:base) = '/queryNode' throws 10:12:28,506 WARN [PROCESSOR] Processing exception 'Lexical error: Lexical error at line 1, column 36. Encountered: ":" (58), after : ""' for request i/qpHO7RMYbR.0. Exception type org.teiid.api.exception.query.QueryParserException thrown from org.teiid.query.parser.QueryParser.handleTokenMgrError(QueryParser.java:209). Enable more detailed logging to see the entire stacktrace.