Not able to start activiti after accidentally shut down

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

Not able to start activiti after accidentally shut down

Hi 

My activiti server accidentally shut down because of some reason. and so does Activiti.

I am trying to restart again using the usual process but I am getting the following error.

Please help.

 

INFO 8/16/17 11:28 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:28 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:28 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:28 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:28 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:29 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:29 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:29 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:29 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:29 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:29 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:30 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:30 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:30 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:30 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:30 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:30 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:31 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:31 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:31 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:31 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:31 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:31 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:32 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:32 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:32 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:32 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:32 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:32 AM: liquibase: Waiting for changelog lock....

INFO 8/16/17 11:33 AM: liquibase: Waiting for changelog lock....

11:33:13,057 [localhost-startStop-1] WARN  org.springframework.web.context.support.AnnotationConfigWebApplicationContext  - Exception encountered during context initialization - cancelling refresh attempt

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alfrescoConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.activiti.service.runtime.integration.alfresco.DefaultAlfrescoAuthRepository com.activiti.conf.AlfrescoConfiguration.authTokenRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultAlfrescoAuthRepository': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.activiti.service.runtime.integration.alfresco.AlfrescoOnPremiseTicketService com.activiti.service.runtime.integration.alfresco.DefaultAlfrescoAuthRepository.alfrescoOnPremiseTicketService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alfrescoOnPremiseTicketService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.activiti.service.api.UserService com.activiti.service.runtime.integration.alfresco.AlfrescoOnPremiseTicketService.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.activiti.service.common.EmailService com.activiti.service.idm.UserServiceImpl.emailService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.activiti.service.runtime.EmailTemplateService com.activiti.service.common.EmailService.emailTemplateService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailTemplateService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.activiti.service.runtime.PermissionService com.activiti.service.runtime.EmailTemplateService.permissionService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected org.activiti.engine.TaskService com.activiti.service.runtime.PermissionService.taskService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activitiEngineConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.activiti.service.license.DatabaseLicenseLoader com.activiti.conf.ActivitiEngineConfiguration.licenseLoader; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseLicenseLoader': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private liquibase.integration.spring.SpringLiquibase com.activiti.service.license.DatabaseLicenseLoader.liquibase; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/activiti/conf/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ch3lr026418.express-scripts.com (10.222.24.22) since 8/16/17 10:22 AM

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

at com.activiti.servlet.WebConfigurer.contextInitialized(WebConfigurer.java:98)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)

at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by ch3lr026418.mycompanyurl.com (10.222.24.22) since 8/16/17 10:22 AM

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)

Any idea why I am getting this error ? I think it is probable because of the accidental shut down and H2 database has locked by the previous process. But I do not know how to resolve this.

Any help will be appreciated.

Thanks

3 Replies
Highlighted
Active Member II

Re: Not able to start activiti after accidentally shut down

Hi Sanket Patel,

Yes, this could happen in case the DB is forced to shutdown, so you're right it it is probably related to the accidental shutdown.

There's a way to manually unlock: Connect to the DB console an fire following statement:

UPDATE DATABASECHANGELOGLOCK SET LOCKED=FALSE, LOCKGRANTED=null, LOCKEDBY=null where ID=1;

This might be of help as well: https://stackoverflow.com/questions/15528795/liquibase-lock-reasons

Hope this helps,

Martin

Highlighted
Active Member II

Re: Not able to start activiti after accidentally shut down

Yes. I will able to do that only I can connect to the liquibase database. But it is used by the alfresco.

 

Please also post the details how to connect to the liquibase so that I can run the above query.

Thanks

Highlighted
Active Member II

Re: Not able to start activiti after accidentally shut down

Hi Sanket,

Try starting the database, only. Navigate to installer directory of H2 and find the start-h2.bat/sh script to Startup the database.

After Startup

Martin

Hi,

if you navigate to installer directory of H2, you should find start-h2.bat/sh script to startup the database.
After starup
- You can connect to http://[Host-IP]:8082/
- Login with db credentials, by default alfresco/alfresco.

Hi,

if you navigate to installer directory of H2, you should find start-h2.bat/sh script to startup the database.
After starup
- You can connect to http://[Host-IP]:8082/
- Login with db credentials, by default alfresco/alfresco.

Hi,

if you navigate to installer directory of H2, you should find start-h2.bat/sh script to startup the database.
After starup
- You can connect to http://[Host-IP]:8082/
- Login with db credentials, by default alfresco/alfresco.

Hi,

if you navigate to installer directory of H2, you should find start-h2.bat/sh script to startup the database.
After starup
- You can connect to http://[Host-IP]:8082/
- Login with db credentials, by default alfresco/alfresco.

Hi,

if you navigate to installer directory of H2, you should find start-h2.bat/sh script to startup the database.
After starup
- You can connect to http://[Host-IP]:8082/
- Login with db credentials, by default alfresco/alfresco.

Hi,

if you navigate to installer directory of H2, you should find start-h2.bat/sh script to startup the database.
After starup
- You can connect to http://[Host-IP]:8082/
- Login with db credentials, by default alfresco/alfresco.