Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Daniel Breitner
Strange Errors when accessing Liferay Services
March 29, 2013 11:56 AM
Answer

Daniel Breitner

Rank: Junior Member

Posts: 88

Join Date: July 16, 2008

Recent Posts

Hi everybody,

I encountered a very strange exception in Liferay GA1 (MAC OS).
I created a hook that offers a liferay service to store values.
The jar of that service is in m servers lib/ext directory, the hook has been deployed.

When I am trying to use that service I do get:


18:32:08,012 ERROR [render_portlet_jsp:154] org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.test.service.service.HibernateTransactionEntityLocalService' is defined
at com.liferay.portal.bean.BeanLocatorImpl.doLocate(BeanLocatorImpl.java:114)
at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:67)
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:47)
at com.test.service.service.HibernateTransactionEntityLocalServiceUtil.getService(HibernateTransactionEntityLocalServiceUtil.java:81)
at com.test.service.service.HibernateTransactionEntityLocalServiceUtil.getListTypesforEnum(HibernateTransactionEntityLocalServiceUtil.java:72)
at com.test.database.dao.liferay_impl.SchedulerLiferayDAO.getAllScheduleActions(SchedulerLiferayDAO.java:299)
at com.test.bean.SchedulerBB.fillScheduleActions(SchedulerBB.java:961)
at com.test.bean.SchedulerBB.<init>(SchedulerBB.java:448)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
Mehdi norouzi
RE: Strange Errors when accessing Liferay Services
March 30, 2013 2:28 AM
Answer

Mehdi norouzi

Rank: New Member

Posts: 14

Join Date: July 17, 2006

Recent Posts

Hi
It seems your problem is in way you use hook, you can make hook (Override service, jsp, properties) as portlet and then deploy it. I think it's not necessary to make jar and put in ext/lib
David H Nebinger
RE: Strange Errors when accessing Liferay Services
March 30, 2013 6:00 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7079

Join Date: September 1, 2006

Recent Posts

You should not do SB in a hook because it does not have the context to run. Deploy as a simple portlet plugin and you'll be a step closer...

To use the service in a hook, you either have to put the service jar in ROOT/WEB-INF/lib or move service jar to the global lib dir (lib/ext).