Skip to content

Conversation

@autumnust
Copy link
Contributor

@autumnust autumnust commented Sep 16, 2021

What changes were proposed in this pull request?

While working on another PR, I found the head of main failed in GA with the failure like below.

Error:  -----------------------------------------------------
Error:  realm =    plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.4.1
Error:  strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Error:  urls[0] = file:/Users/runner/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/1.4.1/maven-enforcer-plugin-1.4.1.jar
...
Error:  Number of foreign imports: 1
Error:  import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
Error:  
Error:  -----------------------------------------------------: begin 0, end 3, length 2
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:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
make[2]: *** [java/shims/orc-shims-1.8.0-SNAPSHOT.jar] Error 1
make[1]: *** [java/CMakeFiles/java_build.dir/all] Error 2
make: *** [all] Error 2
Error: Process completed with exit code 2.

Google a bit and found a similar issue: apache/accumulo-proxy#19
This PR is a draft to see if the same change could work here ( since I don't have specific env like failed CI)

Why are the changes needed?

Recover compile and package without tests.

How was this patch tested?

Manual.

mvn compile
mvn package -DskipTests

@guiyanakuang
Copy link
Member

I think the JDK17 General-Availability Release was released two days ago. Github workflow updated JDK17. Now System.getProperty("java.version") returns "17" which causes a lot of program exceptions.

Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /usr/share/apache-maven-3.8.2
Java version: 17, vendor: Azul Systems, Inc., runtime: /opt/hostedtoolcache/jdk/17.0.0/x64

For example org.apache.hadoop.util.Shell.java

private static boolean IS_JAVA7_OR_ABOVE =
      System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 0;

java.lang.StringIndexOutOfBoundsException: String index out of range: 3

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Sep 16, 2021

Oh, I didn't see your PR and made a PR to upgrade Java 17.

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Sep 16, 2021

Actually, this is very unfortunate situation because we released Apache ORC 1.7.0. :(

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least, I verified that this PR recover compile and package (without tests).
Thank you, @autumnust .

java/pom.xml Outdated
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use 3.0.0.

@dongjoon-hyun dongjoon-hyun changed the title [DRAFT] Attempting to fix the maven enforcer issue in main branch ORC-1001: Bump maven-enforcer-plugin to 3.0.0 Sep 16, 2021
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @autumnust and @guiyanakuang .
We can fix the issue step by step.

@dongjoon-hyun dongjoon-hyun merged commit e8eb8ee into apache:main Sep 16, 2021
@guiyanakuang
Copy link
Member

Actually, this is very unfortunate situation because we released Apache ORC 1.7.0. :(

@dongjoon-hyun, probably JDK official will fix this problem, because there are many programs involved. It should not be necessary for each program to upgrade the Java version judgment. So don't worry about the ORC 1.7.0 compatibility issue.

@dongjoon-hyun
Copy link
Member

BTW, maven-enforcer-plugin issue exists only at main. I landed at main only.

@dongjoon-hyun
Copy link
Member

Do you have any reference for that? Actually, Java community is a little notorious because they don't care about that many programs, @guiyanakuang .

@guiyanakuang
Copy link
Member

@dongjoon-hyun I remember a similar thing happening with JDK 9. I always thought it was the JDK that officially solved the version number problem. I just googled it and I was wrong. : (

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Sep 16, 2021

Oh, I misread the message and deleted my previous comment~ If you received them via the email, please forget about that.

@dongjoon-hyun
Copy link
Member

BTW, this might be only our test framework issue. Let me dig more.

@guiyanakuang
Copy link
Member

Yes, there is no code directly related to java version in ORC, the example I gave is from hadoop 2.2. It has been fixed at https://issues.apache.org/jira/browse/HADOOP-14586. Don't worry too much.

@dongjoon-hyun
Copy link
Member

Ya, that could be one reason to raise the min.hadoop.version.

BTW, for Java 17 testing, I'll add a profile as a separate PR.

@dongjoon-hyun dongjoon-hyun added this to the 1.8.0 milestone Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants