Frequent errors of type: java.lang.NoSuchMethodError: package.wflow.task.Task.<init>(Ljava/lang/String;Lpackage/wflow/workflow/Workflow;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V



I’m constantly running into erros like this:

java.lang.NoSuchMethodError: package.wflow.task.Task.(Ljava/lang/String;Lpackage/wflow/workflow/Workflow;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V

The issued class:

data class Task(@Id val id: String = genId(),
            @DBRef val workflow: Workflow,
            @DBRef val tags: List<Tag> = listOf(),
            val taskHistory: TaskHistory = TaskHistory())

Way of instantiating:

Task(workflow = wflow, tags = tags)

I don’t get it. Am I doing something wrong here? The only required parameter as far as I can tell is the workflow. Why is it causing troubles? It appears when running tests.

Recent IDEA 2017.3.2,
Kotlin version: 1.2.20

Thanks for any suggestions.