掲示板

[SOLVED] Service Builder BeanLocator has not been set

thumbnail
14年前 に Iván Bautista によって更新されました。

[SOLVED] Service Builder BeanLocator has not been set

Regular Member 投稿: 166 参加年月日: 10/01/25 最新の投稿
Hi all,

I´m resolved the eternal error "BeanLocator has not been set" using Service Builder beginning with the sample-service-builder-portlet from the Liferay SVN repository. I put it here to help members with the same problem.

After run the "build-service" ant task, we only need to change the second line of "portlet-spring.xml" file in /docroot/WEB-INF/src/META-INF. If I watch at it, we can see this lines:


<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-lazy-init="true" default-init-method="afterPropertiesSet" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="com.liferay.sampleservicebuilder.service.Entity.impl" class="com.liferay.sampleservicebuilder.service.impl.EntityLocalServiceImpl" />
.......
.......


Now, we replace the red line like this:


<?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="com.mundopetroleo.divisas.service.DivisaLocalService.impl" class="com.mundopetroleo.divisas.service.impl.DivisaLocalServiceImpl" />
.......
.......


And all begin to run without the horrible error!

Good luck for everybody, greetings!
thumbnail
14年前 に Stefan Haebler によって更新されました。

RE: [SOLVED] Service Builder BeanLocator has not been set

New Member 投稿: 1 参加年月日: 09/11/19 最新の投稿
Thanks for posting this Iván!

And if working within the ext environment, apply this change to ext-impl/src/META-INF/ext-spring.xml.

Cheers, Stefan
thumbnail
14年前 に Iván Bautista によって更新されました。

RE: [SOLVED] Service Builder BeanLocator has not been set

Regular Member 投稿: 166 参加年月日: 10/01/25 最新の投稿
thanks for the input/contribution Stefan emoticon
thumbnail
14年前 に Pravin Pawar によって更新されました。

RE: [SOLVED] Service Builder BeanLocator has not been set

Junior Member 投稿: 62 参加年月日: 09/11/17 最新の投稿
Hi,

The portlet which we developed using Service Builder still gives the BeanLocator has not been set exception.

The code you mentioned to replace is already present in portlet-spring.xml still the error message occured. We are using CE 5.2.3

Any Idea how to resolve the issue.
thumbnail
14年前 に Iván Bautista によって更新されました。

RE: [SOLVED] Service Builder BeanLocator has not been set

Regular Member 投稿: 166 参加年月日: 10/01/25 最新の投稿
I´m so sorry Pravin, but muy knowledge does not go that far.
Is very strange that liferay gives you the same error changing the xml file.

Maybe the error is in another point???
13年前 に David López によって更新されました。

RE: [SOLVED] Service Builder BeanLocator has not been set

New Member 投稿: 13 参加年月日: 10/08/11 最新の投稿
In my case it seemed to be a conflict with my libs and Liferay's libraries.
I excluded commons-logging.jar from my project because at the deployment Liferay was including it. Also, I included util-bridges.jar and util-java.jar at the lib folder of my project.

It solved it for me!
Regards