简体   繁体   中英

Update existing Spring Boot project from java 1.8 to java 11

Materialised fully functional Spring Boot application code from repository and working fine with java 1.8. While upgrading to Java 11 got errors like some packages is accessible from more than one module

1. The package javax.xml.parsers is accessible from more than one module: <unnamed>, java.xml

2. The package org.xml.sax is accessible from more than one module: <unnamed>, java.xml

Tried to resolve the issue by restrict dependency using methods provided in the below links but not helped.

  1. Eclipse can't find XML related classes after switching build path to JDK 10

  2. https://www.eclipse.org/eclipse/news/4.8/jdt.php#Java9

Setting Eclipse JRE

Setting Java Version in POM

Setting Sping Version

Archiva dependency integrated to Spring Boot as rootParent

Error While upgrading to java 11

Build path of migrated project

Reason: Conflict between xml.apis and java.xml .due to the modularity concept in java

Solution: Excluded xml.apis dependency in maven pom file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM