I have the following Java code:
public T findByPrimaryKey(Object key, Class clazz) throws CPDPersistenceException {
try {
final EntityManager em = getEntityManager();
T t = em.find(clazz,key);
//etc.
The "find" method always returns null although I can see the entry in the table. The EntityManager object I created is not null. I added a print statement to be sure of this. There was one null entry in the table, and I fixed that, and yet the problem persists. There are three classes of objects created by this application, and only one, the "process" object has this problem as it passes through this piece of code. Does anybody have any idea? I perused similar questions about this problem on this site, and I do not see a solution to my problem among the answers given so far. Thanks for your time.