cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Failed to retrieve user details for user ...

broseleur
Champ in-the-making
Champ in-the-making
The synchronization of groups seems to work just fine with the installation i did. The groups are showing in the group section of the admin console.
I can also find users in the user search part of the admin console. When i get a list of users and click on one, the error message says: Failed to retrieve user details for user …

There are 2 issues with are preventing me from solving this error:

1st:
When installing Alfresco-community from the repository, only 2 log file are created in /var/log/tomcat/. The logs are the catalina and localhost log. The logging level is very low. I can find the correct switch or config-file to have some more extensive logging. Which setting in /var/lib/tomcat6/webapps/share/WEB-INF/classes/log4j.properties can get me some more logging?

2nd:
I might made some configuration errors with adding setting to my alfresco-global.properties file. Can anyone verify if the values are correct:


# The default authentication chain
# To configure external authentication subsystems see:
# http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems
authentication.chain=alfrescoNtlm1:alfrescoNtlm,passthru1:passthru,ldap1:ldap

#alfrescoNtlm1
ntlm.authentication.sso.enabled=false
alfresco.authentication.authenticateCIFS=false

#passthru1
ntlm.authentication.sso.enabled=false
passthru.authentication.authenticateCIFS=true
passthru.authentication.servers=domain controller IP

#ldap1
ldap.authentication.active=false
ldap.synchronization.active=true

###########################################
## Testing LDAP Settings
###########################################

passthru.authentication.guestAccess=false
passthru.authentication.defaultAdministratorUserNames=Administrator
passthru.authentication.connectTimeout=5000
passthru.authentication.offlineCheckInterval=300
passthru.authentication.protocolOrder=TCPIP
passthru.authentication.authenticateCIFS=true
passthru.authentication.authenticateFTP=true

ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.java.naming.provider.url=ldap://ip adres domain controller :389
ldap.synchronization.java.naming.security.principal=admin user on domain (user@domain.local)
ldap.synchronization.java.naming.security.credentials=password

ldap.synchronization.queryBatchSize=1000
ldap.synchronization.groupQuery=(&(objectclass\=group))
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!(modifyTimestamp<\={0})))

ldap.synchronization.personQuery=(&(objectclass\=user))
ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(!(modifyTimestamp<\={0}))

ldap.synchronization.groupSearchBase=dc\=act-3d,dc\=local
ldap.synchronization.userSearchBase=dc\=act-3d,dc\=local
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'.0Z'
ldap.synchronization.userIdAttributeName=sAMAccountName
ldap.synchronization.userFirstNameAttributeName=givenName
ldap.synchronization.userLastNameAttributeName=sn
ldap.synchronization.userEmailAttributeName=mail
ldap.synchronization.userOrganizationalIdAttributeName=company
ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupType=group
ldap.synchronization.personType=user
ldap.synchronization.groupMemberAttributeName=member
ldap.synchronization.enableProgressEstimation=true
ldap.synchronization.synchronizeChangesOnly=true
ldap.synchronization.active=true
############################################################
I added the logging setting in nano /var/lib/tomcat6/webapps/share/WEB-INF/classes/log4j.properties

# Debugging settings
log4j.logger.org.alfresco.web.scripts.servlet.EndPointProxyServlet=debug
log4j.logger.org.alfresco.web.scripts.RemoteStore=debug
log4j.logger.org.alfresco.connector=debug

and this is the error i got:


Mar 12, 2010 9:23:31 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet proxyServlet threw exception
org.alfresco.error.AlfrescoRuntimeException: 02120000 Error during endpoint proxy processing: null
        at org.alfresco.web.scripts.servlet.EndPointProxyServlet.service(EndPointProxyServlet.java:270)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at org.alfresco.web.scripts.servlet.EndPointProxyServlet.service(EndPointProxyServlet.java:262)
        … 13 more
I'm still be trying to fix this myself, but after 2 days of testing I would welcome some help.

After this is fixed, I will get an installation guide online for Alfresco community edition on Ubuntu 9.10
2 REPLIES 2

broseleur
Champ in-the-making
Champ in-the-making
I got the logging working: change the path for the alfresco.log into /var/log/tomcat6/in the following files:

/var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/log4j.properties
/var/lib/tomcat6/webapps/share/WEB-INF/classes/log4j.properties

More information from /var/log/tomcat6/Alfresco.log for the remaining issue of the error to retrieve user info.


10:22:43,097 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet] Return code: 200
10:22:52,153 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet] EndPointProxyServlet preparing to proxy:
10:22:52,154 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet]  - endpointId: alfresco
10:22:52,154 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet]  - userId: bas
10:22:52,154 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet]  - connector: http://localhost:8080/alfresco/s - {cleartextUsername=bas, cleartextPassword=password}
10:22:52,154 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet]  - method: GET
10:22:52,154 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet]  - url: /api/people/bas?groups=true
10:22:52,350 ERROR [freemarker.runtime]

Expression jsonUtils.encodeJSONString(x) is undefined on line 39, column 15 in org/alfresco/repository/person/person.lib.ftl.
The problematic instruction:
———-
==> ${g.properties["cm:authorityDisplayName"]} escaped ${jsonUtils.encodeJSONString(g.properties["cm:authorityDisplayName"])} [on line 45, column 109 in org/alfresco/repository/person/person.lib.ftl]
in user-directive personLib.personGroupsJSON [on line 3, column 9 in org/alfresco/repository/person/person.get.json.ftl]
———-

Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: Expression jsonUtils.encodeJSONString(x) is undefined on line 39, column 15 in org/alfresco/repository/person/person.lib.ftl.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        at freemarker.core.Expression.getStringValue(Expression.java:118)
        at freemarker.core.Expression.getStringValue(Expression.java:93)
        at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.IfBlock.accept(IfBlock.java:82)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Environment.visit(Environment.java:297)
        at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
        at freemarker.core.Environment.visit(Environment.java:415)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.EscapeBlock.accept(EscapeBlock.java:84)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Macro$Context.runMacro(Macro.java:164)
        at freemarker.core.Environment.visit(Environment.java:601)
        at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.IfBlock.accept(IfBlock.java:82)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Environment.process(Environment.java:188)
        at freemarker.template.Template.process(Template.java:237)
        at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:202)
        at org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:523)
        at org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:241)
        at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
        at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:371)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:421)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:438)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:302)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:295)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:172)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:619)
10:22:52,356 ERROR [org.alfresco.web.scripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 02120013 Wrapped Exception (with status template): 02120012 Error during processing of the template 'Expression jsonUtils.encodeJSONString(x) is undefined on line 39, column 15 in org/alfresco/repository/person/person.lib.ftl.'. Please contact your system administrator.
org.alfresco.web.scripts.WebScriptException: 02120013 Wrapped Exception (with status template): 02120012 Error during processing of the template 'Expression jsonUtils.encodeJSONString(x) is undefined on line 39, column 15 in org/alfresco/repository/person/person.lib.ftl.'. Please contact your system administrator.
        at org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:613)
        at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:165)
        at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:371)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:421)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:438)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:302)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:295)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:172)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.service.cmr.repository.TemplateException: 02120012 Error during processing of the template 'Expression jsonUtils.encodeJSONString(x) is undefined on line 39, column 15 in org/alfresco/repository/person/person.lib.ftl.'. Please contact your system administrator.
        at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:206)
        at org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:523)
        at org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:241)
        at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
        … 21 more
Caused by: freemarker.core.InvalidReferenceException: Expression jsonUtils.encodeJSONString(x) is undefined on line 39, column 15 in org/alfresco/repository/person/person.lib.ftl.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        at freemarker.core.Expression.getStringValue(Expression.java:118)
        at freemarker.core.Expression.getStringValue(Expression.java:93)
        at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.IfBlock.accept(IfBlock.java:82)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Environment.visit(Environment.java:297)
        at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
        at freemarker.core.Environment.visit(Environment.java:415)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.EscapeBlock.accept(EscapeBlock.java:84)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Macro$Context.runMacro(Macro.java:164)
        at freemarker.core.Environment.visit(Environment.java:601)
        at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.IfBlock.accept(IfBlock.java:82)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Environment.process(Environment.java:188)
        at freemarker.template.Template.process(Template.java:237)
        at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:202)
        … 24 more
10:22:52,526 DEBUG [org.alfresco.connector.AuthenticatingConnector] Received 500 on first call to: /api/people/bas?groups=true
10:22:52,526 DEBUG [org.alfresco.web.scripts.servlet.EndPointProxyServlet] Return code: 500

broseleur
Champ in-the-making
Champ in-the-making
The following file was faulty:

/var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository/person/person.lib.ftl

The error is not really one that's easy to find, seems to have something to do with tabs, see if you can spot the difference between the code below and your faulty file (if you have this error).

Correct contents of the correct file:

<#macro personJSONinner person>
<#escape x as jsonUtils.encodeJSONString(x)>
   "url": "${url.serviceContext + "/api/person/" + person.properties.userName}",
   "userName": "${person.properties.userName}",
   "enabled": ${people.isAccountEnabled(person)?string("true","false")},
   <#if person.assocs["cm:avatar"]??>
   "avatar": "${"api/node/" + person.assocs["cm:avatar"][0].nodeRef?string?replace('://','/') + "/content/thumbnails/avatar"}",
   </#if>
   "firstName": <#if person.properties.firstName??>"${person.properties.firstName}"<#else>null</#if>,
   "lastName": <#if person.properties.lastName??>"${person.properties.lastName}"<#else>null</#if>,
   "jobtitle": <#if person.properties.jobtitle??>"${person.properties.jobtitle}"<#else>null</#if>,
   "organization": <#if person.properties.organization??>"${person.properties.organization}"<#else>null</#if>,
   "location": <#if person.properties.location??>"${person.properties.location}"<#else>null</#if>,
   "telephone": <#if person.properties.telephone??>"${person.properties.telephone}"<#else>null</#if>,
   "mobile": <#if person.properties.mobile??>"${person.properties.mobile}"<#else>null</#if>,
   "email": <#if person.properties.email??>"${person.properties.email}"<#else>null</#if>,
   "companyaddress1": <#if person.properties.companyaddress1??>"${person.properties.companyaddress1}"<#else>null</#if>,
   "companyaddress2": <#if person.properties.companyaddress2??>"${person.properties.companyaddress2}"<#else>null</#if>,
   "companyaddress3": <#if person.properties.companyaddress3??>"${person.properties.companyaddress3}"<#else>null</#if>,
   "companypostcode": <#if person.properties.companypostcode??>"${person.properties.companypostcode}"<#else>null</#if>,
   "companytelephone": <#if person.properties.companytelephone??>"${person.properties.companytelephone}"<#else>null</#if>,
   "companyfax": <#if person.properties.companyfax??>"${person.properties.companyfax}"<#else>null</#if>,
   "companyemail": <#if person.properties.companyemail??>"${person.properties.companyemail}"<#else>null</#if>,
   "skype": <#if person.properties.skype??>"${person.properties.skype}"<#else>null</#if>,
   "instantmsg": <#if person.properties.instantmsg??>"${person.properties.instantmsg}"<#else>null</#if>,
   "quota": <#if person.properties.sizeQuota??>${person.properties.sizeQuota?c}<#else>-1</#if>,
   "sizeCurrent": <#if person.properties.sizeCurrent??>${person.properties.sizeCurrent?c}<#else>0</#if>,
   "persondescription": <#if person.properties.persondescription??>"${person.properties.persondescription.content}"<#else>null</#if>
</#escape>
</#macro>

<#macro personJSON person>
{
<@personJSONinner person=person/>
}
</#macro>

<#macro personGroupsJSON person groups>
<#escape x as jsonUtils.encodeJSONString(x)>
{
<@personJSONinner person=person/>,
   "groups": [
   <#list groups as g>
      <#assign authName = g.properties["cm:authorityName"]>
      <#assign displayName><#if authName?starts_with("GROUP_site")>${authName?substring(6)}<#else>${g.properties["cm:authorityDisplayName"]!authName}</#if></#assign>
   {
      "itemName": "${authName}",
      "displayName": "${displayName}"
   }<#if g_has_next>,</#if></#list>]
}
</#escape>
</#macro>

<#macro personSummaryJSON person>
<#escape x as jsonUtils.encodeJSONString(x)>
{
   "url": "${url.serviceContext + "/api/person/" + person.properties.userName}",
   "userName": "${person.properties.userName}",
   "firstName": "${person.properties.firstName}",
   "lastName": "${person.properties.lastName}"
}
</#escape>
</#macro>