I ran into the exact same problem.
Whenever I change something (e.g. screen controller) and it’s trying to hot deploy, it runs into errors.
When I re-build the project, it works with no errors.
The compining error comes from my middleware ServiceBean.
It starts with this one:
Hot deploy compilation errors: .../modules/core/src/com/.../service/CurrencyServiceBean.java:3: error: package com.haulmont.cuba.core does not exist import com.haulmont.cuba.core.Persistence;
The same for:
error: package com.haulmont.cuba.core does not exist import com.haulmont.cuba.core.Query
error: package com.haulmont.cuba.core does not existimport com.haulmont.cuba.core.Transaction;
and of course also for the declarations:
error: cannot find symbol private Persistence persistence;
error: cannot find symbol private Transaction tx = persistence.createTransaction(“VT”);
error: cannot find symbol private Query q = persistence.getEntityManager(“VT”).createNativeQuery(…
There are no syntax errors in IntelliJ and once re-built the ServiceBean works as expected.
It’s the first ServiceBean that i made for this project (and the first one since Version 6 and since using IntelliJ)
CUBA Studio 2019.2 (IntelliJ Edition)
Build #CS-192.7142.133, built on May 18, 2020
Runtime version: 11.0.4+10-b304.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Non-Bundled Plugins: CUBA