AnsweredAssumed Answered

No problem, just solutions!

Question asked by kumlali on Aug 30, 2005
Latest reply on Sep 11, 2012 by antoshik86
Dear all,

I'm sorry if these topics have already been resolved. I've just wanted to share my experinces on installation problems occured in WinXp + Tomcat + MySql + Alfresco 0.5.0.

I hope some of them will help someone.

Regards,

Ali Sadik Kumlali

——————————————————————————
Using Existing MySql
I decided to use my existing MySql which is installed under
"E:\programs\MySQL\MySQL Server 5.0\". I simply did the followings:
1) Found the short name of "MySQL Server 5.0" by running "dir /x" command under "E:\programs\MySQL\" folder. It was "MYSQLS~1.0".

2) Replaced all the "c:\mysql\" lines in the following files with
the line "E:\programs\MySQL\MYSQLS~1.0\"
- alf_start_tc.bat
- alf_stop_tc.bat
- db_remove.bat
- db_setup.bat

If existing MySql has a password, *.bat files coming along with Alfresco will not succeed. Add a "-p" parameter all the mysql related lines in the files as shown below:

In alf_stop_tc.bat
  echo Shutting down MySQL…
  E:\programs\MySQL\MYSQLS~1.0\bin\mysqladmin -u root -p shutdown

In db_remove.bat
  echo Deleting Alfresco database…
  E:\programs\MySQL\MYSQLS~1.0\bin\mysqladmin -u root -p drop alfresco

  echo Shutting down MySQL…
  E:\programs\MySQL\MYSQLS~1.0\bin\mysqladmin -u root -p shutdown

In db_setup.bat
  echo Creating Alfresco database…
  E:\programs\MySQL\MYSQLS~1.0\bin\mysqladmin -u root -p create alfresco
  E:\programs\MySQL\MYSQLS~1.0\bin\mysql -u root -p -e "grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;"

  echo Shutting down MySQL…
  E:\programs\MySQL\MYSQLS~1.0\bin\mysqladmin -u root -p shutdown

Now, you're ready to setup database. Just run db_setup.bat. Correspondingly, if you want to uninstall database objects and data used by Alfresco, run db_remove.bat. This script removes Lucene indexes as well.


Using Existing Tomcat
There is no difficult step. Just put alfresco.war under existing Tomcat's webapps folder.

Since we override Alfresco's original launch process, MySql and Tomcat must be started manually. Or, minor changes in existing batch scripts will be well enough. Let me list the steps:

1) Start MySql as in alf_start_tc.bat. If you want to use this script, don't forget the comment out lines related to Tomcat.
2) Start Tomcat with "Monitor Tomcat" application.

If you want to stop application and MySql respectively, please follow the steps below:

1) Stop Tomcat using "Monitor Tomcat" application.
2) Stop MySql as in alf_stop_tc.bat. If you want to use this script, don't forget the comment out lines related to Tomcat.


Old JDBC Drivers Problem
In alfresco-tomcat-0.5.0.zip, JDBC drivers under alfresco\tomcat\common\lib are either older than alfresco-tomcat-0.4.0a.zip or non-existent.

In alfresco-tomcat-0.4.0a.zip
- mysql-connector-java-3.1.8-bin.jar
- hsqldb.jar
- postgresql-8.0-311.jdbc3.jar

In alfresco-tomcat-0.5.0.zip
- mysql-connector-java-3.0.16-ga-bin.jar
- no hspldb driver
- no postgresql driver

When I used default mysql driver shipped with 0.5.0, i got Hibernate errors. After I had replaced it with mysql-connector-java-3.1.10-bin.jar (the newest one from the mysql.com) all the errors disappeared.

CIFS Related Problems
When I ran Alfresco within bundled Tomcat, I could not manage to run CIFS without errors. Tomcat logged an interesting error that said "Invalid platform LÄ°NUX".

I then moved my alfresco.war under my own Tomcat's webapps folder (e:\programs\Apache Software Foundation\Tomcat 5.5\webapps) and started Tomcat using "Monitor Tomcat" application. There were no mentioned exception thrown to the log.

Please note that before running Tomcat from Monitor Tomcat, I started MySQL with the command below:

start "MySQL Server" /min cmd /c E:\programs\MySQL\MYSQLS~1.0\bin\mysqld-nt –console


"Null" in Paths to CIFS Folders
If Tomcat is started with the local setting other than US and English, CIFS folders in the web application contains "null" word and looks like this:  "\\GIRDAP_H\null\Alfresco".

Since I used my own Tomcat and its monitoring application "Monitor Tomcat", changing these JVM parameters was easy. I just added -Duser.language=EN and -Duser.country=US lines in Java Options box under Java tab of Monitor Tomcat application. After I had started the Tomcat, everything seemed well. This time folder name changed to "\\GIRDAP_H\Alfresco" as expected.

Outcomes