在现有Tomcat上安装Alfresco War

时间:2017-07-28 10:29:04

标签: tomcat alfresco

我设法使用安装程序安装Alfresco并使用随附的tomcat运行它。但是,由于我已经安装了Tomcat 7,我想从我自己的tomcat安装中运行Alfresco。

当我浏览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?)

这是我的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

这就是我的Tomcat文件夹的样子(我不确定这是否是文件权限问题)

enter image description here

对此的任何帮助将不胜感激。谢谢!

更新

alfresco.log给了我这个

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

1 个答案:

答案 0 :(得分:2)

查看$ TOMCAT_HOME / conf中的catalina.properties文件。确保定义了共享类加载器:

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

完成后,请确保您的alfresco-global.properties文件位于$ TOMCAT_HOME / shared / classes目录中。

该文件包含指向Alfresco内容存储库的dir.root属性。我怀疑它没有找到,这就是你看到错误信息的原因。