« Return to Thread: Tomcat - Injection: No such property

Tomcat - Injection: No such property

by ebaxt :: Rate this Message:

Reply to Author | View in Thread

I'm trying to run my application with Tomcat+openEJB, but I can't figure out why the EntityManager isn't injected correctly into the EAO sessionbean.
My war file is packed with the ejb.jar in \WEB-INF\lib.

The client is able to lookup the facade, but when the facade delegates the EntityManager actions to the EAO a null pointer exception is thrown.

Here's the log.

INFO  - PersistenceUnit(name=sp2k, provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
INFO  - Jndi(name=TaxaEAOBeanLocal) --> Ejb(deployment-id=TaxaEAOBean)
INFO  - Jndi(name=Sp2kServiceBeanRemote) --> Ejb(deployment-id=Sp2kServiceBean)
INFO  - Created Ejb(deployment-id=TaxaEAOBean, ejb-name=TaxaEAOBean, container=My Stateless Container)
INFO  - Created Ejb(deployment-id=Sp2kServiceBean, ejb-name=Sp2kServiceBean, container=My Stateless Container)
INFO  - Deployed Application(path=F:\tomcat\apache-tomcat-6.0.16\webapps\fddb-war-1.0-SNAPSHOT)
WARN  - Injection: No such property 'no.uib.gyro.domain.classification.TaxaEAOBean/em' in class no.uib.gyro.domain.classification.TaxaEAOBean
WARN  - Injection: No such property 'no.uib.gyro.domain.classification.TaxaEAOBean/em' in class no.uib.gyro.domain.classification.TaxaEAOBean

The @PersistenceContext annotation is inside the TaxaEAOBean, so it's not past to the EAO from the facade.

The strange thing is that when I put the EJB's in the war archive, it all works fine. Is there a difference to openEJB between adding ejb.jar in WEB-INF\lib or to put the beans directly in the WEB-INF\classes?

Thanks.

-Erik

 « Return to Thread: Tomcat - Injection: No such property