AnsweredAssumed Answered

Error 500 al acceder a un webscript

Question asked by mapeav on Jan 12, 2015
Latest reply on Jan 16, 2015 by mapeav
buenos días a todos,
tengo algunos problemas con el acceso a un webscript que he creado en alfresco, en la carpeta
Company Home > Data Dictionary > Web Scripts Extensions

El script sale en la lista, y guest tiene permisos de lector.

El problema es que, de vez en cuando, da un error 500 cuando intentas acceder al webscript, y parece que se soluciona si alguien accede al código fuente del webscript.

Muchas gracias por vuestra ayuda


webscript:


<webscript>
  <shortname>llistatDocumentsEspai</shortname>
  <description>llistat de documents en html d'un espai d'alfresco</description>
  <url>/sample/llistatDocumentsEspai?nombre={nom}</url>
  <transaction allow="readonly">required</transaction>
  <authentication>none</authentication>
</webscript>


También he probado con user y guest en authentication

Error


Web Script Status 500 - Internal Error

The Web Script /alfresco/wcs/sample/llistatDocumentsEspai 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:   Wrapped Exception (with status template): A valid SecureContext was not provided in the RequestContext

Exception:   net.sf.acegisecurity.AuthenticationCredentialsNotFoundException - A valid SecureContext was not provided in the RequestContext

net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy20.hasPermission(Unknown Source)
org.alfresco.service.cmr.repository.Path.toDisplayPath(Path.java:211)
org.alfresco.repo.web.scripts.RepoStore.getPath(RepoStore.java:293)
org.alfresco.repo.web.scripts.RepoStore.getBaseDir(RepoStore.java:258)
org.alfresco.repo.web.scripts.RepoStore.access$000(RepoStore.java:77)
org.alfresco.repo.web.scripts.RepoStore$RepoScriptContent.getPathDescription(RepoStore.java:947)
org.alfresco.repo.web.scripts.RepositoryScriptProcessor$RepositoryScriptLocation.toString(RepositoryScriptProcessor.java:185)
org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:247)
org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:108)
org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:790)
org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:90)
org.alfresco.repo.web.scripts.RepositoryContainer$1.execute(RepositoryContainer.java:311)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:360)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:382)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:264)
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:260)
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
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.MTWebScriptAuthenticationFilter.doFilter(MTWebScriptAuthenticationFilter.java:102)
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.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:286)
org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)
org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:378)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
java.lang.Thread.run(Thread.java:619)

Exception:   org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): A valid SecureContext was not provided in the RequestContext

org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:594)

Server:   Alfresco Enterprise v3.0.0 (r11498) schema 501


ME he dado cuenta que he duplicado la pregunta
https://forums.alfresco.com/es/forum/desarrollo/extender-o-cambiar-alfresco/error-500-aleatorio-al-llamar-un-webscript-07152014

Outcomes