Search code examples
tomcatalfresco

Installing Alfresco War on Existing Tomcat


I managed to install Alfresco using the installer and run it using the tomcat that comes with it . However, since I have existing Tomcat 7 installation, I'd like to run Alfresco from my own tomcat installation.

I am getting below error when I browsed to http://192.168.33.10:8080/

Cannot find Alfresco Repository on this server. (Does this application have access to alfresco-global.properties? Does this application have cross-context permissions?)

This is my alfresco-global.properties

enter image description here

###############################
## Common Alfresco Properties #
###############################

dir.root=/home/vagrant/alfresco-community/alf_data

alfresco.context=alfresco
alfresco.host=127.0.0.1
alfresco.port=8080
alfresco.protocol=http

share.context=share
share.host=127.0.0.1
share.port=8080
share.protocol=http

### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=alfresco
db.name=alfresco
db.url=jdbc:postgresql://localhost/${db.name}
# Note: your database must also be able to accept at least this many connections.  Please see your database documentation for instructions on how to configure this.
db.pool.max=275
db.pool.validate.query=SELECT 1

# The server mode. Set value here
# UNKNOWN | TEST | BACKUP | PRODUCTION
system.serverMode=UNKNOWN

### FTP Server Configuration ###
ftp.port=2121

### RMI registry port for JMX ###
alfresco.rmi.services.port=50500

### External executable locations ###
ooo.exe=/home/vagrant/alfresco-community/libreoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
img.root=/home/vagrant/alfresco-community/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
alfresco-pdf-renderer.root=/home/vagrant/alfresco-community/common/alfresco-pdf-renderer
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer

jodconverter.enabled=false
jodconverter.officeHome=/home/vagrant/alfresco-community/libreoffice

This is how my Tomcat folder is like (I am not sure if this is file permission issue)

enter image description here

Any help on this would be much appreciated. Thanks!

UPDATE

The alfresco.log gave me this

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deletedContentStore' defined in class path resource [alfresco/content-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.content.filestore.FileContentStore]: Constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: 06290000 Failed to create store root: /home/vagrant/alfresco-community/alf_data/contentstore.deleted
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:285)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1077)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:981)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
        ... 100 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.content.filestore.FileContentStore]: Constructor threw exception; nested exception is org.alfresco.service.cmr.repository.ContentIOException: 06290000 Failed to create store root: /home/vagrant/alfresco-community/alf_data/contentstore.deleted
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:277)
        ... 109 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 06290000 Failed to create store root: /home/vagrant/alfresco-community/alf_data/contentstore.deleted
        at org.alfresco.repo.content.filestore.FileContentStore.<init>(FileContentStore.java:119)
        at org.alfresco.repo.content.filestore.FileContentStore.<init>(FileContentStore.java:104)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
        ... 111 more

[root@localhost tomcat]# 2017-07-29 06:53:23,510 WARN  [org.alfresco.web.scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] clientAuth does not appear to be set for Tomcat. clientAuth must be set to 'want' for X509 Authentication
2017-07-29 06:53:23,511 WARN  [org.alfresco.web.scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] Attempting to set clientAuth=want through JMX...
2017-07-29 06:53:23,515 WARN  [org.alfresco.web.scripts.servlet.X509ServletFilterBase] [localhost-startStop-1] Unable to set clientAuth=want through JMX.
2017-07-29 06:53:24,010 ERROR [org.apache.solr.core.CoreContainer] [coreLoadExecutor-5-thread-1] Error creating core [collection1]: Could not load conf for core collection1: Error loading solr config from /home/vagrant/alfresco-community/solr4/collection1/conf/solrconfig.xml
org.apache.solr.common.SolrException: Could not load conf for core collection1: Error loading solr config from /home/vagrant/alfresco-community/solr4/collection1/conf/solrconfig.xml
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:66)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:489)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.solr.common.SolrException: Error loading solr config from /home/vagrant/alfresco-community/solr4/collection1/conf/solrconfig.xml
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:154)
        at org.apache.solr.core.ConfigSetService.createSolrConfig(ConfigSetService.java:80)
        at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:61)
        ... 7 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or '/home/vagrant/alfresco-community/solr4/collection1/conf'
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:362)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:308)
        at org.apache.solr.core.Config.<init>(Config.java:117)
        at org.apache.solr.core.Config.<init>(Config.java:87)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:167)
        at org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:145)
        ... 9 more

Solution

  • Look at your catalina.properties file in $TOMCAT_HOME/conf. Make sure that you have a shared class loader defined:

    shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
    

    Once you do, make sure that your alfresco-global.properties file is located in the $TOMCAT_HOME/shared/classes directory.

    That file holds a dir.root property which points to your Alfresco content store. I suspect it isn't being found which is why you are seeing the error message.