I'm confused as to why I can search as an Administrator but users cannot. Please see the following error stack generated when attempting to search as a normal user.
05:57:00,784 ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 08210015 Wrapped Exception (with status template): 08210835 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js': 08210834 Access Denied. You do not have the appropriate permissions to perform this operation.
org.springframework.extensions.webscripts.WebScriptException: 08210015 Wrapped Exception (with status template): 08210835 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js': 08210834 Access Denied. You do not have the appropriate permissions to perform this operation.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:377)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
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.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: 08210835 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js': 08210834 Access Denied. You do not have the appropriate permissions to perform this operation.
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:194)
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:981)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
... 24 more
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: 08210834 Access Denied. You do not have the appropriate permissions to perform this operation.
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:48)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:217)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:184)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy53.getAllSetPermissions(Unknown Source)
at org.alfresco.repo.site.SiteServiceImpl.getSiteVisibility(SiteServiceImpl.java:852)
at org.alfresco.repo.site.SiteServiceImpl.createSiteInfo(SiteServiceImpl.java:823)
at org.alfresco.repo.site.SiteServiceImpl.getSiteImpl(SiteServiceImpl.java:913)
at org.alfresco.repo.site.SiteServiceImpl.getSite(SiteServiceImpl.java:894)
at org.alfresco.repo.site.script.ScriptSiteService.getSite(ScriptSiteService.java:184)
at sun.reflect.GeneratedMethodAccessor532.invoke(Unknown Source)
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.call1(OptRuntime.java:66)
at org.mozilla.javascript.gen.c7._c1(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:38)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c7._c6(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:175)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c7._c13(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:512)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c7._c15(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:597)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c7._c16(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:812)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c7._c17(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:827)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at org.mozilla.javascript.gen.c7._c0(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:830)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
at org.mozilla.javascript.gen.c7.call(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.mozilla.javascript.gen.c7.exec(file:/opt/alfresco/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:472)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:190)
... 28 more
Caused by: net.sf.acegisecurity.AccessDeniedException: Access is denied.
at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
... 74 more
Has anyone seen this before? Can anyone suggest where I might start looking?
You didn't specify a lot about your setup and what you did in Share before this error occurred so this is my educated guess from the stacktrace:
You perform a site specific search, i.e. the search.js webscript is called with a siteId.
From the webscript the SiteService is called:
at org.alfresco.repo.site.SiteServiceImpl.getSite(SiteServiceImpl.java:894)
The SiteServices tries to read the permissions for the site, when the error occurs:
at $Proxy53.getAllSetPermissions
Is it possible that this is a private site and the user that is running the query has no permissions to access the site? Make sure the users are at least consumers in the site. You could also test if this occurs with public sites as well, or only with private ones.
Related
I am having a wicket application and I am using Ebean ORM mapping. I have set all the credential in ebean.properties. But I am getting an error message "Could not initialize class com.avaje.ebean.Ebean" when I deployed it on server, Its gives error as follows
Last cause: Could not initialize class com.avaje.ebean.Ebean
WicketMessage: Can't instantiate page using constructor 'public com.zipgrocery.pages.HomePageNew(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. Might be it doesn't exist, may be it is not visible (public).
Stacktrace
Root cause:
java.lang.NoClassDefFoundError: Could not initialize class com.avaje.ebean.Ebean
at com.zipgrocery.data.Merchant.getMerchantsByZone(Merchant.java:374)
at com.zipgrocery.pages.HomePageNew.<init>(HomePageNew.java:77)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:173)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:77)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
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.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:311)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Complete stack:
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.zipgrocery.pages.HomePageNew(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. Might be it doesn't exist, may be it is not visible (public).
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:196)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:77)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:173)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:77)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
But it works fine when I deploy it on my localhost. I tried to find the solutions for this but not getting. So Help me out...
I'm not familiar with this guy "Ebean ORM", but the error track is pretty generic and seems has nothing really to do with "Ebean ORM" itself. Based on my past exp, it is more like a classloader issue. You said it was running fine locally and then? where is it broken? when you have such issues like "NoClassDefFoundError", always check what classloader is being used. And also it is worth to check whether your broken environment has multiple versions of the class/jar as well as if the server has its embedded version of this class/jar.
I am new to Drupal. I am configuring Drupal and Alfresco using CMIS. I am able to see the files and folders of Alfresco in Drupal. I am not able to retrieve those files using the cmis queries for exampleSELECT * FROM cmis:document WHERE cmis:objectId='workspace://SpacesStore/d3c5f86e-9174-4cfb-9bc9-03aa881d0810'.. I am getting the following error log:
HTTP call to [http://localhost:8080/alfresco/service/cmis/queries] returned [500].
Response: Web Script Status 500 - Internal Error Web Script Status 500 - Internal Error The Web Script /alfresco/service/cmis/queries has responded with a status of 500 - Internal Error. 500
Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message:00300034 Wrapped Exception (with status template): 00300212 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 00300211
Exception:java.security.cert.CertificateExpiredException - NotAfter: Fri Aug 17 17:34:11 IST 2012
sun.security.x509.CertificateValidity.valid(CertificateValidity.java:256)
sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:570)
sun.security.provider.certpath.BasicChecker.verifyTimestamp(BasicChecker.java:157)
sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:109)
sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:117)
sun.security.provider.certpath.PKIXCertPathValidator.doValidate(PKIXCertPathValidator.java:328)
sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:178)
java.security.cert.CertPathValidator.validate(CertPathValidator.java:250)
sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:275)
sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:263)
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:173)
sun.security.validator.Validator.validate(Validator.java:218)
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:318)
org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
org.alfresco.repo.search.impl.solr.SolrCMISQueryServiceImpl.query(SolrCMISQueryServiceImpl.java:93)
sun.reflect.GeneratedMethodAccessor860.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy140.query(Unknown Source)
org.alfresco.repo.cmis.rest.CMISScript.query(CMISScript.java:683)
sun.reflect.GeneratedMethodAccessor859.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
org.mozilla.javascript.gen.c13._c0(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js:67)
org.mozilla.javascript.gen.c13.call(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
org.mozilla.javascript.gen.c13.call(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js)
org.mozilla.javascript.gen.c13.exec(file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js)
org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:483)
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:191)
org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1193)
org.alfresco.repo.cmis.rest.CMISWebScript.executeScript(CMISWebScript.java:46)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:393)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
java.lang.Thread.run(Thread.java:662)
Exception:java.security.cert.CertPathValidatorException - timestamp check failed
sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:139)
Exception:sun.security.validator.ValidatorException - PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:289)
Exception:javax.net.ssl.SSLHandshakeException - sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
Exception:org.alfresco.repo.search.impl.lucene.LuceneQueryParserException - 00300211
org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:364)
Exception:org.alfresco.scripts.ScriptException - 00300212 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 00300211
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:195)
Exception:org.springframework.extensions.webscripts.WebScriptException - 00300034 Wrapped Exception (with status template): 00300212 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 00300211
org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:970)
Server:Community v4.0.0 (4003) schema 5,025 Time:30 Jan, 2013 12:52:18 PM
Diagnostics:Inspect Web Script (org/alfresco/cmis/queries.post)
Error returning CMIS results - check your repository is active and the query / path is correct
As #Ramsus said, it's a problem with your Solr configuration. Even if you're not directly calling Solr, you're running a CMIS query, which is internally routed by Alfresco to the search engine, i.e. Solr. It should be pretty evident from the stack trace you posted:
org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:318)
org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
org.alfresco.repo.search.impl.solr.SolrCMISQueryServiceImpl.query(SolrCMISQueryServiceImpl.java:93)
[...]
org.alfresco.repo.cmis.rest.CMISScript.query(CMISScript.java:683)
That said, the main issue is about HTTPS and certificate validation, which fails because of an expired certificate:
Exception:java.security.cert.CertificateExpiredException - NotAfter: Fri Aug 17 17:34:11 IST 2012
sun.security.x509.CertificateValidity.valid(CertificateValidity.java:256)
You need to use a valid certificate for the HTTPS communication between Alfresco and Solr.
EDIT: As per #Will Abson comment, it's a known issue of the out of the box SSL certificate. You need to create or retrieve another valid one and configure it as described in the wiki
...
Exception:java.security.cert.CertificateExpiredException - NotAfter: Fri Aug 17 17:34:11 IST 2012
....
Probably the Alfresco Solr certificate - see http://wiki.alfresco.com/wiki/Alfresco_And_SOLR
I'm trying to add some custom cursors on my app but every time I receive this error:
2012-03-29 14:25:36,013 ERROR org.apache.wicket.request.target.resource.SharedResourceRequestTarget - unable to lazily register shared resource img/link1mc.cur
java.lang.ClassNotFoundException: img
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:114)
at org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:151)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
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.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:662)
2012-03-29 14:25:36,013 INFO org.apache.wicket.request.target.resource.SharedResourceRequestTarget - shared resource img/link1mc.cur not found or not allowed access
And the cursor path is valid, the cursor is visible on app but in log I always find this error. Other problem is that on IE8 the performance is highly impacted only for two custom added cursors. I'm wondering if I must add .cur extension on mime types?
If anyone have e suggestion please let me know, thank you.
So my question would be why are you using java for this you can easily modify your cursor with css, which would be the easiest and best practice as a user can easily disable it if they want.
Check out
http://www.w3schools.com/cssref/pr_class_cursor.asp
http://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor&preval=url%28smiley.gif%29,url%28myBall.cur%29,auto
I'm using Solr 3.1 with tomcat6. When the number of concurrent writes and reads increase it is crash throwing this SocketException error. I do concurrent commits and searches through multiple clients. Any kind of help is appreciated. Here is the tomcat log.
Dec 11, 2011 8:02:43 AM org.apache.solr.common.SolrException log
SEVERE: ClientAbortException: java.net.SocketException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
at org.apache.solr.common.util.FastWriter.write(FastWriter.java:55)
at org.apache.solr.response.JSONWriter.writeStr(JSONResponseWriter.java:622)
at org.apache.solr.schema.StrField.write(StrField.java:54)
at org.apache.solr.schema.SchemaField.write(SchemaField.java:130)
at org.apache.solr.response.JSONWriter.writeDoc(JSONResponseWriter.java:385)
at org.apache.solr.response.JSONWriter.writeDoc(JSONResponseWriter.java:453)
at org.apache.solr.response.JSONWriter.writeDocList(JSONResponseWriter.java:501)
at org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:129)
at org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:180)
at org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:296)
at org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:93)
at org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:52)
at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:343)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:265)
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.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:859)
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:662)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:741)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:765)
at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:127)
at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:574)
at org.apache.coyote.Response.doWrite(Response.java:560)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
... 34 more
The exception suggests it's an unexpected client disconnection, so it's either a client issue or a network problem.
Related: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
I found that whenever my application timed out waiting on solr, I see this exception in the solr logs. For me solr was taking longer than 10 secs to process the query and the application waiting on it timed out.
Hope this helps
I am developing web based application in Java [GWT]
I am facing problem with TwitterException.
I used valid credential.
Twitter twitter = new Twitter(myTwitterId, myTwiterPwd);
when I call twitter.getFollowers() method
I got following Error Message
twitter4j.TwitterException: 401:Authentication credentials were missing or incorrect.
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error code="53">Basic authentication is not supported</error>
</errors>
at twitter4j.http.HttpClient.httpRequest(HttpClient.java:469)
at twitter4j.http.HttpClient.get(HttpClient.java:412)
at twitter4j.Twitter.get(Twitter.java:276)
at twitter4j.Twitter.get(Twitter.java:228)
at twitter4j.Twitter.getFollowersStatuses(Twitter.java:1363)
at twitter4j.Twitter.getFollowers(Twitter.java:1350)
at com.vaibhav.dealelephant.server.impl.TwitterServiceImpl.getTwitterFollowers(TwitterServiceImpl.java:49)
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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
I want to display My followers Images into My Website, but it throws exception after calling this method twitter.getFollowers() method. SO unable to get My follwers Images :(
Please provide me Easy solution for the same
Hope for the best co-operation from your side
Thanks in advance !!!
Yes, your authentication is not working because Twitter made some recent changes
regarding how it lets 3rd party code authenticate.
http://news.techworld.com/security/3237604/twitter-turns-on-oauth-api-authentication/
http://www.networkworld.com/news/2010/083110-twitter-api-has-new-third.html?hpg1=bn
http://www.wired.com/epicenter/2010/08/twitter-login-errors/
http://groups.google.com/group/twitter-api-announce/browse_thread/thread/f71eb68600996af8
In other words, Basic authentication has been turned off for the API.
https://apiwiki.twitter.com/Authentication
As Allain mentions, oAuth is the way to go.
The code you posted is different than what I've seen in the past for connecting. I think (though I'm not sure) that oAuth is the preferred way of authenticating now.
Here's a blog that details using oAuth to connect.
I was having that trouble, finally the solution was to put a valid Callback url in my twitter API at (https://dev.twitter.com/), I used google+ url, saved changes (it could take a minutes before the changes are made, refresh the page to be sure) and it worked.