cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco war on ubuntu 7.10

alixbarbosa
Champ in-the-making
Champ in-the-making
I'm having problems installing the Alfresco war on a Ubuntu 7.10 server (console interface)

heres what i have done so far on a new install:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install sun-java6-jdk sun-java6-jre

sudo vim /etc/profile


JAVA_HOME=/usr/lib/jvm/java-6-sun; export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

CATALINA_HOME=/usr/share/tomcat5.5
TOMCAT_HOME=/usr/ share/tomcat5.5
CLASSPATH=.
export CATALINA_HOME TOMCAT_HOME CLASSPATH

sudo apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps

sudo vim /usr/share/tomcat5.5/conf/tomcat-users.xml

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="admin"/>
  <role rolename="manager"/>
  <user username="username" password="password" roles="admin,manager"/>
</tomcat-users>

sudo apt-get install imagemagick xvfb openoffice.org
sudo apt-get install mysql-server

sudo wget -c http://garr.dl.sourceforge.net/sourceforge/alfresco/alfresco-community-war-2.1.0.tar.gz
sudo mkdir alfresco
sudo tar xvfz alfresco-community-war-2.1.0.tar.gz -C alfresco
sudo vm -rv alfresco /usr/share/tomcat5.5-webapps/

cd /usr/share/tomcat5.5-webapps/alfresco/extras/databases/mysql/
mysql -u root -p <db_setup.sql

sudo wget -c http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.5.tar.gz/from/http://mysql.e...
sudo tar xvzf mysql-connector-java-5.1.5.tar.gz
sudo mv mysql-connector-java-5.1.5/mysql-connector-java-5.1.5-bin.jar /usr/share/tomcat5.5/common/lib/
sudo cp /usr/share/tomcat5.5/common/lib/mysql-connector-java-5.1.5-bin.jar /usr/share/tomcat5.5/server/default/lib/
sudo rm -r mysql-connector-java-5.1.5 mysql-connector-java-5.1.5.tar.gz


after this i used the following from  http://wiki.alfresco.com/wiki/Debian_Installation

* Configuring configuration files (accordantly)
* Edited repository.properties accordantly

After this i got the following error:

30/Dez/2007 3:32:59 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
30/Dez/2007 3:32:59 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
30/Dez/2007 3:32:59 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/18  config=null
30/Dez/2007 3:32:59 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
30/Dez/2007 3:32:59 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1628 ms
Dec 30, 2007 2:44:23 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Dec 30, 2007 2:44:23 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Dec 30, 2007 2:44:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1392 ms
Dec 30, 2007 2:44:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 30, 2007 2:44:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5
Dec 30, 2007 2:44:23 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Dec 30, 2007 2:44:29 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory alfresco
org.apache.commons.logging.LogConfigurationException: java.lang.ExceptionInInitializerError (Caused by java.lang.ExceptionInInitializerError)
(..)
Caused by: java.lang.ExceptionInInitializerError
        at org.apache.log4j.Logger.getLogger(Logger.java:85)
        at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
        at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:65)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
        … 33 more
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission alfresco.log write)
(..)

I tried editing log4j.properties to point log4j.appender.File.File= to a chmod 777 dir but i get the same error.. ( different dir on error)

Can someone give a hand here?
13 REPLIES 13

apeshansky
Champ in-the-making
Champ in-the-making
I (foolishly) edited my previous post instead of continuing.

Yes, your idea was right on money, but I still did not get it running.

apeshansky
Champ in-the-making
Champ in-the-making
Now I am at
java.lang.NoClassDefFoundError: Could not initialize class org.alfresco.repo.security.authentication.MD4PasswordEncoderImpl
which is rather strange, as this class seem to be defined in webapps/alfresco/WEB-INF/lib/alfresco-repository.jar, but there is no alfresco-repository.jar in /opt/alfresco/ tree created by untarring alfresco-community-tomcat!

D'oh!  Of course it is not in /opt/alfresco/ tree created by untarring alfresco-community-tomcat - it is created as a part of deployment, and I never started it! Smiley Surprisedops:

apeshansky
Champ in-the-making
Champ in-the-making
I looked up match rules at http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html, and after several iteration ended up with
  permission java.io.FilePermission "/var/log/alfresco/*", "read,write,delete";
  permission java.io.FilePermission "/var/lib/alfresco/*", "read,write,execute";
  permission java.io.FilePermission "/var/lib/alfresco/alf_data/-", "read,write,delete,execute";
  permission java.io.FilePermission "/var/lib/alfresco/tmp/-", "read,write,delete,execute";
as {trailing -} syntax apparently expands to both named directory, all files in it, all its subdirectories and all files in them.
I was too hasty Smiley Surprisedops: Apparently dir/- does not expand to cover access to dir itself.  Plus I missed a complaint about inability to execute imageMagic.  So the final set of java.io.FilePermissions is
  permission java.io.FilePermission "/var/log/alfresco/*", "read,write,delete";
  permission java.io.FilePermission "/var/lib/alfresco/*", "read,write,execute";
  permission java.io.FilePermission "/var/lib/alfresco/alf_data/-", "read,write,delete,execute";
  permission java.io.FilePermission "/var/lib/alfresco/tmp/-", "read,write,delete,execute";
  permission java.io.FilePermission "/var/lib/alfresco/alf_data", "read,write,execute";
  permission java.io.FilePermission "/var/lib/alfresco/tmp", "read,write,execute";
  permission java.io.FilePermission "/var/lib/tomcat5/temp/-", "read,write,delete,execute";
  permission java.io.FilePermission "/var/lib/tomcat5/temp", "read,write,execute";
  permission java.io.FilePermission "<<ALL FILES>>", "execute";
But I am still running into enormous list of: "Instantiation of bean failed; nested exception java.lang.NoClassDefFoundError: Could not initialize class …"

cleseach
Star Contributor
Star Contributor
Quick and dirty fix :

Edit your /etc/init.d/tomcat5.5 script to set

TOMCAT_SECURITY=no

In the same file, find a line containing "-exec rm -f" and replace the quoted text by

-exec rm -rf

If that works for me, that should work for you.

Regards,
Charles