[
https://jira.nuxeo.com/browse/CMIS-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=94574#comment-94574
]
Florent Guillaume commented on CMIS-41:
---------------------------------------
Stack trace under PostgreSQL when not doing the proper translation:
{noformat}
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Failed
to execute query: CMISQL: SELECT cmis:name FROM File WHERE CONTAINS('title1
description1'): ERROR: syntax error in tsquery: "title1 description1"
at
org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.query(NuxeoCmisService.java:1199)
at
org.nuxeo.ecm.core.opencmis.impl.TestNuxeoBinding.query(TestNuxeoBinding.java:190)
at
org.nuxeo.ecm.core.opencmis.impl.TestNuxeoBinding.testQueryContainsSyntax(TestNuxeoBinding.java:1836)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.nuxeo.ecm.core.api.ClientException: Failed to execute query:
CMISQL: SELECT cmis:name FROM File WHERE CONTAINS('title1 description1'):
ERROR: syntax error in tsquery: "title1 description1"
at
org.nuxeo.ecm.core.api.AbstractSession.queryAndFetch(AbstractSession.java:1589)
at
org.nuxeo.ecm.core.opencmis.impl.server.NuxeoCmisService.query(NuxeoCmisService.java:1154)
... 26 more
Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception:
org.nuxeo.ecm.core.query.QueryException. message: Invalid query: CMISQL: SELECT
cmis:name FROM File WHERE CONTAINS('title1 description1')
at
org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession$SQLSessionQuery.executeAndFetch(SQLSession.java:580)
at
org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.queryAndFetch(SQLSession.java:500)
at
org.nuxeo.ecm.core.api.AbstractSession.queryAndFetch(AbstractSession.java:1586)
... 27 more
Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception:
org.nuxeo.ecm.core.storage.StorageException. message: Invalid query: CMISQL:
SELECT cmis:name FROM File WHERE CONTAINS('title1 description1')
at
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryAndFetch(JDBCMapper.java:778)
at
org.nuxeo.ecm.core.storage.sql.CachingMapper.queryAndFetch(CachingMapper.java:99)
at
org.nuxeo.ecm.core.storage.sql.SessionImpl.queryAndFetch(SessionImpl.java:1056)
at
org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession$SQLSessionQuery.executeAndFetch(SQLSession.java:577)
... 29 more
Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception:
org.postgresql.util.PSQLException. message: ERROR: syntax error in tsquery:
"title1 description1"
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:455)
at $Proxy16.executeQuery(Unknown Source)
at
org.nuxeo.ecm.core.storage.sql.jdbc.ResultSetQueryResult.<init>(ResultSetQueryResult.java:88)
at
org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryAndFetch(JDBCMapper.java:774)
... 32 more
{noformat}
> Properly support CMIS fulltext syntax
> -------------------------------------
>
> Key: CMIS-41
> URL: https://jira.nuxeo.com/browse/CMIS-41
> Project: Nuxeo Chemistry
> Issue Type: Bug
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Priority: Major
> Fix For: nuxeo-5.4.2
>
>
> CONTAINS() passes directly the fulltext query to the backend, but it should
> pre-parse it according to the CMIS syntax and transform it to the
> backend-specific syntax.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets