cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco WAR install w/existing Tomcat server

tracy_pilcher
Champ in-the-making
Champ in-the-making
Has anyone been able to sucessfully install the Alfresco War (community 3.2)for Linux on a server that already has Tomcat installed on it?

If so, what install instructions did you use?

Thanks,
Tracy Pilcher
Pearson Education
20 REPLIES 20

kbonnet
Champ in-the-making
Champ in-the-making
i always do a seperate installation of tomcat and place the war when everything else is running. Do yo encounter problems?

In version 3.2 you need to specify the database connection in the alfresco-global.properties, which has to be placed in tomcat/lib/

What kind of error do you get?

Koen

tracy_pilcher
Champ in-the-making
Champ in-the-making
Hi Koen,

I have replaced my install with the Alfresco/Tomcat bundle. The errors I got with my Alfresco War install had to do with JDBC problems, this is just a few of the relevant errors:

13:36:34,773  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
13:36:43,553  WARN  [hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.apache.derby.jdbc.EmbeddedDriver'

I am pretty sure that I didn't have my alfresco-shared.properties in the tomcat/lib dir. I will try the install again with this configuration set up.

Thanks,
Tracy

kbonnet
Champ in-the-making
Champ in-the-making
This indicates that the driver for Derby is being loaded. The reference to the driver to be used is also in the alfresco-global.properties. If you're using MySQL you need to specify the MySQL driver and need to put the jar-file with the driver in your tomcat/lib directory.

tracy_pilcher
Champ in-the-making
Champ in-the-making
Hi,

Thank you! That was the solution. I put the alfresco-global.properties in the tomcat/lib dir and now I can start alfresco.

Tracy

skhawaja
Champ in-the-making
Champ in-the-making
Hi,

I am facing issue while installing/deploying alfresco through war file. Before alfresco tomcat is working fine. I have tried in different ways like installing alfresco by  alfresco-community-tomcat-3.2r2.tar.gz,  Alfresco-Community-3.2r2-Linux-x86-Install  and now trying with war file. I am installing on Centos5.4. I followed the following steps,

1. Installed JDK - /usr/bin/java ( JAVA_HOME is set)
2. Installed MYSQL - created mysql db/user and can verify this user able to connect to this db through console # mysql -u alfresco -palfresco
3. tomcat is working fine before alfresco war file - I can see the main page with http://localhost:8080
4. downloaded alfresco-community-war-3.2r2.tar.gz and untared it in a directory
alfrescowar]# ls -l
total 102684
-rw-r–r– 1 root root 75982021 Nov 12 16:49 alfresco.war
drwxr-xr-x 2 root root     4096 Feb 11 12:37 commands
drwxr-xr-x 2 root root     4096 Feb 11 12:37 endorsed
drwxr-xr-x 5 root root     4096 Feb 11 12:37 extensions
drwxr-xr-x 3 root root     4096 Feb 11 12:37 extras
drwxr-xr-x 3 root root     4096 Oct 30 16:08 licenses
-rw-r–r– 1 root root 10766620 Nov 12 16:52 mobile.war
-rw-r–r– 1 root root      543 Oct 30 16:08 README.txt
-rw-r–r– 1 root root 18209351 Nov 12 16:52 share.war

5. copied alfresco.war to /opt/tomcat/webapps/
6. copied mysql-connector-java-5.1.7-bin.jar to /opt/tomcat/lib/      (mysql-connector-java-5.1.7-bin.jar got it from alfresco-community-tomcat-3.2r2.tar.gz)

7. Now when I restart the tomcat I got so many errors 😞 here is the catalina.out log

INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
12:12:30,671  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
12:12:30,673  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
12:12:30,821  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
12:12:51,143  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
12:12:53,152  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
12:12:53,550  INFO  [management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
12:12:53,567  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
12:12:53,571  INFO  [management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
12:12:56,233  WARN  [node.index.FullIndexRecoveryComponent] The indexes are not synchronized with the database.
12:12:56,324  WARN  [node.index.AVMFullIndexRecoveryComponent]     Index for avm store sitestore is out of date
12:12:56,682  WARN  [repo.admin.ConfigurationChecker] The Alfresco 'dir.root' property is set to a relative path './alf_data'.  'dir.root' should be overridden to point to a specific folder.
12:12:56,682  INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: ./alf_data
12:12:56,812  ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: Indexes not found for 7 stores.
12:12:56,812  INFO  [repo.admin.ConfigurationChecker] You may set 'index.recovery.mode=FULL' if you need to rebuild the indexes.
12:12:56,812  ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: System content not found in content store.
12:12:56,812  ERROR [repo.admin.ConfigurationChecker] Ensure that the 'dir.root' property is pointing to the correct data location.
12:12:56,815  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 01120000 Ensure that the 'dir.root' property is pointing to the correct data location.
        at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:338)
        at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:74)
        at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:186)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:327)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
        at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:190)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)

Feb 12, 2010 12:12:56 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Feb 12, 2010 12:12:56 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [DefaultScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.

Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [FileStateReaper] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Thread-11] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads

Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [org.alfresco.repo.security.authentication.AuthenticationUtil.ThreadLocalStack] (value [org.alfresco.repo.security.authentication.AuthenticationUtil$ThreadLocalStack@a10ca8]) and a value of type [java.util.Stack] (value [[]]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
Feb 12, 2010 12:12:56 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [org.alfresco.repo.policy.BaseBehaviour.StackThreadLocal] (value [org.alfresco.repo.policy.BaseBehaviour$StackThreadLocal@14611ec]) and a value of type [java.util.Stack] (value [[]]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

can see
http://localhost:8080
http://alfdare:8080 (alfdare is server name)

Can any on help me to sort out this issue please?? many thanks in advance.

Soh

kbonnet
Champ in-the-making
Champ in-the-making
Hey there,

i would start with the first issue:
- set your dir.root in alfresco-global.properties to a absolute path. It's now ./alf_data. Depending where you are when you start it, it will recreate the directory. As a result your DB is out of sync with the content store now. So you have to empty your db, create the alf_data somewhere, point to it from alfresco-global.properties and restart. It should start with an empty repository.

If you get an error again, post the log and i will see. Dont have much time left today.

Koen

skhawaja
Champ in-the-making
Champ in-the-making
thanks for reply.

I cant find "alfresco-global.properties" anywhere in /opt/tomcat/ or /opt/tomcat/webapps/alfresco/. Do I need to create manually?

kbonnet
Champ in-the-making
Champ in-the-making
it needs to be in either tomcat/lib or tomcat/shared/classes. Since you installed tomcat yourself it's not there and Alfresco is running with all the default properties, including the dir.root property. Search your hd for this file. It should be somewhere under tomcat/webapps/alfresco and you can copy it as a template. This file also should have contained the connection to the database. Where did you configure that? Or didnt you?

skhawaja
Champ in-the-making
Champ in-the-making
Is this file needed to be configured?
/opt/tomcat/shared/classes/alfresco/extension/alfresco-global.properties

I edited this file and set

# vi /opt/tomcat/shared/classes/alfresco/extension/alfresco-global.properties
###############################
## Common Alfresco Properties #
###############################

#
# Sample custom content and index data location
#————-
dir.root=/opt/tomcat/webapps/alfresco/alf_data

#
# Sample database connection properties
#————-
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306

saved it

when I restart tomcat I am getting this error in catalina.out


14:50:22,922 INFO [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
14:50:23,787 INFO [domain.schema.SchemaBootstrap] No changes were made to the schema.
14:50:24,185 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
14:50:24,202 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
14:50:24,206 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
14:50:26,635 WARN [node.index.FullIndexRecoveryComponent] The indexes are not synchronized with the database.
14:50:26,698 WARN [node.index.AVMFullIndexRecoveryComponent] Index for avm store sitestore is out of date
14:50:27,002 WARN [repo.admin.ConfigurationChecker] The Alfresco 'dir.root' property is set to a relative path './alf_data'. 'dir.root' should be overridden to point to a specific folder.
14:50:27,002 INFO [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: ./alf_data
14:50:27,072 ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: Indexes not found for 7 stores.
14:50:27,072 INFO [repo.admin.ConfigurationChecker] You may set 'index.recovery.mode=FULL' if you need to rebuild the indexes.
14:50:27,072 ERROR [repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: System content not found in content store.
14:50:27,072 ERROR [repo.admin.ConfigurationChecker] Ensure that the 'dir.root' property is pointing to the correct data location.
14:50:27,076 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 01120000 Ensure that the 'dir.root' property is pointing to the correct data location.
at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:338)
at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:74)
at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:186)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:327)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:190)
at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)


what should I do now ?

Soh