The test still crashes on an NPE inside org.hibernate.loader.criteria.CriteriaQueryTranslator.getProjectedTypes(CriteriaQueryTranslator.java:382) . This does noe really display the actual bug as described by the issue, but still verifies that apparently valid code using the affected method does not work at all.
I'm currrently in an enterprise environment wher I can't upload a new zip file, but the test was run with java 1.8.0_60 and the following dependencies in the pom file:
<dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>5.0.2.Final</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.190</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.2.2.RELEASE</version> <scope>test</scope> </dependency> </dependencies>
Note also that after the exception, you will also get some exceptions in the @After / tearDown() method, unless you put the transaction.rollback() statement before session.close(). But the error has already been demonstrated at that point.
|