AnsweredAssumed Answered

update 4.2.e -> 5.x failed for slingshot / share application

Question asked by opbarth on Jun 29, 2016
Hi,

we wanted to upgrade our 4.2.e-CE to a recent version 5.x.
First, we installed a fresh 5.x (we tried both 5.0.b and 5.1.g):




(0) root@alfresco-dev: /opt/alfresco-community 
## cat README.txt

Alfresco Community (Build: 201605)
===============================

Contains:
        - Alfresco Platform:    5.1.g
        - Alfresco Share:       5.1.f




[br]
[br]


with pg_restore we restored the database and moved the contentstore into the right place:

./postgresql/bin/pg_restore  -c /opt/dump.16.06.22_02\:15 -j 12 -U postgres -d alfresco




[br]
[br]



Alfresco itself (alfresco.war) starts fine and works very well like usual. We are able to logon via webservice and get an alf_ticket. We can browse the repo via webdav or whatever.


But if we try to logon into the share application it shows an error message and the console shows the following:


[br]
[br]



<pre>
SCHWERWIEGEND: Servlet.service() for servlet [Spring Surf Dispatcher Servlet] in context with path [/share] threw exception [Request processing failed; nested exception is org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository] with root cause
org.json.JSONException: A JSONObject text must begin with '{' at character 0
   at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
   at org.json.JSONObject.<init>(JSONObject.java:179)
   at org.json.JSONObject.<init>(JSONObject.java:402)
   at org.alfresco.web.site.SlingshotUserFactory.constructUser(SlingshotUserFactory.java:115)
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.constructAlfrescoUser(AlfrescoUserFactory.java:288)
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.buildAlfrescoUser(AlfrescoUserFactory.java:256)
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:190)
   at org.alfresco.web.site.SlingshotUserFactory.loadUser(SlingshotUserFactory.java:135)
   at org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:183)
   at org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:101)
   at org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:260)
   at org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:183)
   at org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:138)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:385)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:295)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1216)
   at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:182)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:315)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:450)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)

2016-06-29 13:28:41,872  ERROR [alfresco.web.site] [http-apr-8080-exec-4] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:195)
   at org.alfresco.web.site.SlingshotUserFactory.loadUser(SlingshotUserFactory.java:135)
   at org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:183)
   at org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:101)
   at org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:260)
   at org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:183)
   at org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:138)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:385)
   at org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:295)
   at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:264)
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1216)
   at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:182)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.CSRFFilter.doFilter(CSRFFilter.java:315)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:450)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0
   at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
   at org.json.JSONObject.<init>(JSONObject.java:179)
   at org.json.JSONObject.<init>(JSONObject.java:402)
   at org.alfresco.web.site.SlingshotUserFactory.constructUser(SlingshotUserFactory.java:115)
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.constructAlfrescoUser(AlfrescoUserFactory.java:288)
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.buildAlfrescoUser(AlfrescoUserFactory.java:256)
   at org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:190)
   … 51 more
</pre>


[br]
[br]

(some help would be very appreciated, thanks a lot)

Outcomes