Forums de discussion
BeanLocator is null - Please Help.
Sam Wan, modifié il y a 13 années.
BeanLocator is null - Please Help.
Liferay Master Publications: 660 Date d'inscription: 03/03/09 Publications récentes
Hi,
With Liferay 5.2.4, tomcat 6.0, and Plugin SDK,
I got the following error when I use Add Application to add a Spring portlet.
How to set the Bean Locator in a Spring Project in liferay?
Very appreciate for any suggestion and help.
Thanks
Sam
With Liferay 5.2.4, tomcat 6.0, and Plugin SDK,
I got the following error when I use Add Application to add a Spring portlet.
[PortletBeanLocatorUtil:49] BeanLocator is null
How to set the Bean Locator in a Spring Project in liferay?
Very appreciate for any suggestion and help.
Thanks
Sam
Sam Wan, modifié il y a 13 années.
RE: BeanLocator is null - Please Help.
Liferay Master Publications: 660 Date d'inscription: 03/03/09 Publications récentes
Here is more info about the error:
my service.xml file does not contains any reference, here is the service.xml file:
VERY appreciate for any idea and help.
Thanks
Sam
14:24:59,134 ERROR [PortletBeanLocatorUtil:49] BeanLocator is null
14:24:59,137 ERROR [PortletRequestDispatcherImpl:316] org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/wizProductList.jsp at line 31
28: />
29:
30: <%
31: int total = ProductLocalServiceUtil.getProductsCount();
32:
33: List results = ProductLocalServiceUtil.getProducts(-1,-1);
my service.xml file does not contains any reference, here is the service.xml file:
<!--?xml version="1.0"?-->
<service-builder package-path="au.com.xyz.portlet.product_list">
<namespace>TelsProduct</namespace>
<entity name="Product" local-service="true" remote-service="true">
<column name="productId" type="long" primary="true" />
<column name="productName" type="String" />
<column name="productDescription" type="String" />
<finder name="_N" return-type="Collection">
<finder-column name="productName" />
</finder>
</entity>
<exceptions>
<exception>InvalidProductDescription</exception>
<exception>InvalidProductName</exception>
</exceptions>
</service-builder>
VERY appreciate for any idea and help.
Thanks
Sam
Sam Wan, modifié il y a 13 années.
RE: BeanLocator is null - Please Help.
Liferay Master Publications: 660 Date d'inscription: 03/03/09 Publications récentes
Here is the portlet-spring.xml file generated from running the command 'ant build-service':
Any idea is very much appreciated.
Thanks
Sam
<!--?xml version="1.0" encoding="UTF-8"?-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-init-method="afterPropertiesSet" xsi:schemalocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<bean id="au.com.xyz.portlet.product_list.service.ProductLocalService.impl" class="au.com.syz.portlet.product_list.service.impl.ProductLocalServiceImpl" />
<bean id="au.com.syz.portlet.product_list.service.ProductLocalService.velocity" class="org.springframework.aop.framework.ProxyFactoryBean" parent="baseVelocityService">
<property name="target" ref="au.com.syz.portlet.product_list.service.ProductLocalService.impl" />
</bean>
<bean id="au.com.syz.portlet.product_list.service.ProductLocalServiceUtil" class="au.com.syz.portlet.product_list.service.ProductLocalServiceUtil">
<property name="service" ref="au.com.syz.portlet.product_list.service.ProductLocalService.impl" />
</bean>
<bean id="au.com.syz.portlet.product_list.service.ProductService.impl" class="au.com.syz.portlet.product_list.service.impl.ProductServiceImpl" />
<bean id="au.com.syz.portlet.product_list.service.ProductService.velocity" class="org.springframework.aop.framework.ProxyFactoryBean" parent="baseVelocityService">
<property name="target" ref="au.com.syz.portlet.product_list.service.ProductService.impl" />
</bean>
<bean id="au.com.syz.portlet.product_list.service.ProductServiceUtil" class="au.com.syz.portlet.product_list.service.ProductServiceUtil">
<property name="service" ref="au.com.syz.portlet.product_list.service.ProductService.impl" />
</bean>
<bean id="au.com.syz.portlet.product_list.service.persistence.ProductPersistence.impl" class="au.com.syz.portlet.product_list.service.persistence.ProductPersistenceImpl" parent="basePersistence" />
<bean id="au.com.syz.portlet.product_list.service.persistence.ProductUtil" class="au.com.syz.portlet.product_list.service.persistence.ProductUtil">
<property name="persistence" ref="au.com.syz.portlet.product_list.service.persistence.ProductPersistence.impl" />
</bean>
</beans>
Any idea is very much appreciated.
Thanks
Sam