Chapter 2: User management ticket - currently validating

I’ve got uint tests passing but when trying to access status web page i have ‘user management currently validating’ and it will not change :frowning:

Is there a way to check what might be wrong?
Other tickets where properly verified.

Is there any errors printed?

there are few in app console - but not sure how you can narrow down from which tests they are as all of them are running

Always start with the first one.

Hi,

I’m having “java.lang.ClassCastException: com.mongodb.client.internal.Java8FindIterableImpl cannot be cast to mflix.api.models.Session” error for getUserSession. Can any one help me on this.

Error:(133, 79) java: incompatible types: org.bson.Document cannot be converted to mflix.api.models.Session

Thanks,
Uma

You have an expression that evaluates to a Document object and you try to assign it to a Session variable, or return a Document from a method declared to return a Session. You cannot do that as the error mesage tells you. You can solved this in two ways:

  1. Change the expression so that it evaluates to a Session object, OR
  2. Change the variable type to Document
1 Like

it turned out to be problem with createusersession - after changing it implementation next session was ok…

Good night, I’ve the same one in the Ticket: User Management, in the test UserTest, everything it’s OK, but when the application runs looks this message “User Management: duplicate emails should not be allowed”.
In the addUser and createUserSession methods I handed exceptions and also verified if the information exist in the database before.

1 Like

I am getting same error of casting document to Session object.
How did you resolved this error? Please help

Hi @Sparsh_94744,

Please share the code for the module that is causing the error. Looking at above error, it looks like you have used incompatible types.

Let’s take a look into the code and debug the issue.

Edit: Replied in the following thread:


Please let me know if you have any questions.

Thanks,
Sonali

1 Like