Free Support Forum - aspose.com

Connecting Sonatype Nexus to Aspose Repository | Validator, Remote Storage, SSL Handshake Exceptions | Cannot Fetch Index

I would like to try aspose.words in our current project.
Our setup is such that we need to get all our packages from our local Sonatype Nexus.

Our preferred approach here is to set up a proxi repository in Nexus that points to the aspose maven repository and downloads all packages that we might need.

In that setup I pointed to https://repository.aspose.com/repo/

But I am getting the following error:

Status: Unsuccessful.
Message: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Am I pointing to the correct repository?
Is there anything that I am missing?

image.png (24.8 KB)

image.png (6.9 KB)

@TMamer,

Please try the following POM.XML. Hope, this helps.
pom.zip (502 Bytes)

Hello,

I have the same problem, but the pom.zip is only private and I can’t view the solution.
Can you provide me the solution, too, or paste the content of the pom.xml here directly in text-form?

Thank you!

Kind regards
Dirk Steinkamp

@DirkSteinkamp,

You can easily use Aspose.Words for Java directly from a Maven based project by adding following configurations to your pom.xml.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>20.1</version>
    <type>pom</type>
</dependency>

Hope, this helps.

Thank you for the quick response!

I needed to access it through our nexus – it turned out we hadn’t configured the repo in nexus properly, but we had missed one detail, so it didn’t work. But we managed to fix it and it’s working now. :slight_smile:

@DirkSteinkamp,

It is great that you were able to fix the problem on your end. Please let us know any time you have any further queries in future.

1 Like

I have the same issue, can you post what you did to resolve it please

@Lourdes,

Please add the following configuration to pom.xml to reference latest version of Aspose.Words for Java:

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>21.2</version>
    <type>pom</type>
</dependency>

Or add the following configuration to build.gradle to reference latest version of Aspose.Words for Android via Java.

maven {
    url "https://repository.aspose.com/repo/" }
compile (
        group: 'com.aspose',
        name: 'aspose-words',
        version: '20.9',
        classifier: 'android.via.java')

I have this configuration in Nexus
image.png (2.0 KB)

image.png (35.8 KB)
image.png (1.5 KB)

This is the error

2021-02-24 13:37:06 WARN [ool-1-thread-13] - org.sonatype.nexus.index.DefaultIndexerManager - Cannot fetch remote index for repository “Aspose Java API” [id=AsposeJavaAPI]
org.sonatype.nexus.proxy.RemoteStorageException: Transport error while executing GET method [repositoryId=“AsposeJavaAPI”, requestPath="/.index/nexus-maven-repository-index.properties", remoteUrl=“http://artifact.aspose.com/repo/.index/nexus-maven-repository-index.properties”]
at org.sonatype.nexus.proxy.storage.remote.commonshttpclient.CommonsHttpClientRemoteStorage.executeMethod(CommonsHttpClientRemoteStorage.java:399) ~[nexus-proxy-2.0.6.jar:na]
at org.sonatype.nexus.proxy.storage.remote.commonshttpclient.CommonsHttpClientRemoteStorage.retrieveItem(CommonsHttpClientRemoteStorage.java:112) ~[nexus-proxy-2.0.6.jar:na]
at org.sonatype.nexus.index.DefaultIndexerManager$2.retrieve(DefaultIndexerManager.java:1096) ~[nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.apache.maven.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:459) ~[indexer-core-4.1.3-SONATYPE.jar:4.1.3-SONATYPE]
at org.apache.maven.index.updater.DefaultIndexUpdater.access$000(DefaultIndexUpdater.java:76) ~[indexer-core-4.1.3-SONATYPE.jar:4.1.3-SONATYPE]
at org.apache.maven.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:589) ~[indexer-core-4.1.3-SONATYPE.jar:4.1.3-SONATYPE]
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:814) ~[indexer-core-4.1.3-SONATYPE.jar:4.1.3-SONATYPE]
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:157) ~[indexer-core-4.1.3-SONATYPE.jar:4.1.3-SONATYPE]
at org.sonatype.nexus.index.DefaultIndexerManager.updateRemoteIndex(DefaultIndexerManager.java:1131) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.index.DefaultIndexerManager.downloadRepositoryIndex(DefaultIndexerManager.java:1016) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.index.DefaultIndexerManager.reindexRepository(DefaultIndexerManager.java:890) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.index.DefaultIndexerManager.reindexRepository(DefaultIndexerManager.java:838) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.index.DefaultIndexerManager.reindexRepository(DefaultIndexerManager.java:812) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.tasks.ReindexTaskHandlerLegacy.reindexRepository(ReindexTaskHandlerLegacy.java:54) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.tasks.AbstractIndexerTask.doRun(AbstractIndexerTask.java:69) [nexus-indexer-lucene-plugin-2.0.6.jar:na]
at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:152) [nexus-app-2.0.6.jar:na]
at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:459) [plexus-task-scheduler-1.6.0.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_75]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_75]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

2021-02-24 15:14:12 INFO [ool-1-thread-12] - com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask - Scheduled task (Health Check: AsposeJavaAPI) started :: Health Check Management for Repository AsposeJavaAPI
2021-02-24 15:14:12 WARN [ool-1-thread-12] - com.sonatype.nexus.plugins.healthcheck.task.HealthCheckTask - Scheduled task (Health Check: AsposeJavaAPI) failed :: Health Check Management for Repository AsposeJavaAPI (started 2021-02-24T15:14:12-05:00, runtime 0:00:00.070): peer not authenticated

@Lourdes,

Can you please replace http://artifact.aspose.com/repo/ with https://repository.aspose.com/repo/ and see how it goes on your end? It seems that something on your network (proxy server, firewall, antivirus etc) is returning HTTP 403, and disallowing/blocking access. Please check with your system administrator to find out why this is happening? Apart from Aspose.Words for Java, are you able to retrieve other Java packages from any other Maven repos?

Same results switching repo. We do have other repos being successfully retrieved. I’ll check on the network.

We checked our network setting and it looks fine on our side. When I try to browse to https://repository.aspose.com/repo/ im able to view the repo. as per the logs its looking for https://repository.aspose.com/repo/.index/nexus-maven-repository-index.properties and I can find this file when I try to browse it.

@Lourdes,

We are checking this scenario and will get back to you soon.