[ 
https://issues.apache.org/jira/browse/HDDS-13342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986839#comment-17986839
 ] 

Attila Doroszlai commented on HDDS-13342:
-----------------------------------------

[~ivanandika], {{jakarta.xml.bind-api}} needs to be promoted to compile scope:

{code}
diff --git hadoop-ozone/ozone-manager/pom.xml hadoop-ozone/ozone-manager/pom.xml
index ba32592990..137a1027fb 100644
--- hadoop-ozone/ozone-manager/pom.xml
+++ hadoop-ozone/ozone-manager/pom.xml
@@ -96,6 +96,10 @@
       <groupId>jakarta.annotation</groupId>
       <artifactId>jakarta.annotation-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>jakarta.xml.bind</groupId>
+      <artifactId>jakarta.xml.bind-api</artifactId>
+    </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>javax.servlet-api</artifactId>
@@ -315,11 +319,6 @@
       <artifactId>compile-testing</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>jakarta.xml.bind</groupId>
-      <artifactId>jakarta.xml.bind-api</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-common</artifactId>
{code}

> Replace DatatypeConverter.printHexBinary with Hex.encodeHexString
> -----------------------------------------------------------------
>
>                 Key: HDDS-13342
>                 URL: https://issues.apache.org/jira/browse/HDDS-13342
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Ivan Andika
>            Assignee: Chia-Chuan Ho
>            Priority: Minor
>
> When trying to use DatatypeConverter.printHexBinary and build it on JDK21 
> environment on the ozone-manager module, I encountered the following exception
> {code:java}
> [ERROR] Failed to execute goal 
> dev.aspectj:aspectj-maven-plugin:1.14.1:compile (default) on project 
> ozone-manager: AJC compiler errors: 3369
> [ERROR] error at import javax.xml.bind.DatatypeConverter;
> The import javax.xml.bind.DatatypeConverter cannot be resolved{code}
> This seems to be related javax.xml.bind removal in the newer JDK and 
> aspectj-maven-plugin compiler being more strict than the normal javac 
> compiler.
> To prevent this issue we can replace DatatypeConverter.printHexBinary with 
> the Hex.encodeHexString instead. We need to ensure that the behavior remains 
> unchanged, especially need to check the lowercase handling (e.g. 
> Hex.encodeHexString by default will automatically return the result in 
> lowercase). Afterwards, we can ban javax.xml.bind.DatatypeConverter in 
> pom.xml.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to