Jmix-migration-advisor build is failing - cuba version 7.2.10 to JMIX

Hi Jmix Team,
Our team is using the CUBA 7.2.10 and during the last discussion with your sale team they suggested to migrate to Jmix.
Before migrate my management wanted to know how much time or hours it takes migrate from cuba to jmix.
you sale team provide below github link to build and run the migration advisor tool but its failing for me.

cuba version: CUBA Platform version: 7.2.10
CUBA Studio plugin version: 15.10-213
IntelliJ version: IntelliJ IDEA 2022.2.3 (Community Edition)
Java version: java --version

openjdk 11.0.21 2023-10-17 LTS

OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS)

OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode)

image

Here is the exception I am facing during the building the distribution.

jmix-migration-advisor-main % ./gradlew zipDist
Starting a Gradle Daemon (subsequent builds will be faster)

Task :compileJava FAILED
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/parser/screen/ScreenControllerParser.java:248: error: cannot find symbol
.toList();
^
symbol: method toList()
location: interface Stream
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/parser/screen/ScreenFacetsParser.java:29: error: cannot find symbol
.toList();
^
symbol: method toList()
location: interface Stream
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/parser/general/WebXmlParser.java:68: error: cannot find symbol
appComponents = Arrays.stream(StringUtils.normalizeSpace(paramValueElementValue).split(" ")).toList();
^
symbol: method toList()
location: interface Stream
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/parser/GlobalModuleJavaParser.java:68: error: cannot find symbol
.toList();
^
symbol: method toList()
location: interface Stream
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/estimation/ScreenEstimator.java:56: error: cannot find symbol
}).toList();
^
symbol: method toList()
location: interface Stream
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/estimation/EstimationDataProvider.java:250: error: cannot find symbol
.toList();
^
symbol: method toList()
location: interface Stream<ThresholdItem<Integer,V>>
where V is a type-variable:
V extends Object declared in method createThresholdItems(List,Function<String,V>,ThresholdItemGenerator)
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/estimation/EstimationDataProvider.java:254: error: cannot find symbol
return THRESHOLDS_XPATH_TEMPLATE.formatted(estimationUnitName);
^
symbol: method formatted(String)
location: variable THRESHOLDS_XPATH_TEMPLATE of type String
/Users/gnarayanaswamy/Downloads/jmix-migration-advisor-main/src/main/java/io/jmix/migration/analysis/estimation/EstimationDataProvider.java:258: error: cannot find symbol
return SIMPLE_COST_VALUE_XPATH_TEMPLATE.formatted(estimationUnitName);
^
symbol: method formatted(String)
location: variable SIMPLE_COST_VALUE_XPATH_TEMPLATE of type String
8 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:compileJava’.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --info option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 4s
2 actionable tasks: 2 executed

Hello.

Please use JDK 17+ to build distributive.
JDK 11 doesn’t have toList() method.

Regards,
Ivan

Thank you Ivan for your reply.
After installing jdk-17 I was able to build and start migration advisor but I am getting below error.

bin % ./migration-advisor analyze-cuba --project-dir “/Users/gnarayanaswamy/Documents/source/Insight” --base-package “com.rhinoj.insight”

Start ‘AnalyzeCubaProjectCommand’

Start project analysis

Project path = ‘/Users/gnarayanaswamy/Documents/source/Insight’, Base package = ‘com.rhinoj.insight’

Start CORE module analysis

Start web.xml analysis

Start GLOBAL module analysis

Start persistence.xml analysis

Start UI modules analysis

Start web-screens.xml analysis

File ‘com/rhinoj/insight/screens.xml’ not found in WEB/GUI modules

Here is the screenshot of my existing Cuba framework structure.
image

Any idea how to resolve this issue?

Team, Any update on the above issue I posted in previous comment?

Hello.

Sorry for the delay, was absent.

Can you show the stucture of the gui module?
Your web-screens.xml contains inclusion of ‘screens.xml’ - tool tries to find it in web and gui module.
If there is no such file - this should be the cause.

In this case, as a WA, you can create an empty screens.xml (not completely empty, but with empty <screen-config> element) or comment inclusion of this file in your web-screens.xml.

We will handle this case on our side.

Regards,
Ivan

Hi Ivan,
Here is the structure of my gui module.
image

Thank you

Hi Ivan,
Even after adding the screens.xml I am having same issue.
Please let me know how long it will take for your team to handle this your side?

Thank you

Hello,

Your current state (with existing screens.xml) should works now - just fixed along with another issue.

Original state - if you didn’t have screens.xml at all but had an inclusion of this non-existent file - is more like a sign of a project issue and maybe should cause failure actually. We’ll think about it.

Please report any issues you faced with this tool - it helps to cover some specific cases.

Regards,
Ivan

Let me try download new code from github and try running the build.

This issue resolved and you can close it.