JVM crashes when using any other Hibernate inheritance strategy except SINGLE_TABLE

Well, this is probably a long shot, but here it goes.

In Java (JRE 1.6.0_26-b03), I have two classes, SuperControl and its subclass SubControl . Both must be persistent objects, and I use Hibernate Annotations to achieve this. I have approximately 210 classes that are saved correctly. Moreover, this is not so.

My problem is that SubControl refuses to inherit anything but SINGLE_TABLE . When I say β€œrefuses”, I mean that the whole JRE crashes .

This is a bit problematic because I would prefer SuperControl be mapped to the SuperControl superclass. SuperControl can also be a permanent entity in its own right. The strange thing is that I have a precisely parallel hierarchy in my code elsewhere that works correctly.

This is what I want:

 @Entity @MappedSuperclass public class SuperControl extends ItsSuperClass { // ... } @Entity public class SubControl extends SuperControl { // ... } 

but he is bombing with an error

 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (c1_Optimizer.cpp:271), pid=5456, tid=1260 # guarantee(x_compare_res != Constant::not_comparable) failed: incomparable constants in IfOp # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode, sharing windows-x86 ) # An error report file with more information is saved as: # C:\eclipse\hs_err_pid5456.log 

Without any hint of inheritance, Hibernate defaults to SINGLE_TABLE (which I can tell by creating a DTYPE column). I can explicitly indicate this without the JVM crashing.

 @Entity @Inheritance(strategy=InheritanceType.SINGLE_TABLE) public class SuperControl extends ItsSuperClass { // ... } @Entity public class SubControl extends SuperControl { // ... } 

Worst of all, if I remove the SubControl ENTIRELY class or even match it in the hibernate.cfg.xml file, the JVM still crashes. This leads me to think that there is some kind of hidden connection between SuperControl and SubControl . Maybe something is cached in Eclipse or the like. I restarted Eclipse, did a few clean and builds, and even restarted my machine, and the problem is still there.

Any ideas? I am working on this watch and have not gone anywhere.

Thanks!

+4
source share
2 answers

Try Java 1.6.0_20 and see if this works. You have encountered a JVM error, and you may need 6 minor versions to complete it.

You are fortunate that this error is reproducible, so create a minimal test file and place it in the Oracle database.

+3
source

It looks like error 7042153 , aka 2210012 reported in early May.

Pay attention to the workaround offered by one user: using the "-server" JVM option, this is fixed for them.

+6
source

All Articles