You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "morristai (via GitHub)" <gi...@apache.org> on 2024/11/06 19:07:57 UTC

[I] bug: compile error when using JDK 23 [opendal]

morristai opened a new issue, #5292:
URL: https://github.com/apache/opendal/issues/5292

   ### Describe the bug
   
   It works when using JDK 21, 17, 11. But failed with JDK 23. Although OpenDAL's Java Binding is tested against Java 8.
   
   ```shell
   opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java on  main [$?] is 📦 opendal-java@0.47.5 via 🦀 1.82.0 via ☕ v23.0.1
   → ./mvnw clean install -DskipTests=true -Dcargo-build.profile=release
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] ------------------------------------------------------------------------
   [INFO] os.detected.name: osx
   [INFO] os.detected.arch: aarch_64
   [INFO] os.detected.bitness: 64
   [INFO] os.detected.version: 14.7
   [INFO] os.detected.version.major: 14
   [INFO] os.detected.version.minor: 7
   [INFO] os.detected.classifier: osx-aarch_64
   [INFO]
   [INFO] ---------------------< org.apache.opendal:opendal >---------------------
   [INFO] Building Apache OpenDAL™ 0.47.4
   [INFO]   from pom.xml
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO]
   [INFO] --- clean:3.2.0:clean (default-clean) @ opendal ---
   [INFO] Deleting /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/target
   [INFO]
   [INFO] --- enforcer:3.1.0:enforce (enforce-maven-version) @ opendal ---
   [INFO]
   [INFO] --- enforcer:3.1.0:enforce (enforce-java-version) @ opendal ---
   [INFO]
   [INFO] --- remote-resources:1.7.0:process (process-resource-bundles) @ opendal ---
   [INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4
   [INFO] Copying 3 resources from 1 bundle.
   [INFO]
   [INFO] --- resources:3.3.0:resources (default-resources) @ opendal ---
   [INFO] Copying 1 resource
   [INFO] Copying 3 resources
   [INFO] The encoding used to copy filtered properties files have not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html
   [INFO]
   [INFO] --- compiler:3.10.1:compile (default-compile) @ opendal ---
   [INFO] Changes detected - recompiling the module!
   [INFO] Compiling 20 source files to /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/target/classes
   [INFO] -------------------------------------------------------------
   [ERROR] COMPILATION ERROR :
   [INFO] -------------------------------------------------------------
   [ERROR] /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/src/main/java/org/apache/opendal/PresignedRequest.java:[30,26] variable method not initialized in the default constructor
   [ERROR] /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/src/main/java/org/apache/opendal/PresignedRequest.java:[35,26] variable uri not initialized in the default constructor
   [ERROR] /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/src/main/java/org/apache/opendal/PresignedRequest.java:[40,39] variable headers not initialized in the default constructor
   [INFO] 3 errors
   [INFO] -------------------------------------------------------------
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  1.202 s
   [INFO] Finished at: 2024-11-06T11:39:15-05:00
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project opendal: Compilation failure: Compilation failure:
   [ERROR] /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/src/main/java/org/apache/opendal/PresignedRequest.java:[30,26] variable method not initialized in the default constructor
   [ERROR] /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/src/main/java/org/apache/opendal/PresignedRequest.java:[35,26] variable uri not initialized in the default constructor
   [ERROR] /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java/src/main/java/org/apache/opendal/PresignedRequest.java:[40,39] variable headers not initialized in the default constructor
   [ERROR] -> [Help 1]
   [ERROR]
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR]
   ```
   
   ### Steps to Reproduce
   
   ```bash
   svn co https://dist.apache.org/repos/dist/dev/opendal/0.50.2-rc.1/ opendal-dev
   cd opendal-dev/apache-opendal-bindings-java-0.47.5-src/bindings/java
   
   ./mvnw clean install -DskipTests=true -Dcargo-build.profile=release
   ```
   
   ### Expected Behavior
   
   ```shell
   > LICENSE file exists in /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src
   > Start checking NOTICE file in /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src
   > NOTICE file exists in /Users/morristai/Documents/Whynot/opendal/opendal-dev/apache-opendal-bindings-java-0.47.5-src
   openjdk version "21.0.1" 2023-10-17 LTS
   OpenJDK Runtime Environment Zulu21.30+15-CA (build 21.0.1+12-LTS)
   OpenJDK 64-Bit Server VM Zulu21.30+15-CA (build 21.0.1+12-LTS, mixed mode, sharing)
   Start building opendal java binding
   > Success to build opendal java binding
   ```
   
   ### Additional Context
   
   cc @tisonkun https://github.com/apache/opendal/discussions/5281#discussioncomment-11159076
   
   ### Are you willing to submit a PR to fix this bug?
   
   - [ ] Yes, I would like to submit a PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] bug: Java binding compile error when using JDK 23 [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #5292: bug: Java binding compile error when using JDK 23
URL: https://github.com/apache/opendal/issues/5292


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] bug: Java binding compile error when using JDK 23 [opendal]

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #5292:
URL: https://github.com/apache/opendal/issues/5292#issuecomment-2461273416

   Seems a lombok bug. We can anyway manually define the method.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] bug: Java binding compile error when using JDK 23 [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5292:
URL: https://github.com/apache/opendal/issues/5292#issuecomment-2461264710

   > opendal/PresignedRequest.java:[30,26] variable method not initialized in the default constructor
   
   This seems like a good first issue from my perspective. Perhaps we can find a way to make it work in both Java 8 and Java 23?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org