0

I'm using liferay6 and trying to access com.test.Foo (added to ext-service) in portal_normal.vm using

#set ($mySvc = $serviceLocator.findService("com.test.Foo"))

I'm getting the following exception.

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.test.Foo' is defined.

Where do i need to declare this bean?

1 Answers1

2

Please try the following snippet

$serviceLocator.findService("custom-portlet", "com.test.foo")

Replace custom-portlet with your portlet name

Sandeep Nair
  • 3,630
  • 3
  • 26
  • 38