RE: Running Service Builder methods outside the Portlet

Kevin Neibarger, modified 6 Years ago. Regular Member Posts: 105 Join Date: 2/2/18 Recent Posts
So, I've created a standalone Java driver class with a main method to test some DB data. I want to call and run service-builder methods within Eclipse. What do I need to add to the Run Configuration to avoid the error:

BeanLocator has not been set for servlet context <PORTLET>
This happens when I try to call a method from a *LocalServiceUtil.java class. 
thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Service builder is an integral part of Liferay core leveraging both Spring and Hibernate.

What you're attempting would be extremely difficult to do, if not impossible, simply because of all of the assumptions the core makes about running within an app server, the web app context, ...
​​​​​​​