Java with Maven Failing after RHEL 8.8 to Rocky 8.8 Migration

We had RHEL 8.8 and migrated to Rocky 8.8 via git script

https://docs.rockylinux.org/guides/migrate2rocky/

One of the systems worked with no errors while the 2nd system gave us the below error in the migration log.

Downgrading : sisu-inject-1:0.3.3-6.module+el8.6.0+843+5a13d 918/2046

Downgrading : sisu-plexus-1:0.3.3-6.module+el8.6.0+843+5a13d 919/2046

Downgrading : maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db 920/2046Error unpacking rpm package maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.noarch

Downgrading : maven-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.no 921/2046

error: unpacking of archive failed on file /usr/share/maven/conf/logging: cpio: File from package already exists as a directory in system

error: maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.noarch: install failed

Running scriptlet: maven-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.no 921/2046

Reinstalling : gtk3-3.22.30-11.el8.x86_64 922/2046

Reinstalling : python3-rpmfluff-0.5.7.1-2.el8.noarch 923/2046

Downgrading : sisu-inject-1:0.3.3-6.module+el8.6.0+843+5a13d 918/2046

Downgrading : sisu-plexus-1:0.3.3-6.module+el8.6.0+843+5a13d 919/2046

Downgrading : maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db 920/2046Error unpacking rpm package maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.noarch

Downgrading : maven-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.no 921/2046

error: unpacking of archive failed on file /usr/share/maven/conf/logging: cpio: File from package already exists as a directory in system

error: maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.noarch: install failed

Running scriptlet: maven-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.no 921/2046

Reinstalling : gtk3-3.22.30-11.el8.x86_64 922/2046

Reinstalling : python3-rpmfluff-0.5.7.1-2.el8.noarch 923/2046
Failed:
maven-lib-1:3.5.4-5.module+el8.6.0+975+c0ed2db8.noarch
maven-lib-1:3.5.4-5.module+el8+2452+b359bfcd.noarch Error: Transaction failed

Error during distro-sync.

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.

When we tried to run maven 3.8.3 with java 11 we received the below errors running our compiling command as below (mvn clean install). Please see mvn -v (maven version)

mvn -v
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /usr/share/maven
Java version: 11.0.19, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.19.0.7-4.el8.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: “linux”, version: “4.18.0-477.15.1.el8_8.x86_64”, arch: “amd64”, family: “unix”

java -version
openjdk version “11.0.19” 2023-04-18 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-2) (build 11.0.19+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-2) (build 11.0.19+7-LTS, mixed mode, sharing)
[user@servername pr_tmp]$

echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-11.0.19.0.7-4.el8.x86_64/

mvn clean install

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project SimpleConsoleClient: Compilation failure
[ERROR] /home/user/pr_tmp/src/main/java/Client/ServiceName.java:[23,30] cannot find symbol
[ERROR] symbol: class Logger
[ERROR] location: class Client.ServiceName
[ERROR]
[ERROR] → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project SimpleConsoleClient: Compilation failure
/home/user/pr_tmp/src/main/java/Client/ServiceName.java:[23,30] cannot find symbol
symbol: class Logger
location: class Client.ServiceName

at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:199)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/home/user/pr_tmp/src/main/java/Client/ServiceName.java:[23,30] cannot find symbol
symbol: class Logger
location: class Client.ServiceName

at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1212)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:199)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] MojoFailureException - Apache Maven - Apache Software Foundation

has context menu
Compose

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.