cancel
Showing results for 
Search instead for 
Did you mean: 

Corrupted user after upgrading to CE 3.3--how to fix?

icrew
Champ in-the-making
Champ in-the-making
Hi:

I just upgraded from CE 3.2 to CE 3.3, and the upgrade went smoothly, but one user can't log in:

I have a user who can log in to the Explore interface, but not into the Share interface.  At one point, they got an error page  that read:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
   org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:282)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:165)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:99)
   org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:201)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:174)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:129)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:239)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:101)
   org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.springframework.extensions.surf.exception.UserFactoryException: Unable to create user - failed to retrieve user metadata:
   org.springframework.extensions.surf.support.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:166)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:165)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:99)
   org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:201)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:174)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:129)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:239)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:101)
   org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

Apache Tomcat/6.0.18


After seeing this error, I restarted the server, with an Index.recovery.mode=FULL, and now, instead of getting that error, the browser just stops, waiting for a response from the server indefinitely.  I don't see anything in the logs about this either.

Other users can log in to share just fine, and, as I said, this user can log in to Explore without trouble.


Any thoughts on this issue would be hugely appreciated!

Thanks,

Ian Crew
UC Berkeley
3 REPLIES 3

icrew
Champ in-the-making
Champ in-the-making
One more datapoint:  If I try to access the profile page for the problematic user from within Share (e.g. http://myhost.berkeley.edu:8080/share/page/user/problemuser/profile), the AlfrescoShare/My Dashboard/My Profile/Sites/People/Repository/Help/Logout/Search header loads fine, but again it pauses indefinitely when waiting for the rest of the page to load.

Looking at the problem user from the admin console in both Share and Explore works fine, and the user seems to be normal.

icrew
Champ in-the-making
Champ in-the-making
And another lead:  When I'm logged in as the problem user via EXPLORE, I get the same waiting behavior if I try to click on the user profile button at the top of the screen.

icrew
Champ in-the-making
Champ in-the-making
Finally got this sorted out.  It turns out that the user's "persondescription" field got corrupted somehow (it was rather lengthy before the upgrade).  So, I had to figure out a way to update that field without using the UI.  Here's how I did that:

1) I modified tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/person/person.put.json.js to add the following:


   if (!json.isNull("persondescription"))
   {
      person.properties["persondescription"] = json.get("persondescription");
   }

2) I restarted alfresco to make that change take effect.

3) I downloaded the details of that person using the rest api and the UNIX command line curl:

curl 'http://myhost.berkeley.edu:8080/alfresco/service/api/people/myuser' -u 'adminSmiley Tongueass' > Downloads/myuser.json

4) I edited the persondescription in the resulting myuser.json file to make it much shorter.

5) I then updated that person using curl, as follows:

curl -H "content-type:application/json" -X PUT -u 'adminSmiley Tongueass' -T Downloads/myuser.json http://myhost.berkeley.edu:8080/alfresco/service/api/people/myuser

The interesting thing is that the persondescription ended up blank, not with the new value I assigned to it, but I can log into that account again, at least, which is the important part…..

Hope this is useful to someone.

Ian