Vaadin doesn't show up after upgrade from 23.2.10 to 23.3.1 - vaadin

Intention: I want to switch from Vaadin 23.2.10 to 23.3.1.
What I did:
In the pom.xml I changed Vaadin version from 23.2.10 to 23.3.1.
What happened:
After that the application (Spring Boot plus Vaadin) starts, but the UI doesn't show up. Instead I see this message:
Question: Is there anything special to migrate between these versions? The guide at https://vaadin.com/blog/vaadin-23.3-kubernetes-cloud-new-ui-components just says "Update the Vaadin version in your pom.xml to 23.3.0 if you are on Vaadin 23.2.x."
What I tried and additional observations:
Thanks to virtualization I've got the same development environment multiple times. When leaving Vaadin at version 23.2.10 everything works fine. Just after switching to 23.3.1 (or 23.3.0) the UI doesn't show up any more.
When switching from 23.3.1/23.3.0 back to 23.2.10 then the UI starts but there shows up an error message in the UI: "
[TypeScript] Cannot find module '#vaadin/tooltip' or its corresponding type declarations.
/home/[mypath]/frontend/generated/jar-resources/tooltip.ts:1:25
> 1 | import { Tooltip } from '#vaadin/tooltip';
| ^^^^^^^^^^^^^^^^^
2 |
3 | const _window = window as any;
4 | _window.Vaadin = _window.Vaadin || {};
Deleting the folders .m2/com/vaadin and node_modules and the package.json and package-lock.json does not help: the 404 error behavior still occurs with version 23.3.x.
In a well working application (with Vaadin 23.2.10 without ever trying to upgrade) there is a message in the console at startup: "Vaadin application has been deployed and started to the context path "/".". This message is missing with the 23.3.x releases.

As noted from the release notes Spring Boot 2.7.x is needed to run the latest Vaadin 23.3.x.
Vaadin 23.3.x can't register its custom Servlet with Spring Boot <= 2.6.x, because it switched to the new / non-deprecated #AutoConfiguration available since Spring Boot 2.7.0 to prepare for Spring Boot 3.0 where the old mechanism is completely removed.

Related

Vaadin 23 application doesn't recognize vaadin-dev-server dependency when running in development mode

I'm in the process of upgrading a Vaadin Flow application from Vaadin 14 to Vaadin 22. I'm using Gradle 6.9.1 to build the application. When I run the application in Eclipse, I get warnings and errors in the logs identical to those documented in issue 11982. According to this issue, this initial warning about the vaadin-dev-server dependency is the most relevant message:
WARN [] [VaadinServletService] [qtp819245704-14] no DevModeHandlerManager implementation found but dev server enabled. Include the com.vaadin.vaadin-dev-server dependency.
I have included the dependency in my build.gradle file. Here are the dependencies that are relevant to Vaadin:
dependencies {
implementation "com.vaadin:vaadin-core:22.+"
implementation "com.vaadin:vaadin-dev-server:9.0.0"
}
I can see vaadin-dev-server-9.0.0.jar in my Referenced Libraries within Eclipse along with the other Vaadin .jar files. All of them are located in my Gradle cache.
Am I missing something, or is there anything I can do to resolve this issue? Let me know if there's any more information I can provide.
Edit: I'm now trying to upgrade the application to Vaadin 23 instead and I'm experiencing the same issue. I'm also getting the webpack error referenced in this question. If it helps, I'm running the project locally using embedded Jetty and I'm manually instantiating and invoking the initializers used by Vaadin as described in this answer.

Grails 2.4.3 app auto reloading not working

Unable to reload grails application at runtime, My current development environment:
Grails app version 2.4.3
JDK: 1.7.0_21
I have added following setting in my BuildConfig file
grails.servlet.version = "3.0"
grails.reload.enabled = true
Some links
After going through different stack overflow links such as,
Grails auto-reloading new controller actions
I Checked springloaded jar file, tested app by replacing jar with snapshot jar from here.
Checked java version required by Grails 2.4.3
After checking some JIRA issues, I upgraded my Java version to latest java 1.7 version and tested app.
What is affecting to reload app at runtime?
grails -reloading run-app
after this your application starts reloading automatically.
After lots many debugging and checking online resources I succeeded to reload my app
Solution:
While running my grails app, I come across some java ioexception (user limit of inotify watches reached) which was restricting reloading of my grails app.
Updated system inotify watch limit link
Replaced springloaded jar shipped with grails 2.4.3 with snapshot version
(Check this link https://jira.grails.org/browse/GRAILS-11728)

Grails run-app 'Application metadata not found'

I downloaded a serverpush example called GrailsChat and trying to run is on grails 2.4.4.
I had some issues with dependencies missing that took me a while to figure out (don't think it's related but just mentioning it).
When I run grails run-app I get:
| Application metadata not found, please run: grails upgrade
When I run grails upgrade I get
| Script 'Upgrade' not found, did you mean:
1) MigrateDocs
2) IntegrateWith
3) SetGrailsVersion
4) InstallDependency
5) DependencyReport
> Please make a selection or enter Q to quit:
I figure the issue is probably to do with the grails version I have being newer than the grails version that the sample app was targetting but I don't want to move back version simply to run an example (I'd rather understand the underlying issue).
Can anyone point me to some documentation that will help me understand what the application metadata is and how to move forward please?
Grails Upgrade command is removed in 2.4. You might have to upgrade the app manually following the guide.
Or you can just run the service wrapper which will download the grails version automatically base on the app.
./grailsw run-app
It seems like you have missed any one of mentioned
Not set grails proper Version
Missing application.properties file (with proper grails version)

Grails 2.4.0.RC1 seems to lock javascript files on Windows 7 - 64bit

I am using Grails 2.4.0.RC1 (and JDK 1.7.0_55) and whenever I browse to any app view that makes use of javascript files from the web-app folder, the java process seems to lock those files.
So I cannot work on any of those javascript files any more since when I try to save changes Windows 7 will not let me do it.
I used Process Explorer to check which process is locking the files and it's the java process running the grails app indeed.
At first I thought that this problem could be related to the new asset-pipeline:1.8.7 plugin which I am using. So I uninstalled it to check if the problem was still there... and it was.
The same app was running on Grails 2.3.5 just fine (although we were using an older JDK too... I must check with JDK 1.7.0_55).
By the way, something similar happened with a much older version of Grails: https://jira.grails.org/browse/GRAILS-3585
Is Anyone experiencing the same problem?
UPDATE 1:
I have tested this problem running the app on different versions of java and these are my results:
Win7-64bits, grails2.4.0.RC1, jdk1.7.0_55 -> PROBLEM OCCURS
Win7-64bits, grails2.4.0.RC1, jdk1.7.0_25 -> PROBLEM OCCURS
Win7-64bits, grails2.4.0.RC1, jdk1.6.0_18 -> OK
UPDATE 2:
I created a blank app (which uses Tomcat by default) and everything works fine.
The same blank app using jetty-plugin (with Jetty8) DOES present the problem.
I am further investigating this now.
I found the problem.
It had to do with the jetty-plugin indeed.
On the official version of the plugin 2.0.3 which uses Jetty7, the locking problem is NOT present. But this plugin uses a very old version of Jetty, so it's no use.
On the branch of the plugin created to run Jetty8:
https://github.com/grails-plugins/grails-jetty/tree/2.0.x
... the problem is there.
Also, on the new grails jetty plugin version 3.0.x (which uses Jetty 9.0.x), the problem is there too!
UPDATE 1:
Have a look at:
Jetty locking static files in Windows
Apparently the "useFileMappedBuffer" init-param of Jetty has to be set to false to prevent file locking.
You can use a local version of the jetty plugin and modify the above-mentioned property on [jetty-plugin]/grails-app/conf/webdefault.xml

Cannot create grails projects in STS but from command line

I have recently started to work with grails. I was able to create applications and generate stuff. Yesterday I wanted to resume my work, after a little break and ran into the following error, when trying to create a new project:
Command terminated with an exception:
org.grails.ide.eclipse.longrunning.client.GrailsProcessDiedException: Grails process died
(see details for partial output)
Grails process died
------System.out:-----------
------System.err:-----------
This error only occurs when I use the SpringSourceTool, if I try using the command line it works fine. My first reaction was to change the java version from 1.8 to 1.7, but that didn't help. My environment variables look like this (I am running Fedora Linux 19)
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.0.x86_64
GRAILS_HOME=/home/peer/grails/grails-2.3.0
They are also included in the PATH variable.
Can anybody help? Thanks, Peer
This is a known issue in STS:
https://issuetracker.springsource.com/browse/STS-3277
A work-around is provided in the link.
For anyone pulling their hair out trying to create a grails project using the STS extension for Grails, here is my setup and following is what I did to get it working:
-- OSX 10.8.4 Build 12E3067 --
-- STS Version 3.4.0 --
-- Grails 2.3.3 (installed separately to STS) --
Fresh installed STS 3.4.0
I *de*selected the Preferences/Groovy/Compiler/Enable checking for mismatches between
project and workspace Groovy compiler levels
I ONLY selected the Grails Support option when installing the extensions (nothing else)
Restart STS 3.4.0 (i.e. restart eclipse)
I then pointed my Grails project to my existing Grails 2.3.3 installation
Make sure that the environment variable GRAILS_HOME is set and exported in the same
shell from which you invoke STS otherwise you will get a process termination error in
Eclipse (STS)
This worked.

Resources