JDub20 / hibernate-generic-dao

Automatically exported from code.google.com/p/hibernate-generic-dao
0 stars 0 forks source link

Null Pointer Exception when not using Spring #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I just found hibernate-generic-dao, and trying to integrate it with my project. 
I'm not using Spring, and I'm getting this exception:

java.lang.NullPointerException
    at com.trg.dao.jpa.JPABaseDAO._persistOrMerge(JPABaseDAO.java:256)
    at com.trg.dao.jpa.GenericDAOImpl.save(GenericDAOImpl.java:113)

Reading the code, I understand that I haven't assigned any value to 
EntityManager. What should I assign it? Is hibernate-generic-dao tested withot 
Spring integration?

Original issue reported on code.google.com by ron.gr...@gmail.com on 27 Nov 2010 at 5:02

GoogleCodeExporter commented 8 years ago
See also 
http://stackoverflow.com/questions/4292759/obtaining-entitymanager-without-sprin
g

Original comment by ron.gr...@gmail.com on 27 Nov 2010 at 5:02

GoogleCodeExporter commented 8 years ago
It is in fact tested without Spring integration. The stack overflow topic looks 
like it's got the right answer.

Original comment by dwolvert on 2 Dec 2010 at 1:35

GoogleCodeExporter commented 8 years ago
@dwolvert - have you read my comments on the top voted answer? 
http://stackoverflow.com/questions/4292759/obtaining-entitymanager-without-sprin
g/4292833#4292833

Original comment by ron.gr...@gmail.com on 2 Dec 2010 at 2:38

GoogleCodeExporter commented 8 years ago
I don't believe we actually have a problem with the framework here. If it turns 
out I'm wrong about this, feel free to post again.

Original comment by dwolvert on 25 Feb 2011 at 1:52