2

I am currently trying to migrate a Vaadin 8 gradle project to Vaadin 14. When I package the project for production, it works fine, and the Vaadin app runs. When I attempt to run the project in eclipse, I get the following error:

Loading failed for the <script> with source “http://localhost:31415/VAADIN/static/client/client-4C23589935A74206212F474A719FC41C.cache.js”.

I saw a lot of other posts with similar questions, but none had a sufficient resolution. Nothing I have tried so far from Vaadin forums or github has worked.

Edit: I think I figured out part of the problem. For some reason, jetty is looking for the VAADIN folder in the bin directory within my eclipse project. It should first be looking in the classpath. This works in the compiled production version, but not in the development version of my project

rudiejd
  • 392
  • 2
  • 13
  • I don't think you should have a `VAADIN` folder at all in a Vaadin 14 project, `frontend` is where the static resources are located these days. – Anna Koskinen Jun 22 '21 at 15:49
  • 1
    Are you running the project with maven in eclipse or using a plugin? The `VAADIN/static/client/` client js is packaged into flow-client.jar and should be available through the servlet as it is packaged to `META-INF/resources/` so perhaps the client jar is not on the jetty classpath for some reason. – Mikael Grankvist Jun 23 '21 at 04:20
  • @MikaelGrankvist running through eclipse, and yeah that seems to be the case. however, it only seems to have a problem with the flow-client jar. if i manually move that cache.js file over, it works fine – rudiejd Jun 23 '21 at 15:00
  • @AnnaKoskinen it uses that "VAADIN" path thing for looking for stuff on the classpath – rudiejd Jun 23 '21 at 15:06
  • If you open your pom.xml in Eclipse and check the Dependency Hierarchy tab, and filter by `flow-client`, is it present, and does it have the default scope `compile`? – Anna Koskinen Jun 23 '21 at 15:25
  • @AnnaKoskinen this is gradle i don't have a pom.xml – rudiejd Jun 23 '21 at 15:39
  • I've never used gradle, but hopefully these instructions are still valid for how to do the same check for that: https://stackoverflow.com/questions/32854259/view-gradle-dependency-tree-in-eclipse/41638641 – Anna Koskinen Jun 24 '21 at 08:39
  • @AnnaKoskinen I know the dependencies are correct, and the flow-client jar shows up in the eclipse classpath, but the problem is that it can't find this one javascript file. – rudiejd Jun 24 '21 at 18:21
  • My point was to ensure that the dependency `scope` is correct, so that it's definitely available at runtime too. You could also check the jar in your local Maven repository and e.g. rename it (so that it's still available for comparison afterwards), forcing Maven to fetch it again, in case something went wonky on the initial fetch. – Anna Koskinen Jun 28 '21 at 07:45

0 Answers0