datbrown123
datbrown123

Reputation: 61

Archiva Remote repository issue

I am trying to add a remote repository on Archiva. However, I keep getting this error in the logs:

ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils []
- No message body writer has been found for class org.apache.archiva.rest.services.ArchivaRestError,
ContentType: text/plain

I tried adding the Content Type header with text/plain but that did not work

Upvotes: 5

Views: 2170

Answers (3)

Mark
Mark

Reputation: 71

I've been having the same issue as described with Apache Archiva 2.2.0.

Apache Archiva 2.2.3 appears to be fix this issue, and appears to be a drop-in replacement which works with all of the configuration and databases from 2.2.0.

https://archiva.apache.org/download.cgi

Upvotes: 1

J-W
J-W

Reputation: 408

Seems that archiva 2.2.1 always adds // at the end of the remote repo url.

On some repos, this results in errors (e.g. Maven Central returns code 400 for http://repo.maven.apache.org/maven2///).

Some other repos ignore the trailing slashes and still work (nexus).

ps: as long as I used a lan proxy, I did not had the problem. I guess it translates the url and removes those extra slashes, which avoids the whole problem.

Upvotes: 0

joergd
joergd

Reputation: 573

I've hit the same problem after adding a new remote repository to Archiva.

From my analysis I conclude that the error is thrown for Repositories that don't expose an index.

Example: When adding http://download.oracle.com/maven, which is Oracle's Maven Repository to receive artifacts, will throw this error as soon as you've added it as a remote repository.

Trying to access the URL via browser results in a 404. However, direct queries like this are answered properly.

So, I guess it is Archiva's inability to properly cope with such repositories.

Upvotes: 4

Related Questions