SpringBoot and java.lang.IllegalAccessError: tried to access method org.jso

SpringBoot Vaadin11 application.

I am habing cosntant errors in the log
java.lang.IllegalAccessError: tried to access method org.jsoup.nodes.Node.(Ljava/lang/String;)V from class com.vaadin.flow.router.RouteNotFoundError
Every UI class has
@Route(“r1”) etc defined… why those errors…

I would guess you have a classpath problem. Either you have multiple Vaadin Flow versions on the classpath or you have a too new Jsoup version on the classpath. I think JSoup should be 1.10.3 for Vaadin 11

Artur,
I am only getting classes off the pom…
the pom is below… if you would take a quick look… seems no JSoup anyplace…

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.t</groupId>
	<artifactId>t</artifactId>
	<name>T</name>
	<version>1.0-SNAPSHOT</version>
	<packaging>jar</packaging>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- Dependencies -->
		<vaadin.version>11.0.1</vaadin.version>
		<component.version>1.1.0.beta1</component.version>
		<start-class>com.t.spring.Starter</start-class>
	</properties>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.5.RELEASE</version>
	</parent>

	<pluginRepositories>
		<pluginRepository>
			<id>vaadin-prereleases</id>
			<url>https://maven.vaadin.com/vaadin-prereleases</url>
		</pluginRepository>
	</pluginRepositories>

	<repositories>
		<repository>
			<id>vaadin-prereleases</id>
			<url>https://maven.vaadin.com/vaadin-prereleases</url>
		</repository>
		<repository>
			<id>Vaadin Directory</id>
			<url>http://maven.vaadin.com/vaadin-addons</url>
		</repository>




	</repositories>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-bom</artifactId>
				<version>${vaadin.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
		    <groupId>org.springframework.boot</groupId>
		    <artifactId>spring-boot-starter-tomcat</artifactId>
		    <version>2.0.5.RELEASE</version>
		</dependency>
		<dependency>
   			<groupId>org.vaadin.addon</groupId>
   			<artifactId>v-leaflet</artifactId>
   			<version>2.0.7</version>
		</dependency>
		<dependency>
		    <groupId>com.vaadin</groupId>
		    <artifactId>vaadin-upload-flow</artifactId>
		    <version>${component.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.webjars.bowergithub.polymerelements</groupId>
    		<artifactId>paper-slider</artifactId>
    		<version>2.0.6</version>
		</dependency>

		<dependency>
		   <groupId>org.webjars.bowergithub.googlewebcomponents</groupId>
		   <artifactId>google-map</artifactId>
		   <version>2.0.5</version>
		</dependency>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-spring-boot-starter</artifactId>
			<version>${vaadin.version}</version>
		</dependency>
		<dependency>
   			<groupId>com.vaadin.tapio</groupId>
   			<artifactId>googlemaps</artifactId>
   			<version>2.1.0</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<optional>true</optional>
			<exclusions>
		    	<exclusion>
		      	<groupId>org.springframework.boot</groupId>
		      	<artifactId>spring-boot-starter-logging</artifactId>
		    	</exclusion>
  			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.vaadin.elmot</groupId>
			<artifactId>vaadin-geo-location-flow</artifactId>
			<version>1.0</version>
		</dependency>


		<dependency>
			<groupId>org.vaadin.juho</groupId>
			<artifactId>lib-gwt-imageupload</artifactId>
			<version>0.0.3</version>
		</dependency>
		
		
		<dependency>
   			<groupId>org.vaadin.teemu</groupId>
   			<artifactId>switch</artifactId>
   			<version>3.0.0</version>
		</dependency>
		<dependency>
		    <groupId>org.hsqldb</groupId>
		    <artifactId>hsqldb</artifactId>
		    </dependency>
		<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
              <exclusions>
		    	<exclusion>
		      	<groupId>org.springframework.boot</groupId>
		      	<artifactId>spring-boot-starter-logging</artifactId>
		    	</exclusion>
  			</exclusions>
        </dependency>

	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
					<configuration>
					      <image>my-image:${project.version}</image>
						<executable>true</executable>
					</configuration>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>productionMode</id>
			<activation>
				<property>
					<name>vaadin.productionMode</name>
				</property>
			</activation>

			<dependencies>
				<dependency>
					<groupId>com.vaadin</groupId>
					<artifactId>flow-server-production-mode</artifactId>
				</dependency>
			</dependencies>

			<build>
				<plugins>
					<plugin>
						<groupId>com.vaadin</groupId>
						<artifactId>vaadin-maven-plugin</artifactId>
						<version>${vaadin.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>copy-production-files</goal>
									<goal>package-for-production</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-maven-plugin</artifactId>
						<configuration>
							<jvmArguments>-Dvaadin.productionMode</jvmArguments>
						</configuration>
					</plugin>		
					<plugin>
    					<groupId>org.eclipse.jetty</groupId>
    					<artifactId>jetty-maven-plugin</artifactId>
    					<version>${jetty.version}</version>
					    <configuration>
					        <webAppConfig>
					            <resourceBases>
					                <resourceBase>${transpilation.output}</resourceBase>
					            </resourceBases>
					        </webAppConfig>
					    </configuration>
					</plugin>					
				</plugins>
				
			</build>
		</profile>
	</profiles>
</project>

mvn dependency:tree -Dverbose

Shows that you are e.g. including

+- org.vaadin.teemu:switch:jar:3.0.0:compile
|  \- com.vaadin:vaadin-server:jar:8.0.4:compile
|     +- com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile
|     |  +- org.w3c.css:sac:jar:1.3:compile
|     |  \- com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile
|     +- com.vaadin:vaadin-shared:jar:8.0.4:compile
|     +- org.jsoup:jsoup:jar:1.8.3:compile
|     \- com.googlecode.gentyref:gentyref:jar:1.2.0:compile

which brings in JSoup 1.8.3
That’s a Vaadin 8 add-on

problem solved…much appreciated…

How should I overcome this ‘jsoup’ problem? I am working on vaadin-14+ and I need to use a addon which has Jsoup-1.8.3 version and it is creating problem.
So, How can I overcome the exception created because of jsoup-1.8.3 version ?

Thanks!

Yash Shah:
How should I overcome this ‘jsoup’ problem? I am working on vaadin-14+ and I need to use a addon which has Jsoup-1.8.3 version and it is creating problem.
So, How can I overcome the exception created because of jsoup-1.8.3 version ?

Thanks!

I had the same problem, try to add the JSoup to the pom.xml with different versions. Dont know why vaadin (Grid component in this case) was not able to recognize the latest version of jsoup.