1

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

Rinu
  • 11
  • 4
  • 1
    Really tough with those links to images of what you've done. Try explaining with an [edit to the question](https://stackoverflow.com/posts/63018710/edit) what have you achieved and what errors have you faced then. – Naman Jul 21 '20 at 17:42
  • Have you tried out a fresh and simple spring boot application as shown in https://spring.io/quickstart with your Java 11 + Eclipse setup? So you could easily check if your origin project settings/code or your setup makes problems. – de-jcup Jul 21 '20 at 17:50
  • @de-jcup : Yeah , i have tried and working fine. when i try to migrate existing java 8 project to java 11 i have got the issue. it says that ** package javax.xml.parsers is accessible from more than one module ** – Rinu Jul 22 '20 at 13:41
  • @Naman: I have tried to upgrade existing full functional Spring Boot application to Java 11 From java 8.While upgrading met with some issues. 1. The package javax.xml.parsers is accessible from more than one module: , java.xml 2.The package org.w3c.dom is accessible from more than one module: , java.xml Followed above 2 link to resolve the issue . which is controlling dependency with modularity but failed.images above is specified to show how i setup JREJAVA VERSION,and POM FILE. and what was the error is specified in **Error With Upgrading to java 11** – Rinu Jul 22 '20 at 13:56

1 Answers1

0

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

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

Rinu
  • 11
  • 4