User Management: invalid response to logout

Like many others, I am having problems with this error:
User Management: invalid response to logout

It compiles and runs from the command line. When I go to localhost:5000/status, it displays the error “User Management: invalid response to logout”.

I have now

  • Made the pom.xml file identical to the course source code, with the addition of

    javax.xml.bind jaxb-api 2.2.11 com.sun.xml.bind jaxb-core 2.2.11 com.sun.xml.bind jaxb-impl 2.2.11 javax.activation activation 1.1.1
  • Reinstalled the sample data

  • Downloaded the most recent M220 source code and compared to mine. The only difference is in the src/main tree.

  • Tried different settings for jwtSecret= in applications.properties

Nothing works. :frowning: I did have my code create a unique index for sessions, and then use the exception to return false when attempting to insert a duplicate session (and of course did the same for the exception in the duplicate user creation).

Anyway, command line works, web site fails. There appear to be others who have experienced this and each seems to have a slightly different reason. I think my reason must be something else. Sad face.

Dan

Hi @Dan_Greening,

I am sending you a message where you can share the code for the logout function and lets see how we can help. :slight_smile:

Kanika

I had the same situation.
Press “Click to begin validation” --> got “java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException” in console.
I’ve done two things:

  1. Change my jwt secret to really big, containing only letters (fell down my face to keyboard 5 times :))
  2. add to my pom.xml, to “dependencies” section:
     <dependency>
         <groupId>jakarta.xml.bind</groupId>
         <artifactId>jakarta.xml.bind-api</artifactId>
         <version>2.3.2</version>
     </dependency>
    
     <!-- Runtime, com.sun.xml.bind module -->
     <dependency>
         <groupId>org.glassfish.jaxb</groupId>
         <artifactId>jaxb-runtime</artifactId>
         <version>2.3.2</version>
     </dependency>
    

Problem was solved. Hope it will be solved for you too.

111108’s solution does not work for me. I finished all the exercises and ran them locally with no errors, however I was not able to get around 5 of the validation codes. I shared my entire source tree with Kanika, and I’m hoping she will be able to find the problem.

Hi @Dan_Greening,

Apologies for the delay, got caught up in other tasks. I will look at the github repository today at the priority and will get back to you. :slight_smile:

Kanika

Sent invite to both of your GitHub IDS.
Dan

I got the invite. :slight_smile: Thanks, looking at it.

Kanika

Hi @Dan_Greening,

I think I have found the issue. It is with xml.bind dependency which is now depracated. Please give it a try with JDK8.

I am currently running your code using JDK8 and it works. For test and validation code, there are some minor issues that I am looking at. Let me know if how you would like to proceed :slight_smile:

Kanika

I tried it with jdk1.8.0_261.jdk and jdk1.8.0_141.jdk. “User Management”, “User Preferences”, “Create/Update Comments” still do not work, but I think one of the previously failing tests now does work.

Did you build this whole thing with my pom.xml, etc.? I changed the JDK in JAVA_HOME and PATH, then ran “mvn clean spring-boot:run”.

Could you try getting this to work with JDK 11, which is the most recent Long Term Support release for Java? The most recent version, which I normally compile with, is 14. However, most production folks stick with one of the LTS versions for development.

At a minimum, can you just mark me as completing the course requirements? I’d like to have the completion certificate.

Dan R. Greening — http://dan.greening.org http://linkedin.com/in/greening

1 Like

Sure I will do that.

Yes I rebuilt the project using your pom.xml file. And reason for your failed test is modified dataset. Can you remove the dataset and reload it again? I strongly believe it will resolve the issue completely.

Kanika

Oh well, no dice. Here’s the screenshot

Nice! We progressed. Amazing. Let me see logout function :slight_smile:

Just confirming did you do it yet? Otherwise, if you run unit-test, it should be failing because it was unable to clear the previous test records.

Kanika