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

Re: Tomcat - Injection: No such property

by David Blevins :: Rate this Message:

Reply to Author | View in Thread


On Mar 29, 2008, at 1:14 PM, ebaxt wrote:

>
> 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?

There shouldn't be a difference, no.  There might be something we need  
to fix here.  Give the latest code a try and see if the problem  
doesn't go away:

   http://people.apache.org/~dblevins/3.0-SNAPSHOT/openejb.war

If it's still there, then if you can file a jira at http://issues.apache.org/jira/browse/OPENEJB 
, that'd be great.  If you could include a detailed description of  
your setup or a small app that reproduces the issue, that'd be great.

Thanks for your patience!

-David

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