title: Kotlin enum Jackson serialization: java.lang.ClassNotFoundException: kotlin.reflect.KotlinReflectionInternalError
body: <p>I'm getting</p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException:
    kotlin.reflect.KotlinReflectionInternalError</p>
  </blockquote>
  
  <p>in my spring boot rest endpoint when serializing class which contains following enum.</p>
  
  <pre><code>enum class Status private constructor(private val code: String) {
      ACTIVE("active"), PENDING("pending");
  
      companion object {
          fun fromString(value: String): Status {
              return when (value) {
                  "active" -&gt; ACTIVE
                  "pending" -&gt; PENDING
                  else -&gt; throw IllegalArgumentException("Not supported status $value")
              }
          }
      }
  }
  </code></pre>
  
  <p>I've tried to rewrite this enum to Java, and it works ok.</p>
  
  <p>P.S.: I have <code>compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+")</code> dependency in my build.gradle</p>
  
  <p>How to make jackson serialize kotlin's enum class?</p>