AnsweredAssumed Answered

[SOLVED] Serious issue with wcservice web scripts in 4.2.b

Question asked by smcardle on Dec 9, 2012
EDIT : This issue has been resolved in the 4.2.c branch….


Hi All

There seems to be a real problem when accessing wcservice based web scripts.

If I select a wcservice web script URL directly from the browser I am asked to authenticate. After authentication I get the following exception:


Web Script Status 500 - Internal Error

The Web Script /alfresco/wcservice/AdminHome 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:   11090498 Read-Write transaction started within read-only transaction
   
Exception:   org.alfresco.error.AlfrescoRuntimeException - 11090498 Read-Write transaction started within read-only transaction
   
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:360)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:304)
   org.alfresco.web.bean.repository.User.getUserPreferencesRef(User.java:220)
   org.alfresco.web.bean.repository.User.getPreferences(User.java:188)
   org.alfresco.web.bean.repository.PreferencesService.getPreferences(PreferencesService.java:55)
   org.alfresco.web.bean.repository.PreferencesService.getPreferences(PreferencesService.java:45)
   org.alfresco.web.bean.users.UserPreferencesBean.getContentFilterLanguage(UserPreferencesBean.java:116)
   org.alfresco.web.app.servlet.AuthenticationHelper.setupThread(AuthenticationHelper.java:125)
   org.alfresco.web.app.servlet.AuthenticationHelper.authenticate(AuthenticationHelper.java:271)
   org.alfresco.repo.web.scripts.servlet.WebClientAuthenticatorFactory$WebClientAuthenticator.authenticate(WebClientAuthenticatorFactory.java:142)
   org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:304)
   org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:301)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
   org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:323)
   org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:341)
   org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
   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:722)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
   sun.reflect.GeneratedMethodAccessor502.invoke(Unknown Source)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   java.lang.reflect.Method.invoke(Method.java:601)
   org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy251.doFilter(Unknown Source)
   org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   org.alfresco.web.app.servlet.WebScriptSSOAuthenticationFilter.doFilter(WebScriptSSOAuthenticationFilter.java:140)
   sun.reflect.GeneratedMethodAccessor502.invoke(Unknown Source)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   java.lang.reflect.Method.invoke(Method.java:601)
   org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:103)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy251.doFilter(Unknown Source)
   org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
   org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
   org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1771)
   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   java.lang.Thread.run(Thread.java:722)

However, If I access the same web script using just the service URL It asks for Basic Authentication and succeeds.

Also, If I first login to the Alfresco repository, which uses the same authentication chain as the wcservice URL, and then reference the wcservice web script URL it works fine as I have now successfully authenticated via the Alfresco login form.

This is causing me real issues and happens with ALL of my webscripts when accessed using the wcservice URL's instead of the service URL's


Just to make it absolutely clear, authentication to Alfresco and Share works correctly using the configured Authentication chain.


Any help here would be well appreciated.

Regards

Steve

Outcomes