How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js8 when building and compiling Java Project in Netbeans IDE

Posted on

Introduction

The following article is discussing about how to solve an error message appear. For more information, the error is similar with the one exist in two of the previous articles. The first one is an article with the title of ‘How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js6 when building and compiling Java Project in Netbeans IDE’ in this link. The second one is another article with the title of ‘How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js7 when building and compiling Java Project in Netbeans IDE’ in this link. Where is the similarity exist ?. Well, it exist in the package name that cannot be found. The main difference is just in the version of the package name. Where is the error message appear. Actually, the error message when the execution of the building and compilingJava-based application program is running. The running process for building and compiling is using Netbeans as a Java-based IDE. The output of the building and compiling process exist as follows  :

cd C:\apps; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_111" M2_HOME=C:\\apache-maven-3.6.3 cmd /c "\"\"C:\\apache-maven-3.6.3\\bin\\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" clean install\""
Scanning for projects...

---------------------< com.github.adminfaces:apps >---------------------
Building apps 0.1-SNAPSHOT
--------------------------------[ war ]---------------------------------
Downloading from snapshots: https://oss.sonatype.org/content/repositories/snapshots/com/lowagie/itext/2.1.7.js8/itext-2.1.7.js8.pom
Downloading from prime-repo: http://repository.primefaces.org/com/lowagie/itext/2.1.7.js8/itext-2.1.7.js8.pom
Downloading from central: https://repo.maven.apache.org/maven2/com/lowagie/itext/2.1.7.js8/itext-2.1.7.js8.pom
Downloading from jaspersoft-third-party: http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js8/itext-2.1.7.js8.pom
Downloading from jr-ce-releases: http://jaspersoft.jfrog.io/jaspersoft/jr-ce-releases/com/lowagie/itext/2.1.7.js8/itext-2.1.7.js8.pom
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 10.789 s
Finished at: 2021-07-22T06:37:55+07:00
------------------------------------------------------------------------
Failed to execute goal on project apps: Could not resolve dependencies for project com.github.adminfaces:apps:war:0.1-SNAPSHOT: Failed to collect dependencies at net.sf.jasperreports:jasperreports:jar:6.14.0 -> com.lowagie:itext:jar:2.1.7.js8: Failed to read artifact descriptor for com.lowagie:itext:jar:2.1.7.js8: Could not transfer artifact com.lowagie:itext:pom:2.1.7.js8 from/to jaspersoft-third-party (http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/): Transfer failed for http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/lowagie/itext/2.1.7.js8/itext-2.1.7.js8.pom 308 Permanent Redirect -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Solution

This part will discuss the solution to solve the error message. Well, basically the solution is exactly the same with the previous article. Actually, after searching thoroughly, the error message appear because of This is because of the following pom.xml file definition :

<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.14.0</version>
</dependency>

The cause is similar with the previous article. The error ‘Failure to find com.lowagie:itext:pom:2.1.7.js8’ exist from the jasperreports definition in pom.xml starting with the version of 6.14.0. On the other hand, the error ‘Failure to find com.lowagie:itext:pom:2.1.7.js7’ exist in the article in this link, it xist when the definition of the jasperreports exist starting from the version of 6.10.0 along to a more higher version until 6.13.0. Moreover, the version of the jasperreports definition start from the version 6.9.0 will trigger the error ‘Failure to find com.lowagie:itext:pom:2.1.7.js6’ in this link. What about the solution ?. Well, the solution is exactly the same. Just insert the following snippet configuration inside the jasperreports definition.

<exclusions>
<exclusion>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
</exclusion>
</exclusions>

In the end, the overall definition of the jasperreports package in the pom.xml file will exist as follows :

<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.14.0</version>
<exclusions>
<exclusion>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
</exclusion>
</exclusions>
</dependency>

Last but not least, if there is no other error appearing upon the build and compile process of the project, the process will end in a success. Just execute the build and compile process again once more after editing the pom.xml according to the above snippet configuration.

One thought on “How to Solve Error Message Failure to find com.lowagie:itext:pom:2.1.7.js8 when building and compiling Java Project in Netbeans IDE

Leave a Reply