Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-27382

P2 virtual repository breaks Artifactory when adding "P2 Repository URLs"




      Problem description:

      When creating a new P2 virtual repository, and when adding remote repositories while doing so, Artifactory will break following the next restart.

      This happens because Artifactory created a remote P2 repository with a name that is identical to the added remote repo URL (and "/" characters are not allowed in repository names).


      What is the impact to the customer:

      Creating a virtual P2 repository with remote repositories will not allow the customer to restart Artifactory unless he manually edits/deletes said repository key.


      What is the expected behavior?

      Do note create a repository with characters that are not allowed


      Steps to reproduce:

      1) When creating a new P2 virtual repository, under the "Remote P2 Repositories" section, add some P2 Repository URL.

      For example https://download.eclipse.org/releases/juno/

      2) This will create a repository called "download.eclipse.org/releases/juno"

      **3) Restarting Artifactory will not allow Artifactory to boot because the new remote P2 repository has invalid characters in its repository name ("/")


      Stacktrace (shortened):

      2022-08-29T13:47:26.818Z [jfrt ] [ERROR] [3e206916979ac877] [.CentralConfigServiceImpl:1084] [art-init ] - Could not load configuration due to: Failed to read object from stream
      java.lang.RuntimeException: Failed to read object from stream
      Caused by: javax.xml.bind.UnmarshalException: null
      Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: 'download.eclipse.org/releases/juno/' is not a valid value for 'NCName'
      2022-08-29T13:47:26.839Z [jfrt ] [ERROR] [3e206916979ac877] [ctoryContextConfigListener:126] [art-init ] - Application could not be initialized: nulljava.lang.reflect.InvocationTargetException: null
      Caused by: org.springframework.beans.factory.BeanInitializationException: Failed to initialize bean 'org.artifactory.security.access.AccessService'.; nested exception is java.lang.NullPointerException
      Caused by: java.lang.NullPointerException: null


      Possible workaround:

      Option 1:

      Delete the remote repository that was created as part of the virtual repository in the artifactory.config.latest.xml file (located at $JFROG_HOME/artifactory/var/etc/artifactory)

      You should delete from the beginning <remoteRepository> up until the closing </remoteRepository>

      Option 2:

      Change the <key> parameter to an allowed repository name.

      For example:

      Change <key>download.eclipse.org/releases/juno/</key>

      To <key>download.eclipse.org-releases-juno</key>





              erezv Erez Vadmani
              0 Vote for this issue
              1 Start watching this issue