Alfresco 4.2.c Error when starting: ERROR Context initialization failed

cancel
Showing results for 
Search instead for 
Did you mean: 
gabrielecaprio
Member II

Alfresco 4.2.c Error when starting: ERROR Context initialization failed

Hi to all,
a customer gave me the maintenance of his project but he didn't know explain me nothing about it, and it's very old.
Alfresco version is 4.2.c and it fails his strarting with 'alfrescho.sh start' script with this full error:

Sep 06, 2019 12:29:51 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-7070"]
Sep 06, 2019 12:29:51 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-7443"]
Sep 06, 2019 12:29:52 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-7009"]
Sep 06, 2019 12:29:52 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1445 ms
Sep 06, 2019 12:29:52 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 06, 2019 12:29:52 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
Sep 06, 2019 12:29:52 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /users/walmadm/WALMAPP/alfresco-walm-4.2.c/tomcat/webapps/alfresco.war
Sep 06, 2019 12:29:52 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/users/walmadm/WALMAPP/alfresco-walm-4.2.c/tomcat/webapps/alfresco/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Sep 06, 2019 12:30:01 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Sep 06, 2019 12:30:02 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
Sep 06, 2019 12:30:04 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2019-09-06 12:30:18,848 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantService' defined in file [/users/walmadm/WALMAPP/alfresco-walm-4.2.c/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]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [alfresco/ibatis/alfresco-SqlMapConfig.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Failed to get resource: alfresco/ibatis/#resource.dialect#/activities-insert-SqlMap.xml
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)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: 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]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [alfresco/ibatis/alfresco-SqlMapConfig.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Failed to get resource: alfresco/ibatis/#resource.dialect#/activities-insert-SqlMap.xml
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)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 30 more

.............................

I check properties file but it seems to be good...

This is alfresco-global.properties:

dir.root=/fsWalm/alf_data_XXX

authentication.chain=external1:external,ldap2:ldap
synchronization.synchronizeChangesOnly=true
synchronization.import.cron=0 0 23 * * ?
synchronization.workerThreads=1
external.authentication.enabled=true

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

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

ver=oracle.jdbc.OracleDriver
db.username=XXX
db.password=XXX
db.name=XXX
db.url=jdbcSmiley Surprisedracle:thin:@XXX:XXX:${db.name}
db.pool.validate.query=select 1 from dual
hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect

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

### RMI service ports ###
alfresco.rmi.services.port=50500
avm.rmi.service.port=0
avmsync.rmi.service.port=0
attribute.rmi.service.port=0
authentication.rmi.service.port=0
repo.rmi.service.port=0
action.rmi.service.port=0
deployment.rmi.service.port=0

### External executable locations ###
ooo.exe=/program/soffice.bin
ooo.enabled=true
ooo.port=8100

img.root=<ALFRESCO HOME>/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=<ALFRESCO HOME>/common/bin/pdf2swf
swf.languagedir=<ALFRESCO HOME>/common/japanese

jodconverter.enabled=false
jodconverter.officeHome=
jodconverter.portNumbers=8100

### Initial admin password ###
alfresco_user_store.adminpassword=XXX

### E-mail site invitation setting ###
notification.email.siteinvite=false

### License location ###
dir.license.external=<ALFRESCO HOME>

### Solr indexing ###
index.subsystem.name=lucene
#dir.keystore=${dir.root}/keystore
#solr.port.ssl=7443

### BPM Engine ###
system.workflow.engine.jbpm.enabled=false

Somebody can help me? It's very important...

EDIT: In Attachments you can find 'catalina.out' logfile.

'alfresco.log' logfile is exactly the same, but without start and stop alert.

Thanks,

Gabriele

5 Replies
dharmendra_pan2
Active Member II

Re: Alfresco 4.2.c Error when starting: ERROR Context initialization failed

did you see the logs when alfresco trying to connect to database?.

Would you upload the complete alfresco and tomcat log files.

gabrielecaprio
Member II

Re: Alfresco 4.2.c Error when starting: ERROR Context initialization failed

I uploaded it!

openpj
Moderator
Moderator

Re: Alfresco 4.2.c Error when starting: ERROR Context initialization failed

It seems that you have an Alfresco Community edition with an Oracle database configured that is absolutely strange because the Community edition doesn't support Oracle at all.

The dialect of the DBMS seems not configured in the configuration.

openpj
Moderator
Moderator

Re: Alfresco 4.2.c Error when starting: ERROR Context initialization failed

I remember that a very old Oracle Plugin was published but it was not officially supported by Alfresco. It was just a community contribution and it should not be used in production environment because you can't execute any standard Alfresco upgrades.

gabrielecaprio
Member II

Re: Alfresco 4.2.c Error when starting: ERROR Context initialization failed

I found this settings so... This is a old system deployed in development and production environments, but in prod works and in develop not.

I just want to STOP and START and this seems to be impossibile.

Any suggestion?