I try to use your SubWindows and all seems ok during write sources… but when I try to compile the sources the compiler give this error:
flowsubwindow-1.0.3.jar(com/awesomecontrols/subwindow/SubWindowDesktop.class)
class file has wrong version 55.0, should be 52.0.
Attached the all console stack trace. Java version 1.8.0_181
Eclipse ide 2020-03
The jar was compiled with OpenJDK 11 and you are using JDK 8. You can download the sources and build it with jdk 8 or move on OpenJDK 11 that is the las LTS.
Ok. Thanks.
Another problem:
when I try to start my app the bean VenditeAnalisi throw an exception when I try to instantiate new SubWindowDesktop();
Any ideas? Now I work with Java 11 by Oracle. 18233766. (2 KB)
It is failing in the “this(VaadinService…” line in the PolymerTemplate library. Perhasps when it check the compatibility mode?.
I do not use Maven, so I’m not sure if your pom is ok, but i see that you have this dependency:
Thanks Marcelo. I don’t use PolymerTemplate (I don’t know if Springboot by vaadin use it), the vaadin-bom version 15 was commented and npm version is: npm@6.14.4 /usr/local/lib/node_modules/npm. I cannot understand why instantiation of SubwindowDesktop return a NullPointerException: I looked in your source and I see that the constructor is empty.
Yes, the contructor of SubwindowDesktop is empty but is the PolymerTemplate, with is extended from SubwindowDestop what is blowing up.
Is something in the upper commented method what is returned null.
Unfortunately I could not it fail.
I suggest you to clean up the project and build again.
On your advice I found this two rows in stack trace:
Caused by: java.lang.NullPointerException: null
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.(PolymerTemplate.java:103) ~[flow-server-2.1.8.jar:2.1.8]
at com.awesomecontrols.subwindow.SubWindowDesktop.<init>(SubWindowDesktop.java:49) ~[flowsubwindow-1.0.3.jar:1.0.3]
These rows seems tell me that the cause of NullPointerException is not the SubWindoDesktop but the PolimerTemplate of flow-server-2.1.8.jar. Maybe a wrong version?
Hi Marcelo! Thanks for all. I tried to put the contructor of SubWindowDesktop in a method with annotation @PostConstruct thinking that if VaadinService during the phase of construct should be not avaiable. So the NullPointerException disappeared! Now obviously I have another problem: a class extending SubWindow: always the same error on VaadinSeervice. This error it’s difficult to eliminate because is just in time the constructor.
I will try to test it in Spring environment. Since I do not use Spring I don’t know if it something related to it or not.
In a simple Vaadin app it work well.
Nothing to do. Also in a method (configura) with @PostConstruct give the same error:
Caused by: java.lang.NullPointerException: null
at com.vaadin.flow.component.polymertemplate.PolymerTemplate.(PolymerTemplate.java:103) ~[flow-server-2.1.9.jar:2.1.9]
at com.awesomecontrols.subwindow.SubWindowDesktop.<init>(SubWindowDesktop.java:49) ~[flowsubwindow-1.0.3.jar:1.0.3]
at it.prismatdi.ui.views.sintesi.VenditeAnalisi.**configura**(VenditeAnalisi.java:107) ~[classes/:na]
I attach the stack trace and the program.
Thanks Marcelo! 18239893. (40.3 KB)
Hi Vittorio. I have download the started spring app from Vaadin and added the subwindows and it is working. Take a look.
remember to build with:
mvn compile install -Pproduction
There some issue with Vaadin and Payara running in domain1. Vaadin eat all the after a few deploys. If you are using Payara, run it with the production profile, but it need more ram (4gb).
Aparently the issue will be solved in Vaadin 14.2