cancel
Showing results for 
Search instead for 
Did you mean: 

Error in WCMQS in Alfresco 4.0.a

dmihelj
Champ in-the-making
Champ in-the-making
Hello!

I tried a fresh install of Alfresco 4.0.a with WCM-QS module. I import the website example ("Finance") but the site does not work - it gives error on web page.

In logs I get this error:
Oct 14, 2011 10:38:39 AM org.apache.solr.common.SolrException log
SEVERE: org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Type unsupported in CMIS queries: t
   at org.alfresco.opencmis.search.CMISQueryParser.buildColumns(CMISQueryParser.java:1030)
   at org.alfresco.opencmis.search.CMISQueryParser.parse(CMISQueryParser.java:140)
   at org.alfresco.solr.AlfrescoSolrDataModel.parseCMISQueryToAlfrescoAbstractQuery(AlfrescoSolrDataModel.java:1037)
   at org.alfresco.solr.query.CmisQParserPlugin$CmisQParser.parse(CmisQParserPlugin.java:245)
   at org.apache.solr.search.QParser.getQuery(QParser.java:131)
   at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
   at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
   at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
   at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
   at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
   at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:619)

2011-10-14 10:38:39,479  ERROR [extensions.webscripts.AbstractRuntime] [http-8080-39] Exception from executeScript - redirecting to status template error: 09140006 Wrapped Exception (with status template): 09140274 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 09140273 Request failed 500 /solr/alfresco/cmis?q=select+f.cmis%3AobjectId%2C+w.ws%3AhostName%2C+w.ws%3AhostPort%2C+t.cm%3Adescription+from+cmis%3Afolder+as+f++join+ws%3Awebsite+as+w++on+w.cmis%3AobjectId+%3D+f.cmis%3AobjectId++join+cm%3Atitled+as+t++on+t.cmis%3AobjectId+%3D+f.cmis%3AobjectId&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON
org.springframework.extensions.webscripts.WebScriptException: 09140006 Wrapped Exception (with status template): 09140274 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 09140273 Request failed 500 /solr/alfresco/cmis?q=select+f.cmis%3AobjectId%2C+w.ws%3AhostName%2C+w.ws%3AhostPort%2C+t.cm%3Adescription+from+cmis%3Afolder+as+f++join+ws%3Awebsite+as+w++on+w.cmis%3AobjectId+%3D+f.cmis%3AobjectId++join+cm%3Atitled+as+t++on+t.cmis%3AobjectId+%3D+f.cmis%3AobjectId&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:884)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
   at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:393)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:352)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.scripts.ScriptException: 09140274 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 09140273 Request failed 500 /solr/alfresco/cmis?q=select+f.cmis%3AobjectId%2C+w.ws%3AhostName%2C+w.ws%3AhostPort%2C+t.cm%3Adescription+from+cmis%3Afolder+as+f++join+ws%3Awebsite+as+w++on+w.cmis%3AobjectId+%3D+f.cmis%3AobjectId++join+cm%3Atitled+as+t++on+t.cmis%3AobjectId+%3D+f.cmis%3AobjectId&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON
   at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:195)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:282)
   at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
   at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1107)
   at org.alfresco.repo.cmis.rest.CMISWebScript.executeScript(CMISWebScript.java:46)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
   … 25 more
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 09140273 Request failed 500 /solr/alfresco/cmis?q=select+f.cmis%3AobjectId%2C+w.ws%3AhostName%2C+w.ws%3AhostPort%2C+t.cm%3Adescription+from+cmis%3Afolder+as+f++join+ws%3Awebsite+as+w++on+w.cmis%3AobjectId+%3D+f.cmis%3AobjectId++join+cm%3Atitled+as+t++on+t.cmis%3AobjectId+%3D+f.cmis%3AobjectId&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:328)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrCMISQueryServiceImpl.query(SolrCMISQueryServiceImpl.java:93)
   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.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy137.query(Unknown Source)
   at org.alfresco.repo.cmis.rest.CMISScript.query(CMISScript.java:653)
   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.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
   at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
   at org.mozilla.javascript.gen.c21._c0(file:/opt/alfresco-4.0.a/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js:67)
   at org.mozilla.javascript.gen.c21.call(file:/opt/alfresco-4.0.a/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   at org.mozilla.javascript.gen.c21.call(file:/opt/alfresco-4.0.a/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js)
   at org.mozilla.javascript.gen.c21.exec(file:/opt/alfresco-4.0.a/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:483)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:191)
   … 30 more

Error is all about executing a query:
select f.cmis:objectId,
w.ws:hostName,
w.ws:hostPort,
t.cm:title,
t.cm:description,
w.ws:webAppContext,
w.ws:siteConfig
from cmis:folder as f join ws:website as w on w.cmis:objectId = f.cmis:objectId join cm:titled as t on t.cmis:objectId = f.cmis:objectId

and if I try to execute it using CMIS Workbench it gives error also - it seems that the problems are fields title and description, which are part of an aspect. Without them the query executes just fine. Is there something missing in WCMQS regarding support for aspects in Alfresco?
1 REPLY 1

bremmington
Champ on-the-rise
Champ on-the-rise
Unfortunately this is due to a fault that was introduced very recently in our CMIS implementation. I have raised a bug report in Jira (ALF-10816), and it is being worked on now. The fix for this will be included in 4.0.b which we're hoping to release next week.

Apologies for the inconvenience that this causes.