Hot deploy not woring for java files

I am using jmix 2.3.3 and intellij 2024.2.

The changes in xml, theme etc are hot deployed but changes in java files are not being hot deployed.
When project is saved after changes in java files, the corresponding class file in generated in .jmix folder but no effect in running application. I have to stop and re-run the app.

This notification is shown always, is this related to this issue.
Screenshot 2024-09-21 131151

I have reinstalled intellij and jmix two times but this issue persist.

Please advice.

Hi!
Try to clean the Idea caches

Tried but issue persist.

Hi

The notification above is Vaadin Flow notification and not related to Jmix hot deploy, you can just ignore it.

Do you see the messages like the following in the application output?

Hot deploy: UserListView.java [669 ms]
Compiled files:
    com/company/untitled/view/user/UserListView.java
2024-09-24T14:42:02.718+04:00  INFO 89976 --- [         core-2] i.jmix.core.impl.TriggerFilesProcessor   : Calling io.jmix.flowui.view.ViewRegistry#loadViewClass(com.company.untitled.view.user.UserListView)
2024-09-24T14:42:02.755+04:00  INFO 89976 --- [         core-2] io.jmix.flowui.view.ViewRegistry         : ViewRegistry initialized in 26 ms

I see the massage as below but two last lines are missing-
Screenshot 2024-09-24 165050

The .jmix folder has this file
Screenshot 2024-09-24 165122

Does Studio generate file named like io.jmix.flowui.view.ViewRegistry#loadViewClass(com.company.untitled.view.user.UserListView)
in .jmix/temp/triggers directory when the Java file being compiled?

No, there is no temp folder in .jmix folder.

Screenshot 2024-09-24 192038

If I change xml file and save then also .temp folder is not generated but changes are hot deployed.

Thank you

Could you please attach idea.log file?

Idea.log is attached. I just tried 2023.3.8 but there also hot deploy was not working so just reinstalled 2024.2.2 and run my app.

idea.log (198.9 KB)

Thanks

Thank you.
But unfortunately there is no valuable data in the log.

I can guess that Studio can’t determine temp directory path for some reason and fails to create trigger file. That file is required for application to perform hot deploy of compiled classes.
We’ll consider logging improvement to find the reason of such issue.

Didn’t you set jmix.core.temp-dir application property in your project?

2 Likes

Thanks @gaslov, removing jmix.core.temp-dir application property solved the issue. I have defined some other value (jmix.core.temp-dir = /opt/tomcat/tempfile) for this as the server i was using, doesn’t allowed to create temp folder at default location.

Now i have auto generated temp/trigger folder.

Thanks again.

1 Like