java.io.IOException: Failed to parse metadata: Unrecognised tag: 'version' (position: START_TAG seen ...<versioning>\n <version>... @7:11)

JFrog JIRA | Lorand Somogyi | 7 years ago
  1. 0

    If remote repository with wrong maven-metadata.xml files present. AF will produce an exception and prevent resolution of the artifact even if the artifact is present in the Artifact Repository (corporate releases in our case). To reproduce: Create a simple http service for one artifact present in Artifactory. Provide a non-valid maven-metadata.xml for the artifact. - It could be a valid XML, with wrong tags. - Confiugre artifact to use the smiple http service as Remote Repositry. Try to resolve the artifact with maven. In our case the offending wrong metadata missed versions tag in XML. Excerpt from log: --------------------------------------------------------- cut --------------------------------------------------------- java.io.IOException: Failed to parse metadata: Unrecognised tag: 'version' (position: START_TAG seen ...<versioning>\n <version>... @7:11) at org.artifactory.maven.MavenModelUtils.toMavenMetadata(MavenModelUtils.java:149) [artifactory-common-2.1.0.jar:na] at org.artifactory.maven.MavenModelUtils.toMavenMetadata(MavenModelUtils.java:123) [artifactory-common-2.1.0.jar:na] at org.artifactory.repo.virtual.VirtualRepoDownloadStrategy.getMavenMetadataContent(VirtualRepoDownloadStrategy.java:262) [artifactory-core-2.1.0.jar:na] --------------------------------------------------------- cut --------------------------------------------------------- Artifactory should blacklist the repository rather then failing to resolve the artifact.

    JFrog JIRA | 7 years ago | Lorand Somogyi
    java.io.IOException: Failed to parse metadata: Unrecognised tag: 'version' (position: START_TAG seen ...<versioning>\n <version>... @7:11)
  2. 0

    If remote repository with wrong maven-metadata.xml files present. AF will produce an exception and prevent resolution of the artifact even if the artifact is present in the Artifact Repository (corporate releases in our case). To reproduce: Create a simple http service for one artifact present in Artifactory. Provide a non-valid maven-metadata.xml for the artifact. - It could be a valid XML, with wrong tags. - Confiugre artifact to use the smiple http service as Remote Repositry. Try to resolve the artifact with maven. In our case the offending wrong metadata missed versions tag in XML. Excerpt from log: --------------------------------------------------------- cut --------------------------------------------------------- java.io.IOException: Failed to parse metadata: Unrecognised tag: 'version' (position: START_TAG seen ...<versioning>\n <version>... @7:11) at org.artifactory.maven.MavenModelUtils.toMavenMetadata(MavenModelUtils.java:149) [artifactory-common-2.1.0.jar:na] at org.artifactory.maven.MavenModelUtils.toMavenMetadata(MavenModelUtils.java:123) [artifactory-common-2.1.0.jar:na] at org.artifactory.repo.virtual.VirtualRepoDownloadStrategy.getMavenMetadataContent(VirtualRepoDownloadStrategy.java:262) [artifactory-core-2.1.0.jar:na] --------------------------------------------------------- cut --------------------------------------------------------- Artifactory should blacklist the repository rather then failing to resolve the artifact.

    JFrog JIRA | 7 years ago | Lorand Somogyi
    java.io.IOException: Failed to parse metadata: Unrecognised tag: 'version' (position: START_TAG seen ...<versioning>\n <version>... @7:11)
  3. 0
    Check for bad records in the input data (like '(null)')
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Bad input data (not properly separated)
  6. 0
    If you are using maven you'd like to exclude your binaries from filtering process.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Failed to parse metadata: Unrecognised tag: 'version' (position: START_TAG seen ...<versioning>\n <version>... @7:11)

      at org.artifactory.maven.MavenModelUtils.toMavenMetadata()
    2. org.artifactory.maven
      MavenModelUtils.toMavenMetadata
      1. org.artifactory.maven.MavenModelUtils.toMavenMetadata(MavenModelUtils.java:149)[artifactory-common-2.1.0.jar:na]
      2. org.artifactory.maven.MavenModelUtils.toMavenMetadata(MavenModelUtils.java:123)[artifactory-common-2.1.0.jar:na]
      2 frames
    3. org.artifactory.repo
      VirtualRepoDownloadStrategy.getMavenMetadataContent
      1. org.artifactory.repo.virtual.VirtualRepoDownloadStrategy.getMavenMetadataContent(VirtualRepoDownloadStrategy.java:262)[artifactory-core-2.1.0.jar:na]
      1 frame