rinormaloku/k8s-mastery

Getting error while trying to run mvn install command

Ankk98 opened this issue ยท 6 comments

While running mvn install command in sa-webapp folder I am getting this issue -

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.sa.web:sentiment-analysis-web:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at wrong local POM @ line 14, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.sa.web:sentiment-analysis-web:0.0.1-SNAPSHOT (/home/ankk98/Documents/k8s-mastery/sa-webapp/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.sa.web:sentiment-analysis-web:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at wrong local POM @ line 14, column 10 -> [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/UnresolvableModelException

I think this is because of some issue with relative path property of parent.
I am completely new to maven so please guide me in fixing this issue.

Just add -Djavax.net.ssl.trustStorePassword=changeit to mvn install command - details can be found on stackoverflow

Thanks now it is working. ๐Ÿ‘

I have the same problem In my windows 10 PC what should I do

@tharunkantheti Did you try m-handy's solution?

hey @rinormaloku I am having the same kind of issue and my system is new and installed java maven, set path variable. even tried running with -Djavax.net.ssl.trustStorePassword=changeit command as well but still no success.

is there something which I am missing?
could you please help me with this issue.

Hi @dchoub

This problem seems to be related to our environment differences. To make it simple please replace the contents of the Dockerfile with the following: https://raw.githubusercontent.com/rinormaloku/k8s-mastery/azure-dev-ops/sa-webapp/Dockerfile

This will build the jar within the docker deamon and will not rely on your environment.