I have attached a simple, one-Servlet project that duplicates this issue. You can also see the issue reported in this Stack Overflow question (I didn't post that) and this forum post (posted by the same person it appears).
The attached project worked fine with Hibernate 4.2.x and through Hibernate 4.3.0.Beta4. I have not tested with 4.3.0.Beta5-4.3.0.CR1, but 4.3.0.CR2 and 4.3.0.Final result in the following error on Tomcat 7 and 8:
It would appear that, starting somewhere in 4.3.0.Beta5, 4.3.0.CR1, or 4.3.0.CR2, Hibernate stopped being able to resolve JNDI DataSource resources in Tomcat. This makes Hibernate 4.3.0.Final completely unusable, meaning this is a blocking issue. Until this is fixed, I will have to downgrade to 4.3.0.Beta4.
The reporter of the Stack Overflow question and forum post believes he has found the likely culprit: a change in the JndiServiceImpl#locate method.
|