Fórumok
Can I fetch ResourceAction in startup action? [Solved]
Bart Simpson, módosítva 11 év-val korábban
Can I fetch ResourceAction in startup action? [Solved]
Liferay Master Bejegyzések: 522 Csatlakozás dátuma: 2011.08.29. Legújabb bejegyzések
When I try to fetch ResourceAction in my startup hook. I see hibernate excetion.
Is it not allowed to use ResourceActionUtil.fetchByN_A(..) in a class extending
Liferay version is 6.1.10 EE
Caught unexpected exception org.hibernate.HibernateException
com.liferay.portal.kernel.exception.SystemException: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)
at com.liferay.portal.service.persistence.ResourceActionPersistenceImpl.fetchByN_A(ResourceActionPersistenceImpl.java:1039)
at com.liferay.portal.service.persistence.ResourceActionPersistenceImpl.fetchByN_A(ResourceActionPersistenceImpl.java:930)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Is it not allowed to use ResourceActionUtil.fetchByN_A(..) in a class extending
com.liferay.portal.kernel.events.SimpleAction
Liferay version is 6.1.10 EE
Bart Simpson, módosítva 11 év-val korábban
RE: Can I fetch ResourceAction in startup action? (Válasz)
Liferay Master Bejegyzések: 522 Csatlakozás dátuma: 2011.08.29. Legújabb bejegyzések
Found the issue, better to use
ResourceActionLocalServiceUtil.fetchResourceAction(...)