简体   繁体   English

符号在模块“java.xml”中声明,它不导出 package“com.sun.org.apache.xpath.internal.operations”

[英]Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xpath.internal.operations'

On running a mvn clean install -e -X for a cloned repository I am getting the following compilation failure在为克隆的存储库运行mvn clean install -e -X时,出现以下编译失败

[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.21:compile (compile) on project search-service: Compilation failure [错误] 无法执行目标 org.jetbrains.kotlin:kotlin-maven-plugin:1.3.21:compile (compile) on project search-service: 编译失败

[ERROR] ~/src/main/kotlin/com/search/service/resources/Search.kt:[9,53] Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xpath.internal.operations' [错误] ~/src/main/kotlin/com/search/service/resources/Search.kt:[9,53] 符号在模块 'java.xml' 中声明,它不导出 package 'com.sun.org。 apache.xpath.internal.operations'

[ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.21:compile (compile) on project search-service: Compilation failure ~/src/main/kotlin/com/udaan/search/service/resources/Search.kt:[9,53] Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xpath.internal.operations' [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.21:compile (compile) on project search-service: Compilation失败 ~/src/main/kotlin/com/udaan/search/service/resources/Search.kt:[9,53] 符号在模块 'java.xml' 中声明,它不导出 package 'com.sun.org。 apache.xpath.internal.operations'

I am the only person facing this issue, for the other people the build is successful.我是唯一面临这个问题的人,对于其他人来说,构建是成功的。

mvn -v
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 15.0.1, vendor: N/A, runtime: /usr/local/Cellar/openjdk/15.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_IN, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.4", arch: "x86_64", family: "mac"

I have no experience with Kotlin, but I found your question while searching for an answer for my problem in a Java application.我没有使用 Kotlin 的经验,但我在 Java 应用程序中寻找我的问题的答案时发现了您的问题。

I experienced this error我遇到了这个错误

Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xpath.internal.operations'符号在模块“java.xml”中声明,它不导出 package“com.sun.org.apache.xpath.internal.operations”

with XpathFactory within the same module after upgrading Java from version 11 to 17. I solved it by importing the xalan library using Maven:将 Java 从版本 11 升级到 17 后,在同一模块中使用 XpathFactory。我通过使用 Maven 导入 xalan 库解决了这个问题:

<dependency>
    <groupId>xalan</groupId>
    <artifactId>xalan</artifactId>
    <version>2.7.2</version>
</dependency>

See also section Java EE here: https://blogs.oracle.com/javamagazine/post/its-time-to-move-your-applications-to-java-17-heres-why-and-heres-how See also section Java EE here: https://blogs.oracle.com/javamagazine/post/its-time-to-move-your-applications-to-java-17-heres-why-and-heres-how

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 导入com.sun.org.apache.xpath.internal.operations的问题 - Problems with importing com.sun.org.apache.xpath.internal.operations JAVA和XML:com.sun.org.apache.xpath.internal.XPathException:无法将#STRING转换为NodeList - JAVA & XML : com.sun.org.apache.xpath.internal.XPathException: Can not convert #STRING to a NodeList 包 &#39;com.sun.webkit.dom&#39; 在模块 &#39;javafx.web&#39; 中声明,该模块不会将其导出到模块 - Package 'com.sun.webkit.dom' is declared in module 'javafx.web', which does not export it to module JAVA 错误:包 com.sun.rowset 不可见:com.sun.rowset 在模块 java.sql.rowset 中声明,但不导出它 - JAVA ERROR : package com.sun.rowset is not visible : com.sun.rowset is declared in module java.sql.rowset, which does not export it 包com.sun.org.apache.xml.internal.security.utils.Base64不存在 - Package com.sun.org.apache.xml.internal.security.utils.Base64 does not exist 不兼容的类型。 找到:'java.lang.String',必需:'com.sun.org.apache.xpath.internal.operations.String' - Incompatible types. Found: 'java.lang.String', required: 'com.sun.org.apache.xpath.internal.operations.String' 如何解决netbean javafx应用程序中不存在com.sun.org.apache.xml.internal.security包 - How to solve com.sun.org.apache.xml.internal.security package does not exist in netbean javafx application com.sun.org.apache.xpath.internal.operations.String的目的是什么? - What is the purpose of com.sun.org.apache.xpath.internal.operations.String? package sun.net.www.protocol.https 在模块 java.base 中声明,不导出它 - package sun.net.www.protocol.https is declared in module java.base, which does not export it Intellij 2016.3.2不断将字符串导入更改为com.sun.org.apache.xpath.internal.operations.String - Intellij 2016.3.2 keeps changing String import to com.sun.org.apache.xpath.internal.operations.String
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM