Chapter 2: Ticket 3- User Management

I was trying to implement the methods mentioned in the ticket.
I was successful in implementing all the requested methods except getUserSession as I was receiving the following error in the return statement:
Error:(108, 83) java: incompatible types: org.bson.Document cannot be converted to mflix.api.models.Session
I tried running the application without implementing the getUserSession method to verify the functionality of rest of the implementations. Surprisingly, in the status section, I received the success validation code. I entered the same in the ticket to get it approved.
I referred the answer section for the ticket and found a similar implementation of the method.
As of now the login functionality is not working and all tests except the testLogin test is getting passed. Please provide a solution.

Please share the code for the function which is throwing error.


Upon further investigation, I realized that the object type being used was incorrect.
But I also found out that I am unable to signup/login as the user is not being inserted when signing up in the user collection.
To debug this, I ran the application with DEBUG logging.Debug logs

Hi @Sachin_60468,

Thanks for sharing the logs here. But I can see MongoDB command ran successfully and model also returned true:

Successfully completed request

It might be possible that UI is not working for signup/signin.

  • Are your unit tests passing?
  • If yes, are the integration tests passing?

If not, please share the console messages here.