Foros de discusión

Cache is not alive

thumbnail
Jitendra Rajput, modificado hace 9 años.

Cache is not alive

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
I have build services in hook and i am using the same service in jsp of same hook
.To access service classes in hook JSP i have moved service jar to [Tomcat]/lib/ext and also i have removed from [Hook]/lib folder.

Problem is every time i deploy hook its throwing cache is not alive issue.
To over come this we have to restart the server every time.

Is it possible to overcome this issue without restart ?

Thanks in Advance
Jitendra
http://itsliferay.blogspot.in/
thumbnail
Zsigmond Rab, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 728 Fecha de incorporación: 5/01/10 Mensajes recientes
Hi Jitendra,

could you please attach the log?

Regards,
Zsigmond
thumbnail
Jitendra Rajput, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Here it is ..

Caused by: com.liferay.portal.kernel.dao.orm.ORMException: java.lang.IllegalStateException: The com.liferay.portlet.documentlibrary.recordlog.model.impl.DLRecordLogImpl Cache is not alive.
        at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:30)
        at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:98)
        at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:79)
        at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:169)
        at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:161)
        at com.liferay.portlet.documentlibrary.recordlog.service.persistence.DLRecordLogPersistenceImpl.findByfileEntryId(DLRecordLogPersistenceImpl.java:570)
        ... 220 more
Caused by: java.lang.IllegalStateException: The com.liferay.portlet.documentlibrary.recordlog.model.impl.DLRecordLogImpl Cache is not alive.
        at net.sf.ehcache.Cache.checkStatus(Cache.java:2438)
        at net.sf.ehcache.Cache.get(Cache.java:1541)
        at com.liferay.portal.cache.ehcache.ModifiableEhcacheWrapper.get(ModifiableEhcacheWrapper.java:128)
        at net.sf.ehcache.hibernate.regions.EhcacheTransactionalDataRegion.get(EhcacheTransactionalDataRegion.java:105)
        at net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.putFromLoad(AbstractReadWriteEhcacheAccessStrategy.java:90)
        at net.sf.ehcache.hibernate.nonstop.NonstopAwareEntityRegionAccessStrategy.putFromLoad(NonstopAwareEntityRegionAccessStrategy.java:180)
        at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:195)
        at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
        at org.hibernate.loader.Loader.doQuery(Loader.java:857)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
        at org.hibernate.loader.Loader.doList(Loader.java:2542)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
        at org.hibernate.loader.Loader.list(Loader.java:2271)
        at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:940)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
        at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:86)
        ... 224 more


thumbnail
Zsigmond Rab, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 728 Fecha de incorporación: 5/01/10 Mensajes recientes
Hi Jitendra,

unfortunately it doesn't say the much useful. You could check if any of the other forum threads of the same topic help you if you haven't done yet.

For example, this one may help you:

https://www.liferay.com/community/forums/-/message_boards/message/11912637

Regards,
Zsigmond
thumbnail
Jitendra Rajput, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
I see couple of post facing the same issue what i am facing but no solution is available right now.
thumbnail
Zsigmond Rab, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 728 Fecha de incorporación: 5/01/10 Mensajes recientes
Hi Jitendra,

then, as I've never faced this issue, I only could debug it and a ticket can be opened in Jira, sorry.

Is it possible to share your plugin here?

Regards,
Zsigmond
thumbnail
Jitendra Rajput, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
HI Zsigmond -
For plugin i will have to do certain changes then only i can share. But mean while i can give steps to reproduce this issue.

1 ) Create sample hook
2) Create service.xml inside WEB-INF folder of hook and create any custom entity.
3) Build custom - services inside hook.
4) Now override any of the OOB jsp (i.e file_entry_action.jsp)
5) Copy service jar into [Server]/lib/ext.
6)User custom services inside hooked jsp.

At the first attempt it will work i mean when share you place your services inside lib/ext and deploy hook. After that if you again deploy hook you will see cache is not alive issue. To resolve this you will have to restart the server.

I hope this steps will help you to reproduce this issue.

Thanks,
Jitendra
http://itsliferay.blogspot.in/
thumbnail
Zsigmond Rab, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 728 Fecha de incorporación: 5/01/10 Mensajes recientes
Hi Jitendra,

which version of the portal are you using?

I'm not sure if I'll have time for this in the following days. The best would be if you create a ticket about this also.

Regards,
Zsigmond
thumbnail
Jitendra Rajput, modificado hace 9 años.

RE: Cache is not alive

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
I am using Liferay 6.1 EE GA2. Soon i will raise a ticket for this.

http://itsliferay.blogspot.in/