Unchecked Exception by API

I was trying to complete the TextAndSubfieldTest ticket, when getting IOException. I don’t think I had done anything in the MovieDAO that would do such a thing. It seems it was the MongoDB API that is doing such throwing. It is not clear how you would have to debug such problem when the API is doing the Exception.

Hi @inurjaya,

Sorry for the trouble. Please share the errors you see in the console.

And is the error still coming if you undo the changes you did for TextAndSubfieldTest ticket ? If yes, please share the code so that we can debug it.

Kanika

I put some print screen of the error below. Apparently the VM actually crashed.


Error2
I am not sure what causes it. I found a some file in mflix/target/surefire-reports/ named *-jvmRun1.dumpstream with some message:

Created at 2019-05-31T12:48:39.152

TestSet has not finished before stream error has appeared >> initializing exit by non-null configuration: DEFAULT
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at org.apache.maven.surefire.booter.MasterProcessCommand.decode(MasterProcessCommand.java:115)
at org.apache.maven.surefire.booter.CommandReader$CommandRunnable.run(CommandReader.java:391)
at java.lang.Thread.run(Thread.java:745)

Created at 2019-05-31T12:48:39.513

Unexpected IOException with stream:

Created at 2019-05-31T12:48:39.517

Unexpected IOException with stream: Document{{_id=573a13a0f29313caabd0447b, title=Skin 'em Alive, year=1978, runtime=95, released=Thu May 25 07:00:00 ICT 1978, cast=[Bryan Rostron, Mario Novelli, Giuseppe Castellano, Pier Luigi Giorgio], lastupdated=2015-08-15 00:18:41.113000000, type=movie, languages=[Italian], directors=[Mario Siciliano], writers=[Amedeo Mellone, Mario Siciliano (screenplay), Mario Siciliano (story)], imdb=Document{{rating=5.3, votes=48, id=203090}}, countries=[Italy], genres=[Adventure], tomatoes=Document{{viewer=Document{{rating=0.0, numReviews=1}}, lastUpdated=Sat Jul 11 01:40:48 ICT 2015}}, num_mflix_comments=1}}

Created at 2019-05-31T12:48:39.520

Unexpected IOException with stream:
.
.
.

But I can’t ascertain if this file was generated by the command:

mvn test -Dtest=TextAndSubfieldTest.

Maybe the file was generated by previous test, but I am unaware of any exceptions. The test failed but I presumed it was because of wrong query syntax not any exception.

I’ll try to remove my code and see if the VM would crash again later and let you know.

Do you see the problem here? How did the file *-jvmRun1.dumpstream get generated?

Regards,
Indra N

I removed the changes I made in for the ticket and rerun the command:

mvn test -Dtest=TextAndSubfieldTest.

Another similar VM crash happened there.

I am not sure what is happening here.

Hi inurjaya,

After removing your changes for TextAndSubfieldTest ticket. Please share the output when you run the below command:

 mvn spring-boot:run

Meanwhile I am checking about the exception.

Kanika