Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Clue J. Frog
Problem with Liferay 5.1: BeanLocator exception
August 16, 2008 10:29 PM
Answer

Clue J. Frog

Rank: New Member

Posts: 10

Join Date: July 17, 2008

Recent Posts

Hello,

I'm working with the Tomcat liferay 5.1 bundle.
I developed a portlet with the plugins-sdk environment and deployed it to liferay.
When my portlet calls a custom service (created with the service-builder) I receive a strange exception, probably related to a Spring behavior.
I have also tried creating another prtlet just to see if my problem reproduces, and it does , emoticon

Can someone please shed some light?

Here is my stacktrace:

com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
at com.liferay.util.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:46)
at com.sv.vsaccess.service.SourceLocalServiceFactory._getFactory(SourceLocalServiceFactory.java:58)
at com.sv.vsaccess.service.SourceLocalServiceFactory.getService(SourceLocalServiceFactory.java:33)
at com.sv.vsaccess.service.SourceLocalServiceUtil.findByLocationId(SourceLocalServiceUtil.java:90)
at com.sv.vsaccess.view.SAccessPortlet.doGetSourcesPerUserLocation(SAccessPortlet.java:99)
at com.sv.vsaccess.view.SAccessPortlet.doView(VSAccessPortlet.java:129)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)

Thanks,
cf.
Clue J. Frog
RE: Problem with Liferay 5.1: BeanLocator exception
August 17, 2008 2:20 PM
Answer

Clue J. Frog

Rank: New Member

Posts: 10

Join Date: July 17, 2008

Recent Posts

Let me rephrase the problem: I can't deploy any portlet without getting this exception on liferay 5.1

Anyone?!
Auditya manikanta Vadrevu
RE: Problem with Liferay 5.1: BeanLocator exception
September 15, 2008 4:03 AM
Answer

Auditya manikanta Vadrevu

Rank: Liferay Master

Posts: 621

Join Date: May 6, 2008

Recent Posts

hi Clue J. Frog ,


i also tried to use service.xml in struts portlet but the same problem persists.


com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
at com.liferay.util.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:46)
at com.sv.vsaccess.service.SourceLocalServiceFactory._getFactory(SourceLocalServiceFactory.java:58)
at com.sv.vsaccess.service.SourceLocalServiceFactory.getService(SourceLocalServiceFactory.java:33)
at com.sv.vsaccess.service.SourceLocalServiceUtil.findByLocationId(SourceLocalServiceUtil.java:90)
at com.sv.vsaccess.view.SAccessPortlet.doGetSourcesPerUserLocation(SAccessPortlet.java:99)
at com.sv.vsaccess.view.SAccessPortlet.doView(VSAccessPortlet.java:129)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)



did u got the solution?
s w
RE: Problem with Liferay 5.1: BeanLocator exception
October 30, 2008 10:57 AM
Answer

s w

Rank: New Member

Posts: 23

Join Date: July 15, 2008

Recent Posts

hi,

i had the same problem - I think a web.xml entry is missing when working with service builder.

1
2    <listener>
3        <listener-class>com.liferay.portal.kernel.spring.context.PortletContextLoaderListener</listener-class>
4    </listener>


please let me know if it works.
borja soutullo
RE: Problem with Liferay 5.1: BeanLocator exception
November 5, 2008 9:40 AM
Answer

borja soutullo

Rank: New Member

Posts: 1

Join Date: September 17, 2008

Recent Posts

It worked fine!
Thanks a lot!

i would have never got to that
Hugo Alvarado
RE: Problem with Liferay 5.1: BeanLocator exception
May 27, 2009 9:06 AM
Answer

Hugo Alvarado

Rank: New Member

Posts: 11

Join Date: March 23, 2009

Recent Posts

Hello guys, I'm having the same issue still, I've tried to put the listener in web.xml as advised but with no luck instead it throws an java.lang.IllegalStateException Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml!

Any thoughts? cause its driving me crazy. Thank you !
s w
RE: Problem with Liferay 5.1: BeanLocator exception
May 29, 2009 1:01 AM
Answer

s w

Rank: New Member

Posts: 23

Join Date: July 15, 2008

Recent Posts

Can you post some more details, please.
Jonathan Alvarado
RE: Problem with Liferay 5.1: BeanLocator exception
November 13, 2009 12:27 PM
Answer

Jonathan Alvarado

Rank: New Member

Posts: 2

Join Date: November 13, 2009

Recent Posts

I think your issue may be that you have a line like this in your web.xml:

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>


remove that and add the aforementioned

com.liferay.portal.kernel.spring.context.PortletContextLoaderListener
Dennis Nes
RE: Problem with Liferay 5.1: BeanLocator exception
December 2, 2009 7:28 AM
Answer

Dennis Nes

Rank: Junior Member

Posts: 55

Join Date: September 23, 2009

Recent Posts

Hi,

I am having the same problem. I was taking a .war file, that was running on one one server and tried to deploy it to another server with no luck (BeanLocator exception). Both servers are running 5.2.3. and I also added the listener tag as mentioned above.

Any other ideas?

Thanks
David López
RE: Problem with Liferay 5.1: BeanLocator exception
August 11, 2010 12:22 AM
Answer

David López

Rank: New Member

Posts: 13

Join Date: August 11, 2010

Recent Posts

Hi everyone,

I was facing the same problem, and now I got it solved. In my case it seems 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
Laxman Rana
RE: Problem with Liferay 5.1: BeanLocator exception
March 28, 2012 8:49 PM
Answer

Laxman Rana

Rank: Junior Member

Posts: 42

Join Date: February 29, 2012

Recent Posts

hi S W..
i am getting the same error....

my question is this....

http://www.liferay.com/community/forums/-/message_boards/message/13219050

can u help me out??

Thanks in advance...