Cannot install Hadoop: InvalidAlgorithmParameter exception - java

I downloaded the latest version of apache hadoop from the github repo and followed the steps here:
http://cleverowl.uk/2015/06/30/compiling-2-7-0-on-64-bit-linux/
I didn't install protobuf and java because I already have them installed on my machine.
When installing with the command:
mvn package -Pdist,native -DskipTests -Dtar
The following error appears:
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/2.5.0/maven-bundle-plugin-2.5.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.5.0 #
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.hadoop:hadoop-main:3.0.2 (/home/andrew/hadoop-rel-release-3.0.2/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.5.0: Could not transfer artifact org.apache.felix:maven-bundle-plugin:pom:2.5.0 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
Any help?

Related

Running MVN INSTALL with OPENCMIS

I´m trying to set up the OpenCMIS InMemory Repository following the instructions from Apache but I keep getting the following error when running the Maven command mvn clean install -Dmaven.test.skip=true.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project chemistry-opencmis-client-bindings: Compilation failure
[ERROR] /home/openkm/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/ClientVersion.java:[29,16] error: cannot find symbol
[ERROR] symbol: method getDefinedPackage(String)
[ERROR] location: class ClassLoader
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :chemistry-opencmis-client-bindings
The OpenCMIS Server Development Guide (2nd Edition) PDF's last technical update is from 2014 and the POM of the sample project contains:
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<target>1.7</target>
<source>1.7</source>
That's utterly outdated and is surely not going to work with more recent JDKs.

I'm getting the error while doing build "Plugin org.codehaus.mojo:exec-maven-plugin:1.5.0 or one of its dependencies could not be resolved"

build 17-Sep-2021 09:34:46 [ERROR] Plugin org.codehaus.mojo:exec-maven-plugin:1.5.0 or one of its dependencies could not be resolved: Could not transfer artifact org.codehaus.mojo:exec-maven-plugin:jar:1.5.0 from/to telstra-repository (https://repo.tools.telstra.com/repository/maven-public): Auth scheme may not be null -> [Help 1]
build 17-Sep-2021 09:34:46 [ERROR]
build 17-Sep-2021 09:34:46 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
build 17-Sep-2021 09:34:46 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
build 17-Sep-2021 09:34:46 [ERROR]
build 17-Sep-2021 09:34:46 [ERROR] For more information about the errors and possible solutions, please read the following articles:
build 17-Sep-2021 09:34:46 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
build 17-Sep-2021 09:34:47 /opt/bamboo_agent/xml-data/build-dir/NA-SVCCPC-JOB1 after install
build 17-Sep-2021 09:34:47 total 84

How to consume Maven Components from Private Gitlab Repositories?

Problem
We are trying to consume a Maven components in a private Maven repository... The dependency right now is not being pulled for some reason... I have declared the dependency in gradle as follows:
dependencies {
implementation group: 'super_.platform.client', name: 'client-feign', version: '1.0.0-SNAPSHOT'
}
repositories {
maven {
url "https://gitlab.com/api/v4/projects/22268428/packages/maven"
}
}
When running gradle eclipse to pull the dependency, the command fails with the following:
[INFO] Resolving super_.platform.client:client-feign:jar:1.0.0-SNAPSHOT with transitive dependencies
[WARNING] Missing POM for super_.platform.client:client-feign:jar:1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:07 min
[INFO] Finished at: 2020-11-06T19:49:27Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:get (default-cli) on project standalone-pom: Couldn't download artifact: Missing:
[ERROR] ----------
[ERROR] 1) super_.platform.client:client-feign:jar:1.0.0-SNAPSHOT
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=super_.platform.client -DartifactId=client-feign -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) org.apache.maven.plugins:maven-downloader-plugin:jar:1.0
[ERROR] 2) super_.platform.client:client-feign:jar:1.0.0-SNAPSHOT
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] org.apache.maven.plugins:maven-downloader-plugin:jar:1.0
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR]
[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/MojoExecutionException
Question
Since the Git repo at Gitlab is private, I would imagine the Maven repository is also private. How to download that in Gradle?
Solution
Add the token information in the Maven repo passing the value through Environment Variable: GITLAB_TOKEN. You need to use the credentials section with an HTTP Header object.
maven {
url "https://gitlab.com/api/v4/projects/22268428/packages/maven"
credentials(HttpHeaderCredentials) {
name "Private-Token"
value System.env.GITLAB_TOKEN
}
authentication {
header(HttpHeaderAuthentication)
}
}
After that, I was able to pull the library from the private Maven repository within the Gitlab repo.
GITLAB_TOKEN=1234556 gradle eclipse

maven install not work in eclipse and trying other plans

Error logs:
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.12.4:test (default-test) on project sample: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [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/PluginResolutionException
================================================================
I try plans.
preferences > maven > user settings reset
project clean > maven update > maven clean > maven install
C:\Users\docan.m2\repository folder delete and try step2

Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.4.2-SNAPSHOT:protoc

Any idea how I can solve this error?
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.4.2-SNAPSHOT:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :hadoop-common
I solved the problem by installing protocolBuffer in Ubuntu using the following command:
sudo apt-get install protoc

Categories