cancel
Showing results for 
Search instead for 
Did you mean: 

No problem, just solutions!

kumlali
Champ in-the-making
Champ in-the-making
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.
8 REPLIES 8

kevinr
Star Contributor
Star Contributor
Thanks very much for your helpful comments. I'm sure they will be very useful to other users as they are useful to us also!

Appologies for the MySQL JDBC Driver issue - looks like we packaged the wrong driver with the build, we'll correct this in the next build.

The old driver issue will only affect you if the newest MySQL 5.0 version is installed on your system (which you obviously have), otherwise it should be ok for now until we make another release.

I'll make this thread sticky so other users can see it easier.

Thanks,

Kevin

gary_spencer
Champ in-the-making
Champ in-the-making
Hello,

The "Invalid platform LINUX" looks like a character set issue. The simplest solution to this when running Alfresco under Windows is to comment out or delete the following lines from the file-servers.xml file (in the WEB-INF/classes/alfresco folder) :-

      <tcpipSMB platforms="linux"/>
      <netBIOSSMB platforms="linux"/>

Cheers

Gary

kumlali
Champ in-the-making
Champ in-the-making
Dear all,

Just a little update to the document in my previous post.

1) If you decide MySql to automatically be launched as Windows service while Windows start, then there is no need to use changed alf_start_tc.bat just for launching MySql. The same thing happens even if you launch the service manually.

2) If you also decide to use your own Tomcat, you do not even need to use alf_start_tc.bat to start Alfresco. Launching Tomcat by using "Monitor Tomcat" will be enough to do so -if necessary steps mentioned my previous post has been followed carefully.

3) If MySql's bin folder is set in your PATH environment variable, there is no need to run dir /x command to find shorten form of MySql installation folder names which are needed in batch scripts. (If this item does not mean anything to you, please refer to my previous post)

Regards,

Ali Sadik Kumlali

kumlali
Champ in-the-making
Champ in-the-making
Dear all,

Sorry for this much posts. I've just recognized that one missing point while using my own Tomcat: Lucene folders.

If you start Tomcat by using "Monitor Tomcat" application, working folder will be "c:\windows\system32" (I assume your Windows installed under c:\windows folder). Therefore, Lucene related folders called contentstore and  lucene-indexes are created under it and  db_remove.bat script cannot be able to remove these folders.

AFAIK, there are two options to create mentioned folders under desired folder:

1) Setting dir.root parameter in repository.properties file to the desired index folder (for example c:/temp). repository.properties file resides in …\WEB-INF\classes\alfresco\.

2) Setting Working Path parameter on Startup and Shutdown tabs of Monitor Tomcat application. I preferred this method and set the value as E:\programs\Apache Software Foundation\Tomcat 5.5\webapps\. As a result, Lucene folders were created under E:\programs\Apache Software Foundation\Tomcat 5.5\webapps\alfresco where Alfresco ran. Thus, if i remove the alfresco subfolder under webapps folder of Tomcat, index folders are removed as well.

Regards,

Ali Sadik Kumlali

derek
Star Contributor
Star Contributor
Some helpful links for handling contentstore and lucene-indexes folders:

WIKI: Developer Runtime Configuration
WIKI: Repository Configuration

robbiefpi
Champ in-the-making
Champ in-the-making
Dear all,


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.


Before finding this post I tried this strategy but it doesn't work.
I have errors

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registry' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed;

etc etc

I tried to control busy ports and other similar things but nothing  Smiley Sad  Smiley Sad

Rob

derek
Star Contributor
Star Contributor
@robbiefpi
Have you posted the full error on another post where it can have a life of its own?

antoshik86
Champ in-the-making
Champ in-the-making
2 days could not be installed on windows server 2012 /

FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster (PID 7 000) running in data directory "D 😕 Alfresco / alf_data / POSTGR ~ 1"?

and there is no adjustment base. As a result he could not log in for the first time.

Helped during the installation, a CMD and the inscription that right now, will be launched service alfrescoPostgreSQL
In dispatcher tasks kill all processes postgres.exe

then go to the service. restart AlfrescoPostgreSQL  and  the installation proceeds normally.