cancel
Showing results for 
Search instead for 
Did you mean: 

Query worked so far, today not

fabernate
Champ in-the-making
Champ in-the-making
Hi

this query

"SELECT t.cmisSmiley SurprisedbjectId FROM cmis:document as d join lynx:documentable as t on d.cmisSmiley SurprisedbjectId = t.cmisSmiley SurprisedbjectId "

has always worked, now not……

this the exception:


Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 07160061 Request failed 401 /solr/alfresco/cmis?q=SELECT+t.cmis%3AobjectId+FROM+cmis%3Adocument+as+d+join+lynx%3Adocumentable+as+t+on+d.cmis%3AobjectId+%3D+t.cmis%3AobjectId+&wt=json&fl=DBID%2Cscore&rows=100&df=TEXT&start=0&locale=it_IT&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:452)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:570)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:142)
   at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:557)
   at org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
   at org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)

the only thing I changed is the JDK version, from 1.6 to 1.7 because I changed the pc and moved the project
13 REPLIES 13

jpotts
World-Class Innovator
World-Class Innovator
I suspect you are using the default SOLR SSL certificate and that it has now expired, see:
https://forums.alfresco.com/en/viewtopic.php?f=2&t=45940

Jeff

fabernate
Champ in-the-making
Champ in-the-making
Hi Jeff

I removed the tags and using without certificate, but I get now

Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 07170007
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:452)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:570)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:142)
   at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:557)
   at org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
   at org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)
   at com.lynxspa.util.alfresco.AspectQuery.execute(AspectQuery.java:61)
   at main.Main.test2(Main.java:57)
   at main.Main.main(Main.java:18)

jpotts
World-Class Innovator
World-Class Innovator

fabernate
Champ in-the-making
Champ in-the-making
Yes

the security contraints on the web.xml as shown in the wiki

jpotts
World-Class Innovator
World-Class Innovator
Just be aware that you are exposing your repository to any unauthenticated user that wants to get content stored within it if you run that way. The proper fix for the cert problem is to manually re-generate your own certificates.

If you are running completely internally or your content is public anyway, it may not be a concern.

It looks like your code is using a paged result set and it is having a problem for some reason. Can you post the code please?

Jeff

fabernate
Champ in-the-making
Champ in-the-making
Hi Jeff

no problem, it's a TEST

on the wiki I am also told to set some property for not to use the certificate
but on the properties.ini or alfresco-global.properties into alfresco folder I can't find those property name

so I am told 

In alfresco-global.properties, set the property "solr.secureComms" to "none" and ensure that the property "solr.port" is set to the correct non-SSL port of the application server in which Solr is running. Similarly, in each solrconfig.properties file, set the property "alfresco.secureComms" to "none" and ensure that the property "alfresco.port" is set to the correct non-SSL port of the application server in which your repository is running.

fabernate
Champ in-the-making
Champ in-the-making
public List<Document> execute(){
      List<Document> docList = new ArrayList<Document>();
      
      ItemIterable<QueryResult> results =
                            this.session_.query("SELECT t.cmisSmiley SurprisedbjectId FROM cmis:document as d join lynx:documentable as t on d.cmisSmiley SurprisedbjectId = t.cmisSmiley SurprisedbjectId", false);
      
      for(QueryResult hit: results)
         docList.add((Document) this.session_.getObject((String)hit.getProperties().get(0).getFirstValue()));
      
      return docList;
   }

fabernate
Champ in-the-making
Champ in-the-making
and this is the Alfresco log


22:46:00,043 ERROR [org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet] 07170008
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 07170008
   at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:80)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy260.query(Unknown Source)
   at org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.query(CmisServiceWrapper.java:1031)
   at org.apache.chemistry.opencmis.server.impl.atompub.DiscoveryService.query(DiscoveryService.java:126)
   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.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:92)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.dispatch(CmisAtomPubServlet.java:229)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:178)
   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:470)
   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:293)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
   at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 07170008
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:390)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl.query(SolrOpenCMISQueryServiceImpl.java:87)
   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 $Proxy126.query(Unknown Source)
   at org.alfresco.opencmis.CMISConnector.query(CMISConnector.java:2134)
   at org.alfresco.opencmis.AlfrescoCmisServiceImpl.query(AlfrescoCmisServiceImpl.java:2126)
   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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.transaction.RetryingTransactionInterceptor$1.execute(RetryingTransactionInterceptor.java:69)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.transaction.RetryingTransactionInterceptor.invoke(RetryingTransactionInterceptor.java:59)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.opencmis.AlfrescoCmisServiceInterceptor.invoke(AlfrescoCmisServiceInterceptor.java:90)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.opencmis.AlfrescoCmisExceptionInterceptor.invoke(AlfrescoCmisExceptionInterceptor.java:50)
   … 29 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
   at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1731)
   at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
   at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
   at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206)
   at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
   at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
   at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:925)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1170)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:637)
   at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:89)
   at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
   at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
   at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
   at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
   at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
   at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
   at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:344)
   … 55 more
Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
   at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:289)
   at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:263)
   at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:173)
   at sun.security.validator.Validator.validate(Validator.java:218)
   at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
   at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
   at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
   at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
   … 72 more
Caused by: java.security.cert.CertPathValidatorException: timestamp check failed
   at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:139)
   at sun.security.provider.certpath.PKIXCertPathValidator.doValidate(PKIXCertPathValidator.java:330)
   at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:178)
   at java.security.cert.CertPathValidator.validate(CertPathValidator.java:250)
   at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:275)
   … 79 more
Caused by: java.security.cert.CertificateExpiredException: NotAfter: Fri Aug 17 14:04:11 CEST 2012
   at sun.security.x509.CertificateValidity.valid(CertificateValidity.java:256)
   at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:570)
   at sun.security.provider.certpath.BasicChecker.verifyTimestamp(BasicChecker.java:157)
   at sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:109)
   at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:117)
   … 83 more

jpotts
World-Class Innovator
World-Class Innovator
Look at those SSL exceptions. Your certificate needs to be dealt with.

You'll either have to get the certificate problem worked out or you'll have to switch to lucene to remove Solr and the certificate issue from the equation to validate that everything else is working as you expect.

Switch to lucene by specifying
index.subsystem.name=lucene
index.recovery.mode=FULL

in alfresco-global.properties.

After the server comes back up change recovery mode to AUTO.

Jeff