Closed darmro closed 3 years ago
Hi @darmro, Sorry to hear you are having trouble upgrading to Vaadin 20. I guess you already had a look at #51.
This bug always occurs if this file is not found in your application context. In most cases it is simply a build issue (no mvn clean install
was run etc.). But since you already had a working build, I guess there is another reason to this. Try upgrading to the newest Vaadin 20 version, and check if the issue still occurs.
So it could be something with paths inside apex addon (paths used in @JsModule)
I disagree on this point, if it works in Vaadin 14-19, but doesn't work in Vaadin 20, a path issue is very unlikely, more likely would be a bug in Vaadin 20.
But let's not stop here, show me what your build process looks like. If you could provide a small project to help me to reproduce the issue, that would really help.
Hi Johannes,
Before I've created this issue I turned for help to Vaadin support (I have prime subscr.). Vaadin support has tried to solve the problem, but finally after few days and checking internally with flow team they said "It seems to be an issue with the addon" and ask me to create the issue here.
I've attached my-app.zip
in the issue :) This simple project is taken from Vaadin start page and uses the newest Vaadin 20.0.3
.
I've just generate war file running mvn clean package -Pproduction
. I've even delete node_modules and target folder by myself before generating war file. Nothing changed.
The problem appears only in the Windows environment, which is really strange. The same war deployed on the same tomcat version but in tye *UX works well. But on 3 different windows servers does not.
Vaadin support have just asked me to create an issue for flow, so I did it ;) https://github.com/vaadin/flow/issues/11306 Byt at the moment no one knows if this is a mistake and if so, if it is in Flow or in addon.
It turned out that it's a flow problem (most likely) https://github.com/vaadin/flow/issues/11220
Haven't tested it myself, but this comment looks like a workaround https://github.com/vaadin/flow/issues/11220#issuecomment-861617354
Hello I love this library but I also have the same problem. In development it works for me but when I pass it to production it doesn't work and it throws me the same error. I tried all the possible solutions they posted but I can't get it to work. Could someone fix it?
@LChris94 Checkout this workaround https://github.com/vaadin/flow/issues/11220#issuecomment-861617354. Otherwise, simply wait for another Vaadin 20 release.
Describe the bug The bug appears for the new Vaadin 20 and app deployed on Windows for vaadin + spring app. I generate and deploy the war app and deploy it on Win10 on Tomcat 9. The bug appears both in debug and production mode.
@JsModule
)After successful deployment going to the View with Apex Chart addon component ends with:
There was an exception while trying to navigate to '' with the exception message 'Error creating bean with name 'com.example.application.views.helloworld.HelloWorldView': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.example.application.views.helloworld.HelloWorldView]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Couldn't find the definition of the element with tag 'apex-charts-wrapper' in any template file declared using '@JsModule' annotations. Check the availability of the template files in your WAR file or provide alternative implementation of the method getTemplateContent() which should return an element representing the content of the template file'
Vaadin support diagnosed that the problem lies inside the addon.
My simple test app: my-app.zip Just generate war and deploy it on Windows.
Environment:
I must say, that we love this addon and use it on our production vaadin app. Now we are on Vaadin19, but it will be deprecated soon because new Vaadin20 appeared. So we have to move to it very soon :) So any help would be very @appreciated :)))