Error running Starter - Project Base

Hi, after downloading , importing the zip in my eclipse
running maven:install and deploying the project to my server (widlfly 14)

If got the following error :
java.lang.IllegalAccessError: tried to access method org.jsoup.nodes.Node.(Ljava/lang/String;)V from class com.vaadin.flow.server.PwaIcon
at com.vaadin.flow.server.PwaIcon.asElement(PwaIcon.java:101)
at com.vaadin.flow.server.PwaRegistry.lambda$initializeOfflinePage$0(PwaRegistry.java:301)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.vaadin.flow.server.PwaRegistry.initializeOfflinePage(PwaRegistry.java:302)
at com.vaadin.flow.server.PwaRegistry.(PwaRegistry.java:102)
at com.vaadin.flow.server.PwaRegistry.getInstance(PwaRegistry.java:275)
at java.util.Optional.map(Optional.java:215)…

So I add to remove the @PWA annotation in the MainView class to get it work…

Is there any dependency missing to make it work with PWA annotation (I got the same problem with starter Simple App) ?
Or maybe a JRE to define, actually I’m using java 8…

Hi Francois. It sounds like for some reason there is an incompatible version of JSoup run. The version should be 1.11.2.

Yes, as you can see in the poicture attached
the jsoup version used is 1.10.3

How to solve this, should I modify the POM.xml (sorry but I’m not a maven expert…)
17543038.png

Right, 1.10.3 is the right JSoup version for 12, my bad.

The Element(String tag) method is available in that version too, so I wonder if there is something in WildFly that brings in another version ? Or what if you run mvn dependency:tree in your project, which version do you get then ?

I get this :
[INFO]
± com.vaadin:vaadin-core:jar:12.0.7:compile
[INFO]
| ± com.vaadin:flow-server:jar:1.2.5:compile
[INFO]
| | ± com.vaadin.external.gwt:gwt-elemental:jar:2.8.2.vaadin2:compile
[INFO]
| | ± commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO]
| | ± commons-io:commons-io:jar:2.5:compile
[INFO]
| | ± org.jsoup:jsoup:jar:1.10.3:compile
[INFO]
| | ± com.helger:ph-css:jar:6.1.1:compile
[INFO]
| | ± com.helger:ph-commons:jar:9.1.2:compile
[INFO]
| | | - com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO]
| | ± net.bytebuddy:byte-buddy:jar:1.9.3:compile
[INFO]
| | - com.vaadin.external:gentyref:jar:1.2.0.vaadin1:compile
[INFO]
| ± com.vaadin:flow-push:jar:1.2.5:compile
[INFO]
| | - com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.4.30.vaadin1:compile
[INFO]
| | - com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile
[INFO]
| ± com.vaadin:flow-client:jar:1.2.5:compile
[INFO]
| ± com.vaadin:flow-html-components:jar:1.2.5:compile
[INFO]
| ± com.vaadin:flow-data:jar:1.2.5:compile
[INFO]
| | - javax.validation:validation-api:jar:2.0.0.Final:compile
[INFO]
| ± com.vaadin:vaadin-lumo-theme:jar:1.2.5:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-lumo-styles:jar:1.3.3:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-icon:jar:2.1.0:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-meta:jar:2.1.1:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-iconset-svg:jar:2.2.1:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-flex-layout:jar:2.0.3:compile
[INFO]
| | ± org.webjars.bowergithub.polymer:polymer:jar:2.6.1:compile
[INFO]
| | ± org.webjars.bowergithub.webcomponents:webcomponentsjs:jar:1.2.6:compile
[INFO]
| | - org.webjars.bowergithub.webcomponents:shadycss:jar:1.8.0:compile
[INFO]
| ± com.vaadin:vaadin-material-theme:jar:1.2.5:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-material-styles:jar:1.2.0:compile
[INFO]
| ± com.vaadin:vaadin-button-flow:jar:1.2.1:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-button:jar:2.1.2:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-element-mixin:jar:2.1.3:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-usage-statistics:jar:2.0.2:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-development-mode-detector:jar:2.0.0:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-control-state-mixin:jar:2.1.2:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-themable-mixin:jar:1.3.3:compile
[INFO]
| ± com.vaadin:vaadin-checkbox-flow:jar:1.2.1:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-checkbox:jar:2.2.6:compile
[INFO]
| ± com.vaadin:vaadin-combo-box-flow:jar:2.0.3:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-combo-box:jar:4.2.3:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-text-field:jar:2.1.7:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-resizable-behavior:jar:2.1.1:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-a11y-announcer:jar:2.1.0:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-list:jar:2.0.19:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-scroll-target-behavior:jar:2.1.1:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-a11y-keys-behavior:jar:2.1.1:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-item:jar:2.1.0:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-overlay:jar:3.2.7:compile
[INFO]
| | ± org.webjars.bowergithub.polymerelements:iron-overlay-behavior:jar:2.3.4:compile
[INFO]
| | - org.webjars.bowergithub.polymerelements:iron-fit-behavior:jar:2.2.1:compile
[INFO]
| ± com.vaadin:vaadin-date-picker-flow:jar:1.2.3:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-date-picker:jar:3.3.2:compile
[INFO]
| | - org.webjars.bowergithub.polymerelements:iron-media-query:jar:2.1.0:compile
[INFO]
| ± com.vaadin:vaadin-dialog-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-dialog:jar:2.2.1:compile
[INFO]
| ± com.vaadin:vaadin-form-layout-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-form-layout:jar:2.1.1:compile
[INFO]
| ± com.vaadin:vaadin-grid-flow:jar:2.1.5:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-grid:jar:5.2.8:compile
[INFO]
| | - org.apache.commons:commons-lang3:jar:3.0:compile
[INFO]
| ± com.vaadin:vaadin-icons-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-icons:jar:4.2.1:compile
[INFO]
| ± com.vaadin:vaadin-iron-list-flow:jar:1.2.2:compile
[INFO]
| ± com.vaadin:vaadin-list-box-flow:jar:1.2.0:compile
[INFO]
| | ± org.webjars.bowergithub.vaadin:vaadin-list-box:jar:1.1.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-list-mixin:jar:2.1.2:compile
[INFO]
| ± com.vaadin:vaadin-ordered-layout-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-ordered-layout:jar:1.1.0:compile
[INFO]
| ± com.vaadin:vaadin-progress-bar-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-progress-bar:jar:1.1.0:compile
[INFO]
| ± com.vaadin:vaadin-radio-button-flow:jar:1.2.1:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-radio-button:jar:1.1.5:compile
[INFO]
| ± com.vaadin:vaadin-split-layout-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-split-layout:jar:4.1.0:compile
[INFO]
| ± com.vaadin:vaadin-tabs-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-tabs:jar:2.1.1:compile
[INFO]
| ± com.vaadin:vaadin-text-field-flow:jar:1.2.1:compile
[INFO]
| ± com.vaadin:vaadin-upload-flow:jar:1.2.1:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-upload:jar:4.2.1:compile
[INFO]
| ± com.vaadin:vaadin-notification-flow:jar:1.2.0:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-notification:jar:1.2.1:compile
[INFO]
| ± com.vaadin:vaadin-app-layout-flow:jar:1.0.3:compile
[INFO]
| | - org.webjars.bowergithub.vaadin:vaadin-app-layout:jar:1.0.2:compile
[INFO]
| - com.vaadin:vaadin-context-menu-flow:jar:1.2.3:compile
[INFO]
| - org.webjars.bowergithub.vaadin:vaadin-context-menu:jar:4.2.1:compile
[INFO]
± org.slf4j:slf4j-simple:jar:1.7.25:compile
[INFO]
| - org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO]
- javax.servlet:javax.servlet-api:jar:3.1.0:provided

But in fact when I run the app using mvn jetty:run, it’s ok.

So i suppose you’re right there must be a jsoup version that comes with wildfly which causes the problem

Just in Case someone gets the same problem. The solution was to put a jboss-deployment-structure.xml file in the .war file
Like this :

<?xml version="1.0" encoding="UTF-8"?>

module.to.exclude was a user defined module, but it could have been ‘org.jsoup’ because wildfly may have some implicit classloading dependencies…

I am using straight tomcat/SpringBoot/Vaadin14 - have hit same problem