Jmix 2.0 release candidate

Hi everyone,

We are happy to announce that the release candidate of Jmix v.2.0 is published in nexus.jmix.io repository! Studio v.2.0 is available through the nightly channel.

See what’s new for upgrade instructions and the list of new features and improvements.

Please note that automatic upgrade from 1.5 to 2.0 is possible only for projects using Flow UI. Later we’ll publish recommendations for how to migrate an existing project from Jmix 1.5 Classic UI to Jmix 2.0 Flow UI.

We will greatly appreciate if you test the release candidate and let us know about any issues!

The final release 2.0 is scheduled for the next week.

12 Likes

Great job… really interested in the Email Module to start testing a new application. Any idea if we will have the calendar module?

1 Like

Great news Konstantin! I would like to ask you if you could also publish some recommendations on how to use charts & other javascript components in the FlowUI. We are planning to start the migration of an existing Jmix app to FlowUI but it contains several charts / dashboards & javascript components. I would appreciate an official recommendation on how to migrate this kind of components.

Thanks,
George

Thanks!

No idea at the moment, it needs some research.

It’s on our todo list.

1 Like

Great! I was waiting for this message indeed! Going to explore…

1 Like

I have started migrating my Jmix Flow UI composite project (>20 addons), and the migration went very smoothly.

Here are some comments:

  1. The Vaadin add-on related maven repository declaration was removed as follows.
  maven {
        url 'https://maven.vaadin.com/vaadin-addons'
  }
  1. The following import statement wasn’t changed but I have done it easily using replace command of IntelliJ.
    from
    import io.jmix.core.metamodel.datatype.impl.EnumClass;
    to
    import io.jmix.core.metamodel.datatype.EnumClass;

  2. My java ee related package references has been replaced by jakarta package reference as expected but my project didn’t recognize them.

image

How can I resolve this?

updated the dependencies helped resolving the above:

dependencies {
    implementation 'jakarta.mail:jakarta.mail-api:2.0.1'
}

Now NEXT STEPS:
My composite project has been compiled smoothly but couldn’t log in. I think it is because of the multitenancy add-on I have.

I have created a new project in V2.0 RC2 and when I tried to use multitenancy addon, I noticed that the documentation is still referring to classic UI framework, not Flow UI and didn’t find some API recognized.
So, I am stuck here.

Another issue:
I have been experiencing non-update of any changes when running the application in dev. env.

See below the field in read-only mode (red outlined):
image

And when I run the application, it is still active:
image

I have made some business logic in the controller, the program is also not behaving accordingly likewise.
I have tried different ways to resolve this e.g. clearing the cache, reloading from disk, reopening the project, restarting the computer, and clearing the cache from the Jmix plug menu too – no change…

Any thoughts?

Thank you for trying out the RC!
We’ll investigate the problem with the dependency and with Multitenancy add-on and come back to you. The docs will be updated soon.

I have been experiencing non-update of any changes when running the application in dev. env.

Could you elaborate on this? What properties are set for the field and what is expected behavior?

1 Like
dependencies {
    implementation 'jakarta.mail:jakarta.mail-api:2.0.1'
}

No need to define a version as this artifact version is defined in Spring Boot dependencies.

You may just type

dependencies {
    implementation 'jakarta.mail:jakarta.mail-api'
}

Also when the email add-on is added this dependency should also be automatically included to your project.

You can find information in the issue comment.

Please check that a directory where hot-deployed files are put is empty: .jmix/conf

Hi, trying the 2.0 RC I get this error:

Using newest IDEA version on MAC…

Cheers
Roland

2023-06-23 11:06:38 LOG INFO: DevServer start failed. Cause: java.lang.IllegalStateException: Startup of Vite failed. Output was:
Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:57901
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 57901
}
Message: java.lang.IllegalStateException: Startup of Vite failed. Output was:
Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:57901
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 57901
}
Stacktrace:
[java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332), java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347), java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:874), java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841), java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483), java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373), java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182), java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655), java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622), java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)]
2023-06-23 11:06:38 LOG INFO: DevServer start failed. Cause: java.lang.IllegalStateException: Startup of Vite failed. Output was:
Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:57901
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 57901
}

Hi,
The problem is related to accessing the view designer’s port over IPv6, instead of IPv4 ("::port" instead of “localhost:port”).
Which version of node is installed on the computer? Has it already been installed or did the installation happen during the designer startup?
You can try installing 18 node and reopen project.

Regards,
Mikhail

Thank you, changed it to a generic reference instead of a version-specific reference of Jakarta.mail. I have developed my own solution dealing with incoming emails before the add-on is available that’s why I needed this. However, I just scanned two add-ons-related email, it seems to me they are only related to sending emails, nothing related to the management of incoming emails. Did I miss anything here?

Hi, thx…

node --version shows: v18.16.1

when I click on: clean and restart in the preview box,
it starts to build the frontend development,
but then again throws this error:

------------------ Frontend compilation failed. ------------------

2023-06-23 06:03:31 LOG INFO: Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:62411
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 62411
}

2023-06-23 06:03:31 LOG INFO: DevServer start failed. Cause: java.lang.IllegalStateException: Startup of Vite failed. Output was:
Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:62411
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 62411
}
Message: java.lang.IllegalStateException: Startup of Vite failed. Output was:
Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:62411
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 62411
}
Stacktrace:
[java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332), java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347), java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:874), java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841), java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483), java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373), java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182), java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655), java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622), java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)]
2023-06-23 06:03:31 LOG INFO: DevServer start failed. Cause: java.lang.IllegalStateException: Startup of Vite failed. Output was:
Watchdog connection error. Terminating vite process… Error: connect ECONNREFUSED ::1:62411
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘::1’,
port: 62411
}

Hi
In fact, I tried with those codes suggested before I posted here. Now I have downloaded the sample app that you have in Git Hub (following your link) and see the same problem that I have been facing. See below the screenshot where you see FlowuiComponentUtils, MultitenancyFlowuiSupport, etc, are red… not recognized.

image

Later, I checked the API/package reference below:

import io.jmix.flowui.kit.component.ComponentUtils;
import io.jmix.multitenancyflowui.MultitenancyUiSupport;

You also need to change reference from javax to jakarta in the demo app.

Then when I run your test app, it is failed with the following exception:

2023-06-23T12:38:41.797-04:00 ERROR 2434 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChains' parameter 0: Error creating bean with name 'sec_UiSecurityFilterChain' defined in class path resource [io/jmix/autoconfigure/securityflowui/SecurityFlowuiAutoConfiguration$DefaultFlowuiSecurityConfiguration.class]: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'securityFilterChain' threw exception with message: View 'login' is not defined
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:818) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:770) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:133) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:482) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1416) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:597) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:941) ~[spring-context-6.0.9.jar:6.0.9]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608) ~[spring-context-6.0.9.jar:6.0.9]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.1.0.jar:3.1.0]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:733) ~[spring-boot-3.1.0.jar:3.1.0]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435) ~[spring-boot-3.1.0.jar:3.1.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) ~[spring-boot-3.1.0.jar:3.1.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1305) ~[spring-boot-3.1.0.jar:3.1.0]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1294) ~[spring-boot-3.1.0.jar:3.1.0]
	at com.company.flowuimultitenancytest.FlowuiMultitenancyTestApplication.main(FlowuiMultitenancyTestApplication.java:32) ~[main/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sec_UiSecurityFilterChain' defined in class path resource [io/jmix/autoconfigure/securityflowui/SecurityFlowuiAutoConfiguration$DefaultFlowuiSecurityConfiguration.class]: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'securityFilterChain' threw exception with message: View 'login' is not defined
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:659) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:647) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1332) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1162) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1633) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1597) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1488) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1375) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:810) ~[spring-beans-6.0.9.jar:6.0.9]
	... 20 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'securityFilterChain' threw exception with message: View 'login' is not defined
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:171) ~[spring-beans-6.0.9.jar:6.0.9]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655) ~[spring-beans-6.0.9.jar:6.0.9]
	... 36 common frames omitted
Caused by: io.jmix.flowui.exception.NoSuchViewException: View 'login' is not defined
	at io.jmix.flowui.view.ViewRegistry.getViewInfo(ViewRegistry.java:330) ~[jmix-flowui-2.0.999-SNAPSHOT.jar:na]
	at io.jmix.securityflowui.FlowuiSecurityConfiguration.setLoginView(FlowuiSecurityConfiguration.java:252) ~[jmix-security-flowui-2.0.999-SNAPSHOT.jar:na]
	at io.jmix.securityflowui.FlowuiSecurityConfiguration.setLoginView(FlowuiSecurityConfiguration.java:247) ~[jmix-security-flowui-2.0.999-SNAPSHOT.jar:na]
	at io.jmix.securityflowui.FlowuiSecurityConfiguration.initLoginView(FlowuiSecurityConfiguration.java:202) ~[jmix-security-flowui-2.0.999-SNAPSHOT.jar:na]
	at io.jmix.securityflowui.FlowuiSecurityConfiguration.securityFilterChain(FlowuiSecurityConfiguration.java:140) ~[jmix-security-flowui-2.0.999-SNAPSHOT.jar:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[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:568) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) ~[spring-beans-6.0.9.jar:6.0.9]
	... 37 common frames omitted

I have attached your test app as updated, thanks for suggesting it…
flowui-multitenancy-test.zip (442.3 KB)

would there be a way to maintain the used host and port in the vite.config.ts file?

change ::1 localhost > ::1 ip6-localhost fixed the issue (in etc/hosts)

1 Like

I didn’t find this folder…do I have to create on under j.mix?