AnsweredAssumed Answered

Error 500 aleatorio al llamar un webscript

Question asked by mapeav on Jul 15, 2014
Latest reply on Jan 13, 2015 by mapeav
buenos días a todos.

Estoy desarrollando un webscript sencillo para listar los documentos de una carpeta de alfresco, y a veces me funciona, a veces no.

El xml es el siguiente:

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


Y el error que sale a veces es


The Web Script /alfresco/wcs/sample/llistat2 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
Time:   15/07/2014 08:04:01


La versión de Alfresco es: Enterprise - v3.0.0 (r11498)

A alguien le pasa o sabe cómo puedo arreglarlo?

Muchas gracias

Outcomes