title: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type from String: not one of the values accepted for Enum class
body: <p>I'm upgrading a Spring Boot web service from Kotlin <code>1.4.32</code> to <code>1.5.0</code>.</p>
  <pre class="lang-kotlin prettyprint-override"><code>// Before:
  kotlin(&quot;jvm&quot;) version &quot;1.4.32&quot;
  kotlin(&quot;plugin.spring&quot;) version &quot;1.4.32&quot;
  
  // After:
  kotlin(&quot;jvm&quot;) version &quot;1.5.0&quot;
  kotlin(&quot;plugin.spring&quot;) version &quot;1.5.0&quot;
  </code></pre>
  <p>After upgrading and running the API, I get the following error:</p>
  <pre><code>com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `models.SeasonType` from String &quot;Season&quot;: not one of the values accepted for Enum class: [NO_SEASON, UNKNOWN, SEASON]
  </code></pre>
  <p><code>SeasonType</code> is an enum class:</p>
  <pre class="lang-kotlin prettyprint-override"><code>package models
  
  import com.fasterxml.jackson.annotation.JsonCreator
  
  enum class SeasonType(val value: String) {
  
      SEASON(&quot;Season&quot;),
      NO_SEASON(&quot;NoSeason&quot;),
      UNKNOWN(&quot;Unknown&quot;);
  
      companion object {
          @JsonCreator
          @JvmStatic
          private fun creator(serializedValue: String): SeasonType =
              values().firstOrNull { it.value == serializedValue } ?: UNKNOWN
      }
  
  }
  </code></pre>
  <p>Why does deserialization fail after upgrading Kotlin?</p>