Runtime error while checking JUnit

I'm pretty shaky with unit testing, but I have some of my code, I really need to be sure of its consistency. I am trying to transfer data from an object to an external file using JSON, so I want to make sure that when I pull the data from the external file, it will be the same.

I use Unit test to assert this equality, but running into a problem, I'm not sure how to handle it. This is a runtime error, and this is what the console reads.

A fatal error has been detected by the Java Runtime Environment: Internal Error (classFileParser.cpp:3494), pid=5032, tid=7048 Error: ShouldNotReachHere() JRE version: 6.0_25-b06 Java VM: Java HotSpot(TM) 64-Bit Server VM (20.0-b11 mixed mode windows-amd64 compressed oops) An error report file with more information is saved as: L:\fliphouseWorkspace\Luas\hs_err_pid5032.log If you would like to submit a bug report, please visit: http://java.sun.com/webapps/bugreport/crash.jsp 

Any help would be greatly appreciated.

+7
source share
3 answers

If you use Eclipse to develop an Android application, here is another possible explanation: http://independentlyemployed.co.uk/2010/11/17/worked-out-why/ . (Apparently, this can also happen if you try to develop Android and regular Java in the same Eclipse workspace, see https://stackoverflow.com/a/464677/ )

If you do not, I think the common problem is that the JVM crashes trying to parse (possibly load) the class file. Most likely, the reason is that the class file is distorted in some way. If so, then this is not a JVM error. The JVM may have no choice but to report this problem through a crash report, as this can happen when the JVM boots.


Here's the entry in the Java error database that reports this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7032077 . Unfortunately, it was closed as irreproducible.

+3
source

This has nothing to do with your code, which looks like a genuine JVM error for me. JVM should never crash like this. Generate a bug report in Oracle.

+2
source

I assume you are using android, because most people have problems with Android and junit.
I found this blog post where they discuss a specific issue in the comments section. One comment mentions this particular error. You can find some help here. http://dtmilano.blogspot.com/2008/11/android-testing-on-android-platform.html

One of the suggested options is to delete the bin and gen directory and try again. ClassFileParser ANDROID should be ignored

+2
source

All Articles