On Aug 19, 2008, at 12:29 PM, ericp56 wrote:


check if the persistence.xml is configured correctly.
I looked through that document, thanks for the link. I still can't get it
to work.

In my code:
 @PersistenceContext(unitName = "ctimssql")
 EntityManager em;

My EntityManager object is not being injected. When I try to use em, I'm
getting a NullPointerException.

dumb question... this annotated field is in an ejb class?


From persistence.xml:
 <persistence-unit name="ctimssql" transaction-type="JTA">
   <jta-data-source>eFlowCtiDatabase</jta-data-source>

From openejb-jar.xml:
 <enterprise-beans>
   <session>
     <ejb-name>eFlowCtiDatabase</ejb-name>
     <jndi-name>eFlowCtiDatabase</jndi-name>
   </session>
 </enterprise-beans>


In Geronomio, I configured a Data Pool named
eFlowCtiDatabase, using the jTDS data driver.

Any ideas on what isn't configured properly?

I don't see anything wrong, which doesn't mean much :-). I'd try naming the ejb and the datasource differently just to be certain they aren't conflicting in some way I haven't thought of. I'd also carefully llok through the log to see if there are any messages on the order of "cant figure out how to inject persistence context"

thanks
david jencks


Thanks,

Eric


--
View this message in context: 
http://www.nabble.com/JPA-and-JNDI-tp19041772s134p19057036.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Reply via email to