cancel
Showing results for 
Search instead for 
Did you mean: 

Error deploying Alfresco 1.4 on top of tomcat

mmarathe
Champ in-the-making
Champ in-the-making
I am getting several errors deploying the enterprise trial license version 1.4 of Alfresco on top of tomcat. Any simple hints would be helpful, thanks.

INFO: Deploying web application archive alfresco.war
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: alfresco.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
.
.
.
log4j:ERROR Either File or DatePattern options are not set for appender [File].
16:10:25,555 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInfoBootstrap' defined in class path resource [alfresco/bootstrap-context.xml]:
.
.
.
[alfresco/authentication-services-context.xml]: Can't resolve reference to bean 'authenticationComponentImpl' while setting property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationComponentImpl' defined in class path resource [alfresco/authentication-services-context.xml]:
.
.
.
org.alfresco.service.cmr.repository.ContentIOException: Failed to create store root: ./alf_data/contentstore    at org.alfresco.repo.content.filestore.FileContentStore.<init>(FileContentStore.java:60)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:75)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:670)
.
.
.
16:10:25,561 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
11 REPLIES 11

kevinr
Star Contributor
Star Contributor
Does the user you are running the TomCat process as have Write access to the tomcat sub directories? As it looks like a file permissions problem rather than an Alfresco issue. Try running as a root user to see if it starts ok.

Thanks,

Kevin

mmarathe
Champ in-the-making
Champ in-the-making
Kevin,

Thanks for your reply and suggestion. The tomcat process is executed by a non-root user "oss" but all directories under tomcat are owned by oss.oss , so I believe that should have worked, but may be there is something I am missing in my configuration.

The first error, about not finding alfresco.log file, is a file not found error. I cannot see alfresco.log anywhere.

Any more suggestions would be grateful.

Thanks

steve
Champ in-the-making
Champ in-the-making
Hi,

This does point to not having the permissions to create the 'Alfresco.log' file and 'Failed to create store root'…

I would double-check your permissions in the Tomcat directory for the user that starts Tomcat…

Steve

mmarathe
Champ in-the-making
Champ in-the-making
Thanks Steve,

I am running the tomcat process as an "oss" user and as I said earlier everything and anything under tomcat directory is owned by oss, group oss with permission 755 on everything underneath recursively. I think that should be fine.

-Manish

paulhh
Champ in-the-making
Champ in-the-making
Hi

The alfresco.log is usually created in the directory from where tomcat is started - so the other possibility is that it is being called from a location that the calling user doesn't have write permission for.

Paul.

mmarathe
Champ in-the-making
Champ in-the-making
Thanks Paul to suggest me to check that too.

As I said, the complete tomcat directory is owned by that user "oss". so $CATALINA_HOME is completely (recursively) owned by oss.oss with permissions 755. Now tomcat is started using the startup.sh script which is under $CATALINA_HOME/base/bin and this definitely is owned by oss, if alfresco.log has to get created without any permissions problem.

Thanks

-Manish

dschmalz
Champ in-the-making
Champ in-the-making
As I said, the complete tomcat directory is owned by that user "oss". so $CATALINA_HOME is completely (recursively) owned by oss.oss with permissions 755. Now tomcat is started using the startup.sh script which is under $CATALINA_HOME/base/bin and this definitely is owned by oss, if alfresco.log has to get created without any permissions problem.

Actually it does matter from where you start Alfresco. The default properties (can be overriden) assume that the .log file as well as the alf_data folder are in the folder where you launch alfresco.

Let's say that your tomcat is located in /usr/local/lib/tomcat but that you start Alfresco while being in the /root folder with the tomcat script. The oss user has definitely no right to create any file or folder in /root and that would create the above error.

Hope this helps,
David

mmarathe
Champ in-the-making
Champ in-the-making
Thank You guys, apparently the permission problem is gone now and its new error. This is from alfresco.log:

14:40:42,508 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: convert /opt/oss/share/tomcat/base/temp/Alfresco/ImageMagickContentTransformer_init_source_23343.gif  /opt/oss/share/tomcat/base/temp/Alfresco/ImageMagickContentTransformer_init_target_23344.png
14:40:59,964 ERROR [org.alfresco.util.transaction.SpringAwareUserTransaction] Transaction didn't commit
org.alfresco.service.cmr.repository.ContentIOException: Failed to get writer
        at org.alfresco.repo.content.filestore.FileContentStore.getWriter(FileContentStore.java:268)
        at org.alfresco.repo.content.RoutingContentService.getTempWriter(RoutingContentService.java:344)
.
.
.
14:40:59,973 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:427)
        at org.alfresco.repo.importer.ImporterBootstrap.onApplicationEvent(ImporterBootstrap.java:654)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:225)
.
.
.
14:40:59,976 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed
        at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:427)
        at org.alfresco.repo.importer.ImporterBootstrap.onApplicationEvent(ImporterBootstrap.java:654)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)

dschmalz
Champ in-the-making
Champ in-the-making
14:40:42,508 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to execute command: convert /opt/oss/share/tomcat/base/temp/Alfresco/ImageMagickContentTransformer_init_source_23343.gif  /opt/oss/share/tomcat/base/temp/Alfresco/ImageMagickContentTransformer_init_target_23344.png

This first error should not cause any problem for starting alfresco, it just says that the command line tool that is used to transform images is not available.

The second message seems to indicate that the process cannot write to the file content store, i.e. the alf_data directory. Did you start a first time the application as 'root' (and created the directory) and then restarted as the 'oss' user?

Try to delete the alf_data folder, drop the mysql db and recreate it. Then restart from a clean state to see if this corrects your issue.

David