Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Tomcat failed to start: SpringBoot + Vaadin 14 npm mode + gradle

Iskander Khabirov
2 years ago Sep 09, 2019 9:38am

Hello, I am migrating projects from Vaadin 13 to Vaadin 14.

Tech. stack: Java 8, Gradle, SpringBoot

In compatibility mode everything works fine, but I want to migrate to npm mode.

./gradlew bootRun - command works fine and application starts (if I have npm + NodeJS installed on my local machine)

When I try to build JAR file, (./gradlew build) it writes me, that BUILD SUCCESSFUL, but when I try to start application using this generated JAR file, it crashes with:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/home/user/Development/composer/build/libs/composer-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/atmosphere-runtime-2.4.30.slf4jvaadin1.jar!/org/atmosphere/inject/AtmosphereRequestIntrospector.class]; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

So I have a few questions:

  1. How to build JAR file using SpringBoot + Gradle + NPM mode?
  2. Is it possible to make it work without having NPM + NodeJS installed globally? (we are using separate server to build and deploy our applications and it will be complicated to install other software globally on this server, because of security policies, so maybe there is a way to install)
  3. Maybe there is already some gradle plugin with "prepare-frontend" task?

Output of application startup and my build.gradle files you can find in attachments.

Last updated on Sep, 9th 2019
Olli Tietäväinen
2 years ago Sep 09, 2019 9:48am

You might want to follow this Vaadin Flow Gradle Plugin issue: https://github.com/devsoap/gradle-vaadin-flow/issues/240

Last updated on Sep, 9th 2019
Iskander Khabirov
2 years ago Sep 09, 2019 10:05am

Olli Tietäväinen: You might want to follow this Vaadin Flow Gradle Plugin issue: https://github.com/devsoap/gradle-vaadin-flow/issues/240

Thank you, I am already following this issue.

Just was wondering if someone have similar tech. stack and already found "fast-hack" solution.

Jonas TM
2 years ago Sep 09, 2019 10:07am
Дмитрий Литвин
2 years ago Sep 27, 2019 12:42pm

I got the same stack as you and I don't really understand why Vaadin still doesn't have built-in Gradle support. There is only a 3rd party plugin which in not even free for Vaadin 14. No examples on Vaadin website, no Vaadin docs, no "starter apps", nothing. Can we get any official Vaadin position on supporting Gradle?

Aziz Rehman
2 years ago Oct 22, 2019 11:42am
Sebastian Sindelar
2 years ago Oct 28, 2019 3:14pm

Now that the Dev Soap/John Ahlroos Plugin is commercial (10$ per License and Month) it is really time for offical Gradle support from Vaadin. With a Vaadin 8 gradle project you now have to choose to pay a additional charge to fully use Vaadin 14 or drop Vaadin or Gradle. It's a very annoying situation.

The commercialisation of the Gradle plugin is litterally a slap in the face of the Vaadin customers because last year with Vaadin 11 it was declared that Vaadin now has "offical" support for Gradle and development of the Gradle plugin was sponsored by Vaadin.

Last updated on Oct, 30th 2019
Niko van Eeghen
2 years ago Oct 29, 2019 9:40am

Apologies for the confusion of the situation. We just ended our negotiations with John who has maintained the plugin so far.

We decided that Vaadin will take over development and maintenance of the plugin and that it will continue to be available for free.

We are still organizing around this decision internally, but are planning to release the latest plugin version for free shortly.

Sebastian Sindelar
2 years ago Oct 29, 2019 9:54am

That are terrific news!

John Ahlroos
2 years ago Oct 30, 2019 9:08am

I probably need to clarify a bit what Niko means here as I feel it is not really the whole truth.

Vaadin has decided to no longer support the Gradle plugin by Devsoap due to the fact that I (the author) wanted to provide a subscription model for the plugin users and provide the community with commercial content. Vaadin does not want other in the community to provide commercial services or products, rather provide all of them itself (as paid PRO features) and only allow the community to provide FREE plugins itself can use vie its own directory store.

So to clarify, there has been no hand-off of the plugin to Vaadin of any kind. Vaadin has decided to take that into its own hands.

This won't effect however the Devsoap plugin in any way. I will continue to provide updates and new releases to the plugin in the future as well just as before. The plugin has transitioned to a Creative Commons license (https://devsoap.com/product-licensing-changing-to-creative-commons/) to ensure the the project can continue as usual, all new features will be under that license.

It saddens me to see this kind of false information coming out of Vaadin, the company sure has changed over the years (and not in a good way).

Jouni Koivuviita
2 years ago Oct 30, 2019 10:16am

Just my personal opinion (I haven’t been part of any of the discussions or decisions about this), but I don’t think Vaadin wants to remove all other commercial products around Vaadin from the market. The case here is rather that Vaadin sees Gradle support as something that should be free, and that comes through the community comments in this thread as well (only a small sample of course). Also, I think Vaadin feels the development and maintenance of the Gradle support can’t be left for the community at this point, it would not progress fast enough.

Not a redeeming observation by any means, but this is what Apple is always doing: taking a thing the community has been making a business with for a while and making it part of their free offering. That doesn’t always kill the community/commercial offering. They might still have additional value over the one that Apple is providing for free.

Last updated on Oct, 30th 2019
John Ahlroos
2 years ago Oct 30, 2019 10:46am

Since I wrote the plugin for Vaadin 6 and maintained it through 7,8,10,11,12,13 and 14 the plugin has over the years always been free for the community to use. To this day, the Vaadin 8 plugin has never been sponsored by Vaadin in any way.

I am, and will always be a strong believer of keeping things available for the community.

But until this date, Vaadin has also never contributed to the Gradle plugin while for the Vaadin 8 plugin the community has majorly stepped up and provided pull requests and issues. That is why that plugin still is not under the DS PRO subscription and never will be.

If Gradle support has been deemed so vital and so urgent for Vaadin's success where are all the pull requests from Vaadin fixing the issues Vaadin have broken over the years? To this date there is not a single commit in the repository for the Vaadin Flow plugin from Vaadin, instead Vaadin has continued to break stuff in the framework and assumed the community will fix them for free. So, the only assumption I can make is that Vaadin is not really interested in working with the community, rather taking into use successful projects by the community for its own uses (free or not). Basically leveraging the communities work for free. Who will want to contribute addons to the Directory for example if everyone has to worry about Vaadin sweeping in once an addon becomes popular?

I'm sorry Jouni, I know many at Vaadin are good people, but I don't really buy your argument. If what you are saying is true then Niko would have just came out saying that instead of morphing the truth into something that was not agreed.

Niko van Eeghen
2 years ago Oct 30, 2019 11:01am

The formulation of my post was sloppy.

We (as in Vaadin) decided to invest in the development and maintainenance of the plugin, to ensure support for V14 for free. We will do this by forking the existing implementation.

Jonas TM
2 years ago Nov 14, 2019 6:06pm
Päivi Soinio
2 years ago Nov 17, 2019 10:00pm
Jonas TM
2 years ago Dec 04, 2019 6:13pm
Marko Grönroos
2 years ago Dec 04, 2019 7:58pm

Jonas TM:

What is the current status of the Plugin? (As it was not released today with Vaadin 14.1)

Hi! We have about finished the initial version of the free Vaadin Gradle Plugin, including basic documentation. It just needs some review and then we'll look into publishing it, and also make the repository available. As Friday is a holiday in Finland, it might go to next week.

Currently, the only major issue is support for Gradle 6, which we won't include in this initial release.

Marko Grönroos
2 years ago Dec 09, 2019 1:14pm

There's some more work to be done with the initial release, so it probably goes at least to next week.

Martin Grzenia
2 years ago Jan 17, 2020 9:12am
Marko Grönroos
2 years ago Jan 17, 2020 9:30am
Sebastian Sindelar
2 years ago Jan 17, 2020 9:43am

Any idea how long you need till the 'final' release?

Martin Vyšný
2 years ago Feb 06, 2020 7:09am
Iskander Khabirov
2 years ago Mar 05, 2020 1:17pm
Sebastian Sindelar
2 years ago Mar 05, 2020 1:27pm