New issue with Comment creation/update lab - Passes in IntelliJ, not in mvn cmd line

Hi,
I managed to get around other oddities (having seen the solution, I confirmed that for whatever reason, the commentId was intended, I still want to understand why we are supplying a comment ID rather than using the _id field supplied).
Two things though:

  1. If I run the single UpdateCreateCommentTest() it will always fail on the testAddCommentUsingObjectId() because it’s not doing an add, it’s doing a get for a comment that doesn’t exist. I put the test code in my last post but here it is again:
@Test
  public void testAddCommentUsingObjectId() {
    String id = "5a9427648b0beebeb69579cc";
    Comment comment = dao.getComment(id);

    Assert.assertNotNull(comment);
  }

Question to mongoDB: Should it not be executing dao.addComment(id)???

  1. When I run the application in IntelliJ, I can pass the test on the status page. When I run it from the maven cmd line, it fails spectacularly. The output is this:

I did get the correct code which is why I was able to see the solution. However I’m puzzled by why it would run in one mode and not the other. The output of the application shows a ClassDefNotFound exception which doesn’t occur when running within IntelliJ. The stack trace didn’t seem to have any reference to the functions I added as part of this lab. Here is the output from the application:
mflix.log (60.8 KB)

Is there something I’m missing? It seems to me that the test should either both pass or both fail in IntelliJ and when run from cmd line.
-Hugh