cancel
Showing results for 
Search instead for 
Did you mean: 

getApplicationContexte, Cache is not alive

webroro
Champ in-the-making
Champ in-the-making
Hi,

I'm quite new to Alfresco and I'm trying to get the application context in a Java application (which run on the Alfresco server as it's a custom behavior).
I do the following :

// Initialize Alfresco application content    
ApplicationContext appContext = ApplicationContextHelper.getApplicationContext();
serviceRegistry = (ServiceRegistry)appContext.getBean(ServiceRegistry.SERVICE_REGISTRY);

And I get the following error after the first line (getApplicationContext)… I'm quite lost.
Do you have some clue?

Thanks in advance…      

13:07:01,109 User:admin INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers
.properties]
13:07:01,234 User:admin ERROR [hibernate.engine.ActionQueue] could not release a cache lock
org.hibernate.cache.CacheException: java.lang.IllegalStateException: The org.hibernate.cache.UpdateTimestampsCache Cache is not alive.
        at org.hibernate.cache.EhCache.put(EhCache.java:125)
        at org.hibernate.cache.UpdateTimestampsCache.invalidate(UpdateTimestampsCache.java:69)
        at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:219)
        at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:424)
        at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225)
        at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:174)
        at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:581)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.doRollbackOnCommitException(AbstractPlatformTransactionManager.j
ava:795)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:682)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:431)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:256)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:172)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:127)
        at org.alfresco.web.bean.content.CreateContentWizard.finish(CreateContentWizard.java:118)
        at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:580)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
2 REPLIES 2

itanium
Champ in-the-making
Champ in-the-making
Facing similar issues with 3.0B. Anyone have any lead?

aicko
Champ in-the-making
Champ in-the-making
Hi guys

I ran into the same problem. Were you able to solve it ?

Thanks.