Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Kotin class java.lang.ClassNotFoundException

Open
#84 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, kotlin
Domain
build-system

Research direction

Reproduce the Kotlin Gradle example and inspect Main.kt at line 10, where Mappers.getMapper fails to find PersonConverter. Check the generated PersonConverter implementation and runtime classpath, then verify that the example starts without ClassNotFoundException.

Written by the indexing model from the issue text.

Description

I built example project Kotlin Gradle but it showed error "class not found exception"


Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: Cannot find implementation for org.mapstruct.example.kotlin.converter.PersonConverter
	at org.mapstruct.factory.Mappers.getMapper(Mappers.java:61)
	at org.mapstruct.example.kotlin.MainKt.main(Main.kt:10)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: java.lang.ClassNotFoundException: Cannot find implementation for org.mapstruct.example.kotlin.converter.PersonConverter
	at org.mapstruct.factory.Mappers.getMapper(Mappers.java:75)
	at org.mapstruct.factory.Mappers.getMapper(Mappers.java:58)
	... 6 more

Dominant language
Java
Stars
1.4k
Forks
504
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapstruct/mapstruct-examples

All issues in mapstruct/mapstruct-examples

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.