Thursday 24 November 2011

"Non-unique path:found" : /app:company_home/app:user_homes 0

It was a long week for me as I was struggling to get this error resolved. To begin, I had alfresco setup with ldap authentication and synchronization working out of box for the existing users in my company. But, when a new employee joined, she could not login to alfresco with the above error.

Surfed through all the forums out there, but could not get the solution. Then finally one thing struck to my mind.

In authentication-services-context.xml the default path for userHomesHomeFolderProvider bean was /${spaces.company_home.childname}/$spaces.user_homes.childname} and when i looked at the user interface of alfresco, the folder structure for user home folder was companyHome ->Others -> User Homes. Which confused me of the fact that the "Others" folder was created automatically during first setup and I never changed the userHomesFolder path in authentication-services-context.xml. And I have no answer for the same.

So, it was sure that the path to home folder was the problem for the error. I new, I have to change the path in authentication-services-context.xml to companyHome/Others/UserHomes. But the question was how to add "Others".

Then I have to search for the syntax to denote the folder "Others" to place it in authentication-services-context.xml.

Finally  I updated the /alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/authentication-services-context.xml for userHomesHomeFolderProvider bean

<property name="path">
<value>/${spaces.company_home.childname}/cm:Others/${spaces.user_homes.childname} </value>
</property>

Restart Alfresco.

Thats it. All is Well.



Tuesday 13 September 2011

The OpenOffice connection has been lost

Whenever I tried to restart alfresco on fedora 14, I used to get these errors in alfresco logs.

An initial OpenOffice connection could not be established. 
The OpenOffice connection was re-established.
The OpenOffice connection has been lost.
And the results was, not able get the preview of the documents uploaded in share.
So, here are steps which I carried out to get the issue resolved:
  1.  In .../alfresco/tomcat/shared/classes/alfresco-global.properties replace the values as per your environment
          ### External executable locations ###
          ooo.enabled=true
          ooo.exe=.../openoffice.org3/program/soffice.bin
          img.root=.../alfresco/common
          img.dyn=${img.root}/lib
          img.exe=${img.root}/bin/convert
          swf.exe=/apps/alfresco/common/bin/pdf2swf\

     2. To run openoffice as daemon, create file openoffice.sh and copy the script given below.
         #!/bin/bash
         # openoffice.org headless server script
         # chkconfig: 2345 80 30
         # description: headless openoffice server script
         # processname: openoffice
         # Author: Vic Vijayakumar
         # Modified by Federico Ch. Tomasczik
         #
         OOo_HOME=/usr/bin
         SOFFICE_PATH=.../openoffice.org3/program/soffice
         PIDFILE=/var/run/openoffice-server.pid

         set -e

         case "$1" in
         start)
         if [ -f $PIDFILE ]; then
         echo "OpenOffice headless server has already started."
         sleep 5
         exit
         fi
         echo "Starting OpenOffice headless server"
         $SOFFICE_PATH -headless -nologo -nofirststartwizard -           accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
         touch $PIDFILE
         ;;
         stop)
         if [ -f $PIDFILE ]; then
         echo "Stopping OpenOffice headless server."
         killall -9 soffice && killall -9 soffice.bin
         rm -f $PIDFILE
         exit
         fi
         echo "Openoffice headless server is not running."
         exit
         ;;
         *)
         echo "Usage: $0 {start|stop}"
         exit 1
         esac
         exit 0
         *************

(Thanks for the script Vic Vijayakumar,  Federico Ch. & Tomasczik)
Save the file in /etc/init.d/openoffice.sh and give executable permission.

     3. Sartt the openoffice headless
         # /etc/init.d/openoffice.sh start

     4. Start Alfresco

Hope this works good for you too.