[CUBA 7] Hot-Deploy not working

The log attached is from my working CUBA 7 application that, once a hot-deploy action happens, throws this error. Also, the hot-deploy mechanism runs fast on xml files, but when I modify a UI Controller, once I hit Ctrl-S (to trigger the hot-deploy), CUBA Studio 7 IDE freezes until the hot-deploy finishes. It wouldn’t be that big of a deal, but then, the hot-deploy logs contain almost the ENTIRE UI module (I see that almost every class has been hot-deployed).
error.log (7.1 KB)

Issue happening on

CUBA Studio 2018.3 (IntelliJ Edition)
Build #CS-183.10.1, built on June 7, 2019
JRE: 1.8.0_152-release-1343-b28 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.18.0-25-generic

Also, project runs on Java 11 – openjdk@1.11.0 (the one that jabba installs) and on platform-7.0.8 as CUBA Platform version.

EDIT: Added the logs of the hot-deploy. hot-deploy.log (29.7 KB) Keep in mind that I edited a SINGLE Controller.

Hi! Could you attach the screen controller you try to hot deploy.

ProductSpecificationFrame.java (18.1 KB)

Hi, @shustanov

Sure, thanks for the fast reply. Confirmed this issue on MacOS build of the Studio also. It seems a flaw in the hot-deploy mechanism, not an issue with just some use-cases.

LE: This error seems to be thrown in catalina.out when hot-deploy tries to do it’s magic.

18:47:39.820 ERROR c.h.c.core.sys.TriggerFilesProcessor    - Trigger file C:\Users\alexa\Documents\webby\cuba-migration\scope-fb\deploy\tomcat\temp\scope-fb\triggers\cuba_WindowConfig.loadScreenClass('net.kprism.scope.fb.web.sensory.SensoryFrame') processing error: {}
java.lang.NoSuchMethodException: com.haulmont.cuba.gui.config.WindowConfig.loadScreenClass(java.lang.String)
	at java.base/java.lang.Class.getMethod(Class.java:2109) ~[na:na]
	at com.haulmont.cuba.core.sys.TriggerFilesProcessor.processFile(TriggerFilesProcessor.java:138) ~[cuba-global-7.0.8.jar:7.0.8]
	at com.haulmont.cuba.core.sys.TriggerFilesProcessor.process(TriggerFilesProcessor.java:93) ~[cuba-global-7.0.8.jar:7.0.8]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
	at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
	at com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler$TaskDecorator.run(CubaThreadPoolTaskScheduler.java:121) ~[cuba-global-7.0.8.jar:7.0.8]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

Please, try to dowload or update to the latest CUBA Studio.

Did that yesterday.

CUBA Studio 2019.1 (IntelliJ Edition)
Build #CS-191.7479.110, built on July 9, 2019
JRE: 1.8.0_202-release-1483-b53 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Did not freeze anymore, but still does not work. The error is still thrown on every action I do inside the App after the hot-deploy takes place.

Thank you for reporting the problem! It will be fixed in future bugfix release.

1 Like

Sure thing!

These days, I experienced a hot-deploy-less development flow and it is excruciating :laughing:

You said, that after the error has occurred, hot deploy completely finishes. We found a problem with CUBA 7 @UiController controllers, but the hot deploy of legacy screens should work as usual. Could you say, is hot deploy works on legacy screens after the exception?

The project I’m working on has all the screens migrated to the new API. The main window though, from what I know, uses the legacy API and the hot deploy used to work for that screen.

To summarize, the hot deploy doesn’t work for new CUBA 7 screens and works for the legacy API screens. Am I right?

No, tested it now and after the exception is thrown the App throws the same exception for all the actions I do after it is thrown.

So, bottom line, the hot-deploy does not work under any circumstances.

Hi @bujoralexandru1996

Can you please check our nightly builds 12.0.NIGHTLYxxx and test if this version works for you?

You can follow this instruction:

or just download .zip file from plugins repository:

(Haulmont_nightly list, then choose “Install from disk…” in IDEA).

To check whether our not yet publicly released bugfixes resolve your problem.

1 Like

Hello @AlexBudarov

Tried it just now, still not working, still throwing.

Could you share your project?

Hello Alex,

I faced hot deployment problem and this nightly build has fixed my issue.


@shustanov, the project I am working at is a closed-source enterprise project so sharing it is not possible, unfortunately. I will investigate if it is indeed working and I shall come with an answer by end of day.

@prashanth thank you for your input. Will try some more to see if it is indeed fixed.

LE: After the App start-up, I get this message in logs and it raised me some questions.

INFO: Server startup in 29336 ms
16:47:22.055 INFO  c.h.cuba.gui.config.WindowConfig        - WindowConfig initialized in 145 ms
16:47:23.688 WARN  c.v.s.communication.ServerRpcHandler    - 
The widgetset in use does not seem to be built for the Vaadin
version in use. This might cause strange problems - a
recompile/deploy is strongly recommended.
 Vaadin version: 8.8.5-1-cuba
 Widgetset version: 8.6.4-17-cuba

Yes! It works, but I needed to create web-toolkit module for it to work… Have no idea why. Anyway, now it does work.

LE: It started not working after a server restart… Same error is thrown in logs.
My final opinion after today is that hot-deploy still does NOT work as expected.

Could you try execute dropTomcat gradle task?

1 Like

have encountered the same problem.

Hi! Could you describe what exactly problem you have encountered, and attach idea and your application logs?