cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting error "No bean named 'productsHelper' available"

bidyadhar_tripathy
Participant
0 Likes
1,747

Hi All,

We have created a CustomProductController (extends from BaseController) in customwebserviceaddon and installed this addon in customcommercewebservices extension (from ycommercewebservices template).

But when we are injecting productsHelper in our custom product controller class, then we are getting below error.

 @Resource(name = "productsHelper")
 private ProductsHelper productsHelper;

 INFO   | jvm 1    | main    | 2018/09/19 19:28:32.431 | WARN  [localhost-startStop-5] [TenantIgnoreXmlWebApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CustomProductController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'productsHelper' available

Note : ProductsHelper is defined in customcommercewebservice extension.

Can you please help me on this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Bidyadhar,

You should have an entry something like customcommercewebservices.additionalWebSpringConfigs.customwebserviceaddon =classpath:/customwebserviceaddon/web/spring/customwebserviceaddon-web-spring.xml in the project.properties for your customwebserviceaddon

if not could you please make the entry to add the spring.xml in so that the beans defined may load in the application context and it should resolve your error.

thanks,

Ask a Question