Issue #369: Another NPE on em.createQuery(query).getResultList()

Type: Bug ReoprtVersion: 2.2.8Priority: NormalStatus: FixedReplies: 4

Related to #51 that was tested against 2.2.7 and marked as fixed in 2.2.8.

Running the same test case against 2.2.8 now results in:

[ObjectDB 2.2.8] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_25 (on Windows 7 6.1).
Please report this error on
com.objectdb.o.InternalException: java.lang.NullPointerException: null
at com.objectdb.o.EXR$e.c(
at com.objectdb.o.BCN.z(
at com.objectdb.o.BCN.j(
at com.objectdb.o.PBI.C(
at com.objectdb.o.PBI.q(
at com.objectdb.o.OBI.U6(
at com.objectdb.o.BQI.Vf(
at com.objectdb.o.PRG.ab(
at com.objectdb.o.QRM.US(
at com.objectdb.o.MST.US(
at com.objectdb.o.WRA.US(
at com.objectdb.o.WSM.US(
at com.objectdb.o.QRR.g(
at com.objectdb.o.QRR.b(
at com.objectdb.jpa.JpaQuery.getResultList(

Source available at The test runs correctly with EclipseLink, Hibernate. I can post the entities used in the test if you can't deduce the exact failure from this.


This is another unrelated NPE and this time I will need more than the stack trace.

I am checking out the test. How exactly should I run it?

ObjectDB Support

Very well. It's an svn repository, you can check out It's a Maven build, if you have Maven installed, you can just run "mvn install" and it'll run the SeedEntityImplTest for you. You can also import the project into your IDE workspace (for eclipse, you could run mvn eclipse:eclipse to generate the eclipse project configuration files, or you could m2eclipse eclipse plugin). SeedEntityImplTest is a testng test. I temporarily committed changes to configure the project ready for object (if you run with Maven, it'll complain about missing objectdb dependency and give you a command to install objectdb.jar into your local repository).


It seems as a bug in using non enhanced non managed entity objects as query parameters (or in criteria queries). Please try build 2.2.8_01 that should fix it. If it doesn't work try using enhanced classes (you should use enhanced classes anyway to improve performance).

ObjectDB Support

Verified and confirming that 2.2.8_01 fixes the issue.