You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/12/09 19:56:59 UTC

[jira] [Commented] (KARAF-4100) [karaf-3.0.x] Error resolving artifact of feature due to org.ops4j.pax.url.mvn.cfg not loaded yet

    [ https://issues.apache.org/jira/browse/KARAF-4100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15736173#comment-15736173 ] 

ASF subversion and git services commented on KARAF-4100:
--------------------------------------------------------

Commit 307846d5c7d95308dacce2531bf2a91f0950a8be in karaf's branch refs/heads/master from [~gzres]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=307846d ]

[KARAF-4100] Tests after pax-url-2.5.2 update - only one MavenResolver registered


> [karaf-3.0.x] Error resolving artifact of feature due to org.ops4j.pax.url.mvn.cfg not loaded yet
> -------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-4100
>                 URL: https://issues.apache.org/jira/browse/KARAF-4100
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 3.0.5
>         Environment: Karaf 3.0.4, Windows 7
>            Reporter: Jerry Meng
>            Assignee: Grzegorz Grzybek
>             Fix For: 4.1.0
>
>
> I set the mvn repository to the karaf_home/system directory in org.ops4j.pax.url.mvn.cfg.
> However, I found there is a chance that Karaf was trying to access the Internet and threw an exception since it's in a closed environment.
> {code}
> Error resolving artifact org.apache.karaf.features:enterprise:xml:features:3.0.4: Could not transfer artifact org.apache.karaf.features:enterprise:xml:features:3.0.4 from/to  (http://mvn.mycompany.net/content/groups/public): Not authorized , ReasonPhrase:Unauthorized.
> {code}
> Root Cause
> =========
> Through further tracking, the root cause may happen in org.ops4j.pax.url.mvn.internal.Activator (pax-url-aether). The pax url fails to load org.ops4j.pax.url.mvn.cfg before Karaf connects the feature url. Therefore Karaf ignores my settings in the configuration file but tries to access default remote repository. Here are some logs to describe the situation...
> {code}
> 1. activator.updated.dictionary: null
> 2. updated directory from safeRegisterService: null
> 3. activator.openConnection: mvn:org.apache.karaf.features/enterprise/3.0.4/xml/features
> 4. Unable to add features repository mvn:org.apache.karaf.features/enterprise/3.0.4/xml/features at startup
> 5. updated directory from safeRegisterService: {felix.fileinstall.filename={file:/D:/karaf/etc/org.ops4j.pax.url.mvn.cfg... }
> 6. activator.updated.dictionary: {felix.fileinstall.filename={file:/D:/karaf/etc/org.ops4j.pax.url.mvn.cfg... }
> {code}
> Workaround
> =========
> I'm not sure if I should call this a bug, but in my case I can assume org.ops4j.pax.url.mvn.cfg is existent definitely.
> Therefore, I make Activator.openConnection to wait if the Dictionary is not set.
> Then invoke notifyAll in Activator.updated after receiving an non-null Dictionary.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)