Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nithin KV
JUnit with Springs and Liferay Service Builder (version 6.1)
January 17, 2013 8:16 AM
Answer

Nithin KV

Rank: New Member

Posts: 20

Join Date: July 23, 2012

Recent Posts

Hi,

When i run my JUnit with Liferay Service builder , i am getting the below error.... where should i set the beanlocator ???.. i Have included portletcontextloaderlistener in my web.xml.. Please help me to fix this issue.

com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set for servlet context PuneetService-portlet
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:42)
at com.elm.portal.survey.common.service.SurveyLocalServiceUtil.getService(SurveyLocalServiceUtil.java:282)
at test.com.elm.service.TestPuneetLocalUtil.testGetService(TestPuneetLocalUtil.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Gogi SH
RE: JUnit with Springs and Liferay Service Builder (version 6.1)
March 11, 2013 3:56 AM
Answer

Gogi SH

Rank: New Member

Posts: 3

Join Date: November 3, 2012

Recent Posts

Has anybody else faced this problem and solved it?
Mika Koivisto
RE: JUnit with Springs and Liferay Service Builder (version 6.1)
March 11, 2013 3:19 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1499

Join Date: August 7, 2006

Recent Posts

Liferay plugins sdk doesn't currently support running integration tests like the portal core does. What you can do is use PowerMock or something like that to mock it.