Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 4 Documentation Website Mango 5 Documentation Website Radix IoT LinkedIn

    [SOLVED] "Failed to create authentication token: Bad Request"

    Scheduled Pinned Locked Moved Mango feedback
    3 Posts 2 Posters 1.9k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      adamlevy
      last edited by adamlevy

      Running the latest version of Mango with all modules up to date. When I go to generate a JWT token for any user I get the error message "Failed to create authentication token: Bad Request"

      Here is the corresponding error output from the logs: https://pastebin.com/XF3CbaLM

      The first line is:

      ERROR 2018-01-29T13:26:50,292 (com.serotonin.m2m2.web.mvc.rest.v1.exception.RestExceptionHandler.handleExceptionInternal:74) - Cannot deserialize value of type `java.util.Date` from String "2018-02-05T22:26:48.933Z": not a valid representation (error: Failed to parse Date value '2018-02-05T22:26:48.933Z': Unparseable date: "2018-02-05T22:26:48.933Z")
      

      We are running this version of java:

      $ java -version
      java version "1.8.0_131"
      Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
      

      Please let me know what additional information I can provide.

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ Offline
        Jared Wiltshire
        last edited by

        @adamlevy Looks like we haven't specified the defaults correctly for the date format, add this to your env.properties file and you should be fine.

        rest.customDateOutputFormat=yyyy-MM-dd'T'HH:mm:ss.SSSXXX
        rest.customDateInputFormat=yyyy-MM-dd'T'HH:mm:ss.SSSXXX
        

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • A Offline
          adamlevy
          last edited by adamlevy

          This worked for me. Thank you!

          BTW we had rest.customDateOutputFormat already specified in our env. properties file, it was just the wrong format. So the hard coded defaults are probably fine.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post