Using Cuba component wrapper CubaCheckBox breaks hot deploy

Since using any of the Cuba component wrappers such as CubaCheckBox with an unwrap, my hot deploy is broken and I always have to rebuild. I am using the CubaCheckBox as it has a setData/getData I can use to associate an entity with a component.

Having to build every time I make code changes is obviously impacting my productivity and I like to figure a solution. If I comment out any code using the Cuba component wrappers then hot deploy is working.

Here’s how I am unwrapping a CheckBox component.

CheckBox checkBox = uiComponents.create(CheckBox.class);
CubaCheckBox ccb = checkBox.unwrap(CubaCheckBox.class);

Here is the error from the Tomcat app.log file with deploy path redacted out.

Caused by: java.lang.RuntimeException: com.haulmont.cuba.core.sys.javacl.compiler.CharSequenceCompilerException: Compilation failed. Causes:
[path to deploy folder]/deploy/tomcat/shared/lib/vaadin-server-8.6.4-17-cuba.jar(/com/vaadin/server/VaadinRequest.java):29: error: cannot find symbol
import javax.portlet.ClientDataRequest;
^
symbol: class ClientDataRequest
location: package javax.portlet [path to deploy folder]/deploy/tomcat/shared/lib/vaadin-server-8.6.4-17-cuba.jar(/com/vaadin/server/VaadinRequest.java):30: error: cannot find symbol
import javax.portlet.PortletRequest;
^
symbol: class PortletRequest
location: package javax.portlet [path to deploy folder]/deploy/tomcat/shared/lib/vaadin-server-8.6.4-17-cuba.jar(/com/vaadin/server/WrappedSession.java):22: error: cannot find symbol
import javax.portlet.PortletSession;
^
symbol: class PortletSession
location: package javax.portlet Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

P.s I am using a Mac with IntelliJ 2019.2, CUBA Plugin 11.3-183. Java version is - openjdk version “11.0.3” 2019-04-16.

Hi Michael,
Thank you for reporting the problem. We have created an issue: Hot deploy doesn't work with CubaCheckBox class · Issue #2446 · cuba-platform/cuba · GitHub
We’ll fix it in the next update release 7.1.

The project below reproduces this error. If you run the project in debug, click on menu Application>Tests and click on Create. Now make a change to TestEdit.java e.g. change the string in

cubaCheckBox.setData(“TEST DATA”);

Now save TestEdit.java to trigger a hot deploy. Close the TestEdit screen and click on Create again. The error will then trigger.

cuba-component-error.zip (85.1 KB)

I posted my sample project just as you responded Andrey. Thank you for confirming I wasn’t going crazy.