question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm build: bower resources requested from npm project in Eclipse with Wildfly (using JBoss Tools)

See original GitHub issue

Under the circumstances described below Vaadin goes into compatibility mode (bower) despite the lack of bower resources described in the pom.xml. This is not a general problem with Wildfly as deploying a non exploded war (the result of mvn package) works perfectly fine.

To me this bug is dealbreaker for Vaadin 14 and npm as this setup provided me with hot code and resource replacement.

  • Minimal reproducible example:
    1. Download the V14 Vaadin starter project: image
    2. Import as Maven project in Eclipse
    3. Install Wildfly 16 and configure it with Eclipse (JBoss Tools)
    4. $ mvn clean package on the project
    5. Add add the project to your Wildfly
    • Go to the ‘Server’ view
    • Right click your Wildfly server
    • Select ‘Add and Remove…’
    • image
    1. Start your Wildfly from within the IDE
  • Expected behavior: Vaadin should request resources created during the npm-based build
  • Actual behavior: Vaadin for some reason goes into compatibilty mode and requests bower resources (see: image at the bottom)
  • Eclipse version: 2019-06 (4.12.0) Build id: 20190614-1200
    • Vaadin Plugin for Eclipse 4.0.2
    • JBoss Tools 4.12.0.Final
  • Vaadin / Flow version: 14.0.0.rc6
  • Java version:
    1. Java 11 Adopt JDK
    2. Java 11 DCEVM

1 Adopt version:

openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)

2 DCEVM version:

HOTSWAP AGENT: 14:32:37.612 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.1-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 14:32:37.857 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, JdkPlugin, WatchResources, ClassInitPlugin, AnonymousClassPatch, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow]
Starting HotswapAgent 'C:\SDK\Java\dcevm\dcevm-11.0.1+8\lib\hotswap\hotswap-agent.jar'
openjdk version "11.0.1.6" 2018-12-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.1.6+8-201904021629)
Dynamic Code Evolution 64-Bit Server VM AdoptOpenJDK (build 11.0.1.6+8-201904021629, mixed mode)
  • OS version: Windows 10 (1903 - 18362.239)
  • Browser version:
    1. Chorme (75.0.3770.142)
    2. Firefox (68.0.1)

image

This is basically a simplified version of this ticket (#6073) as I initially thought the problem was caused by some more special circumstances.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
joherikscommented, Aug 4, 2019

From Flow 2.0.6 (platform 14.0.0.rc8 once released), the Vaadin Maven plugin automatically runs prepare-frontend goal (which in turn copies flow-build-info.json to the deployment classpath) when the project is updated in Eclipse.

1reaction
joherikscommented, Jul 22, 2019

Does the problem get solved if you ask Eclipse to refresh the project files (F5) after mvn package and before adding the module exploded to Wildfly? The problem seems to be that flow-build-info.json (which configures npm mode by setting vaadin.compatibilityMode to false), is not present in $WILDFLY_HOME/standalone/deployments/my-starter-project-2.0-SNAPSHOT.war/WEB-INF/classes/META-INF/VAADIN/config/.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.3.0.Final - JBoss Tools
This alternative mechanism scans a given folder of the filesystem to detect different kinds of existing projects (Eclipse projects, Maven projects, Cordova ...
Read more >
Posts tagged with 'eclipse' - JBoss Tools
We wrote an article on how to create your first Quarkus project in an ... All npm scripts defined in the package.json can...
Read more >
JBoss Tools - Blog
We are now using Eclipse Marketplace feature of having just one market place entry ... Once your project has a bower.json file you...
Read more >
Create and Import Node.js Applications - JBoss Tools
Creating a new JavaScript Application · Click File ▸ New ▸ Other and then type npm in the search box. · From the...
Read more >
Posts tagged with 'jbosstools' - JBoss.org
Remember that since JBoss Tools 4.3.0 we require Java 8 for installing and using of JBoss Tools. We still support developing and running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found