Generate Handler issues

Hi, recently some handlers are not generated by Jmix studio anymore.
image
After some testing, all items with the yellow thunderbolt logo works but the ones with the blue dot logo don’t.
image

Here is some stacktrace I found in intelliJ.
Jmix 2.5.0
Jmix studio 2.5.1-251
IntelliJ IDEA 2025.1.1.1 (Community Edition)

Stack 1
java.lang.StackOverflowError
	at com.intellij.util.CachedValueBase.getTimeStamp(CachedValueBase.java:155)
	at com.intellij.psi.impl.PsiCachedValue.getTimeStamp(PsiCachedValue.java:106)
	at com.intellij.util.CachedValueBase.isDependencyOutOfDate(CachedValueBase.java:134)
	at com.intellij.psi.impl.PsiCachedValue.isDependencyOutOfDate(PsiCachedValue.java:86)
	at com.intellij.util.CachedValueBase.isUpToDate(CachedValueBase.java:124)
	at com.intellij.psi.impl.PsiCachedValue.isUpToDate(PsiCachedValue.java:80)
	at com.intellij.util.CachedValueBase.checkUpToDate(CachedValueBase.java:104)
	at com.intellij.util.CachedValueBase.getUpToDateOrNull(CachedValueBase.java:100)
	at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:289)
	at com.intellij.psi.impl.AbstractPsiCachedValue.getValue(PsiCachedValueImpl.kt:15)
	at org.jetbrains.kotlin.asJava.classes.LightClassesLazyCreator$get$1.computeValue(LightClassesLazyCreator.kt:28)
	at org.jetbrains.kotlin.asJava.classes.LightClassesLazyCreator$get$1.getValue(LightClassesLazyCreator.kt:33)
	at org.jetbrains.kotlin.asJava.classes.KotlinClassInnerStuffCache.getMethods(KotlinClassInnerStuffCache.kt:60)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassBase.getMethods(KtLightClassBase.kt:38)
	at org.jetbrains.kotlin.asJava.LightClassUtil.getPsiMethodWrappers$lambda$4(LightClassUtil.kt:160)
	at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:330)
	at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:318)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at org.jetbrains.kotlin.asJava.LightClassUtil.extractPropertyAccessors(LightClassUtil.kt:330)
	at org.jetbrains.kotlin.asJava.LightClassUtil.getLightClassPropertyMethods(LightClassUtil.kt:104)
	at org.jetbrains.uast.kotlin.BaseKotlinConverter.convertNonLocalProperty(BaseKotlinConverter.kt:366)
	at org.jetbrains.uast.kotlin.BaseKotlinConverter.convertDeclaration(BaseKotlinConverter.kt:228)
	at org.jetbrains.uast.kotlin.BaseKotlinConverter.convertDeclarationOrElement(BaseKotlinConverter.kt:294)
	at org.jetbrains.uast.kotlin.KotlinUastLanguagePlugin.convertElementWithParent(KotlinUastLanguagePlugin.kt:53)
	at org.jetbrains.uast.UastFacade.convertElementWithParent(UastContext.kt:66)
	at org.jetbrains.uast.UastContextKt.toUElement(UastContext.kt:145)
	at com.haulmont.jmixstudio.kotlinAsJava.KotlinAsJavaSupportSmartPointerFactory.processKtProperty(KotlinAsJavaSupportSmartPointerFactory.kt:76)
	at com.haulmont.jmixstudio.kotlinAsJava.KotlinAsJavaSupportSmartPointerFactory.createPointer$lambda$2(KotlinAsJavaSupportSmartPointerFactory.kt:38)
	at com.haulmont.jmixstudio.kotlinAsJava.KotlinAsJavaSupportSmartPointerFactory$createElementPointer$2.getElement(KotlinAsJavaSupportSmartPointerFactory.kt:56)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction$lambda$9(AnyThreadWriteThreadingSupport.kt:367)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction$lambda$10(AnyThreadWriteThreadingSupport.kt:455)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:455)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:367)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:944)
	at com.haulmont.jmixstudio.util.EntityUtil.ra(EntityUtil.java:824)
	at com.haulmont.jmixstudio.model.EntityAttributePsi.getMember(EntityAttributePsi.java:424)
	at com.haulmont.jmixstudio.model.EntityAttributePsi.getType(EntityAttributePsi.java:389)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.attributeToFetchPlanProperty(FetchPlanController.java:295)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.getInstanceName(FetchPlanController.java:248)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.attributeToFetchPlanProperty(FetchPlanController.java:299)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.getInstanceName(FetchPlanController.java:248)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.attributeToFetchPlanProperty(FetchPlanController.java:299)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.attributeToFetchPlanProperty(FetchPlanController.java:284)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanController.getLocalEx(FetchPlanController.java:267)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.loadSubProperties(FetchPlanPropertyUtil.java:88)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:111)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
	at com.haulmont.jmixstudio.backend.fetchplan.FetchPlanPropertyUtil.buildTreeProperty(FetchPlanPropertyUtil.java:129)
stack 2
java.lang.UnsupportedOperationException: Conversion to KtType is not supported in K1 implementation
	at org.jetbrains.kotlin.analysis.api.descriptors.components.KaFe10JavaInteroperabilityComponent.asKaType(KaFe10JavaInteroperabilityComponent.kt:145)
	at org.jetbrains.kotlin.analysis.api.impl.base.KaBaseSession.asKaType(KaBaseSession.kt)
	at com.haulmont.jmixstudio.backend.kotlin.KtPsiUtilsKt.getResolvedFqn(KtPsiUtils.kt:369)
	at com.haulmont.jmixstudio.intellij.action.handler.installpoint.KtInstallPointGenerator.contributeToTemplate(KtInstallPointGenerator.kt:161)
	at com.haulmont.jmixstudio.intellij.action.handler.KtGenerateHandlerAction.generate(KtGenerateHandlerAction.kt:99)
	at com.haulmont.jmixstudio.intellij.action.handler.KtGenerateHandlerAction.invoke(KtGenerateHandlerAction.kt:78)
	at com.haulmont.jmixstudio.flowui.sd.FlowViewControllerNotificationProvider$FlowGenerateHandlerActionInfo.onClickNotificationBtn(FlowViewControllerNotificationProvider.kt:288)
	at com.haulmont.jmixstudio.flowui.FlowEditorNotificationPanel$createActionButton$btn$1.actionPerformed(FlowEditorNotificationPanel.kt:54)
	at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:239)
	at com.intellij.openapi.actionSystem.impl.ActionButton.lambda$performAction$2(ActionButton.java:219)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1167)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.kt:405)
	at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:219)
	at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:535)
	at java.desktop/java.awt.Component.processEvent(Component.java:6438)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5043)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4871)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4963)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4577)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4518)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2810)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4871)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:783)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:755)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:753)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:752)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:585)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:530)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:473)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction$lambda$6(AnyThreadWriteThreadingSupport.kt:274)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:274)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runPreventiveWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:218)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:473)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10$lambda$9(IdeEventQueue.kt:307)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:864)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10(IdeEventQueue.kt:306)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:958)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:117)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:958)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12(IdeEventQueue.kt:301)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:341)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatc

It’s a key functionnality of Jmix studio, I hope it will be fixed soon.
Best regards.

Hi!

Thank you for your report. Could you also provide idea.log file please?

Regards,
Dmitriy

Hi,

From your logs I can see that you use K1 mode in Kotlin projects.
Jmix Studio does not support K1 mode for Kotlin since 2.5.0. Also K2 mode is default mode since IntelliJ IDEA 2025.1.

Please, try to switch to K2 mode.
You can find more info here.

Regards,
Mikhail

Hi, k2 mode is not compatible with Jmix studio.
If I enable it, problems in this ticket comes back.

  • K1: everything work fine except the problem in this ticket
  • K2: everything is broken

Do you support K1 or K2 ?

We support K2 mode in Studio since 2.5.0 for IntelliJ IDEA 2025.1 (Studio version is 2.5.0-251).
K1 mode not supported in Studio 2.5.0-251 and higher.

If you have a problems on Kotlin project with the latest Jmix Studio (for now 2.5.1-251), please attach idea.log file after you get an exception.

Regards,
Mikhail

Hi, now everything is working.
I did:

  1. activate k2 mode (it triggers a mandatory restart)
  2. invalidate cache and restart

:star_struck: :partying_face: :star_struck:
Thanks