cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot perform injection over bean instance

Former Member
0 Kudos

Hi everybody,

I am developping a java web application and deploying it on netweaaver.

I have already defined wb DC, business EJB DC and a webserviceclient EJB DC.

My business EJB DC has dependency on webserviceclient EJB DC.

webserviceclients generated from a wsdl.

I try to call the webserviceclients from business EJb using Injection.

I get the following exception:

for stateless bean me.com/customer~mes~application*annotation|me.com~customer~mes~businessejb.jar*annotation|TestServiceBean; nested exception is: com.sap.engine.services.ejb3.util.pool.PoolException: javax.ejb.EJBException: Cannot perform injection over bean instance me.com.sample.ejb.TestServiceBean@1bf0d8b2 for bean me.com/customer~mes~application*annotation|me.com~customer~mes~businessejb.jar*annotation|TestServiceBean; nested exception is: com.sap.engine.lib.injection.InjectionException: Injection on field service of instance me.com.sample.ejb.TestServiceBean@1bf0d8b2 failed. Could not get a value to be injected from the factory.
com.sap.engine.services.ejb3.util.pool.PoolException: javax.ejb.EJBException: Cannot perform injection over bean instance me.com.sample.ejb.TestServiceBean@1bf0d8b2 for bean me.com/customer~mes~application*annotation|me.com~customer~mes~businessejb.jar*annotation|TestServiceBean; nested exception is: com.sap.engine.lib.injection.InjectionException: Injection on field service of instance me.com.sample.ejb.TestServiceBean@1bf0d8b2 failed. Could not get a value to be injected from the factory.
at com.sap.engine.services.ejb3.util.pool.ContainerPool.translate(ContainerPool.java:288)

I attached the business ejb and the called webservice client.

I am sure I am missing some steps here.

Glad to hear some thoughts about this issue.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member207744
Contributor
0 Kudos

Believe you are using Ejb3.0, if so you can use Dependency Injection concept (DI)

It will help you to resolve the problem.

By using DI, you can avoid more codes such as

wsdl url, path etc.