Skip to Content
0
Former Member
May 29, 2008 at 07:35 PM

com.sap.engine.lib.injection.InjectionException

68 Views

Hello,

I have a generic crud component (an EJB called CrudServiceBean) which has an EntityManager such as attribute and in other project some entities (with JPA).

Project1:

- CrudServiceBean.java

- CrudServiceLocal.java

Project2:

- CeraEmployee.java

- Persistence.xml

Project3:

- App.java

When I try to use some method of CrudServiceBean in App.java I get an exception, u201Ccom.sap.engine.lib.injection.InjectionException: Injection on field entityManager of instance co.com.crystal.util.CrudServiceBean@4e40f180 failed. Could not get a value to be injected from the factoryu201D

But the persistence.xml file (with the persistence unit ) is in the entity project because the generic crud will be used in many entities projects, so how can I use my generic crud component out of the entity project?

Regards

Janeth