0
votes

I am new to alfresco . I have installed alfresco 4.2.e on ubuntu laptop . I am not able to access alfresco explorer using

http://localhost:8080/alfresco

Its says Http Status 404 error.

Also i am able to access http://localhost:8080/share . But on this page i am not able to login.

As Share will not work until the /alfresco webapp is running correctly.

I have gone through some post

Alfresco Service Forum RESTFul API not working properly (empty results and 404s)

Alfresco share login issue

Error while trying to log into Alfresco Community Edition

http://element14.wordpress.com/2007/07/05/howto-install-alfresco-on-linux-sharepoint-alternative/

http://www.linuxquestions.org/questions/linux-software-2/alfresco-not-able-to-open-in-internet-browser-840259/

But didn't get solution.

My catalina.out shows

Mar 25, 2016 3:08:01 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Mar 25, 2016 3:08:01 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Mar 25, 2016 3:08:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /home/varun/alfresco-4.2.e/tomcat/conf/Catalina/localhost/solr.xml
Mar 25, 2016 3:08:01 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
2016-03-25 15:08:07,561  WARN  [solr.core.SolrCore] [localhost-startStop-1] [archive] Solr index directory '/home/varun/alfresco-4.2.e/alf_data/solr/archive/SpacesStore/index' doesn't exist. Creating new index...
 2016-03-25 15:08:07,901  WARN  [handler.component.SpellCheckComponent] [localhost-startStop-1] No queryConverter defined, using default converter
 2016-03-25 15:08:08,985  WARN  [solr.core.SolrCore] [localhost-startStop-1] [alfresco] Solr index directory '/home/varun/alfresco-4.2.e/alf_data/solr/workspace/SpacesStore/index' doesn't exist. Creating new index...
 2016-03-25 15:08:09,101  WARN  [handler.component.SpellCheckComponent] [localhost-startStop-1] No queryConverter defined, using default converter
 Mar 25, 2016 3:08:09 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /home/varun/alfresco-4.2.e/tomcat/webapps/share.war
2016-03-25 15:08:22,941  INFO  [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
 2016-03-25 15:08:23,035  INFO  [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
 2016-03-25 15:08:23,036  INFO  [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
 2016-03-25 15:08:23,041  INFO  [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
 2016-03-25 15:08:25,341  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 353 Web Scripts (+0 failed), 367 URLs
 2016-03-25 15:08:25,341  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 8 Package Description Documents (+0 failed) 
 2016-03-25 15:08:25,342  INFO  [extensions.webscripts.DeclarativeRegistry] [localhost-startStop-1] Registered 0 Schema Description Documents (+0 failed) 
 2016-03-25 15:08:25,535  INFO  [extensions.webscripts.AbstractRuntimeContainer] [localhost-startStop-1] Initialised Spring Surf Container Web Script Container (in 2481.7234ms)
 2016-03-25 15:08:25,539  INFO  [extensions.webscripts.TemplateProcessorRegistry] [localhost-startStop-1] Registered template processor freemarker for extension ftl
 2016-03-25 15:08:25,542  INFO  [extensions.webscripts.ScriptProcessorRegistry] [localhost-startStop-1] Registered script processor javascript for extension js
 Mar 25, 2016 3:08:25 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /home/varun/alfresco-4.2.e/tomcat/webapps/alfresco.war
Mar 25, 2016 3:08:36 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Mar 25, 2016 3:08:36 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2016-03-25 15:08:41,179  INFO  [alfresco.repo.admin] [localhost-startStop-1] Using database URL 'jdbc:mysql://localhost:3306/alfrescomdm' with user 'alfrescomdm'.
 2016-03-25 15:08:41,218  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorityBridgeTableCache' defined in class path resource [alfresco/cache-context.xml]: Cannot resolve reference to bean 'tenantService' while setting bean property 'tenantService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantService' defined in file [/home/varun/alfresco-4.2.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/mt/mt-context.xml]: Cannot resolve reference to bean 'tenantAdminDAO' while setting bean property 'tenantAdminDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantAdminDAO' defined in class path resource [alfresco/dao/dao-context.xml]: Cannot resolve reference to bean 'repoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionTemplate' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'repoSqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repoSqlSessionFactory' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot resolve reference to bean 'dialectResourceLoader' while setting bean property 'resourceLoader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectResourceLoader' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Cannot create inner bean 'org.springframework.beans.factory.config.PropertyPathFactoryBean#2e385de5' of type [org.springframework.beans.factory.config.PropertyPathFactoryBean] while setting bean property 'dialectClass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPathFactoryBean#2e385de5' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect' defined in class path resource [alfresco/hibernate-context.xml]: Cannot resolve reference to bean '&sessionFactory' while setting bean property 'localSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceCheck' defined in class path resource [alfresco/core-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.domain.schema.DataSourceCheck]: Constructor threw exception; nested exception is java.lang.RuntimeException: Database connection failed: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)  
1
I guess you need to add mysql driver dependency to your classpath - Younes Regaieg
@YounesRegaieg, Recenty i have installed ubuntu 14.04LTS. The output of echo $CLASSPATH shows nothing. Also /etc/environment show value of only PATH. I inserted the following in /etc/environment file. CLASSPATH="/usr/share/mysql:/usr/share/java/mysql-connector-java.jar" Is there anything i need to do..? - Varun Chawla
@Gagravarr Worked thanks - Varun Chawla
Side-note: If you must run 4.2, which is now a very old version, you really should be running 4.2.f because it contains an important security fix for 4.2.e. Do not deploy 4.2.e to production. See wiki.alfresco.com/wiki/Alfresco_Community_4.2.f_Release_Notes - Jeff Potts

1 Answers

1
votes

Promoting a comment to an answer - you need to read and follow steps in the official Alfresco documentation on configuring Alfresco 4.2 for MySQL. (Similar documentation is available for the other Alfresco versions too, eg Alfresco 5.1)

As that will guide you through, you need to download the MySQL Connector for Java jar file (which due to a long standing licensing dispute with Oracle hasn't been shipped by Alfresco as standard in quite a few years), then drop that jar into your Tomcat lib folder so that it's available to Alfresco. You'll then likely need to edit your alfresco-global.properties file to tell it about your MySQL database details

Alternately, you could switch to PostGreSQL (the Alfresco recommended option for an open source database to use with Alfresco), and follow these instructions for installing the jdbc driver and configuring it to work.