Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Manager is always NULL - Weblogic / Netbeans

pin guan wang
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I can inject the entity manager to one of my EJB using @PersistenceContext.
However, when I try to remove this entity manager injection, and inject the entity manager from the next level, the entity manager is always null.
Please refer to my code below:

My persistence.xml

The 1st EJB:

2nd EJB

My local business interface

Please refer to my environment:

IDE: NetBeans IDE 8.0 (Build 201403101706)
Java: 1.7.0_67; Java HotSpot(TM) 64-Bit Server VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01
System: Windows 8 version 6.2 running on amd64; Cp1252;
WebLogic Server Version:

Anyone can give me some idea?

Thanks in advance
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic