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

    Re: Failed to use sqoop-1.4.3 job tool on hadoop-2.1.0-beta

    sqoop-user | 3 years ago | sam liu
    java.io.IOException: Invalid metadata version.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: Failed to use sqoop-1.4.3 job tool on hadoop-2.1.0-beta

    sqoop-user | 3 years ago | sam liu
    java.io.IOException: Invalid metadata version.
  6. 0

    While making a build with maven and uploading artifacts to Artifactory, I receive the following exception: <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\pom.xml clean install -Prelease [INFO] Scanning for projects... [INFO] Initializing Artifactory Build-Info Recording [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] AuditingWebService [INFO] AuditingWebService-webapp [INFO] AuditingWebService-ws-client [INFO] AuditingWebService-installer Projects to build: [MavenProject: it.ids:AuditingWebService:2.2.1 @ C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\pom.xml, MavenProject: it.ids:AuditingWebService-webapp:2.2.1 @ C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-webapp\pom.xml, MavenProject: it.ids:AuditingWebService-ws-client:2.2.1 @ C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-ws-client\pom.xml, MavenProject: it.ids:AuditingWebService-installer:2.2.1 @ C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-installer\pom.xml] [HUDSON] Collecting dependencies info [HUDSON] Collecting dependencies info [HUDSON] Collecting dependencies info [HUDSON] Collecting dependencies info projectStarted it.ids:AuditingWebService:2.2.1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building AuditingWebService 2.2.1 [INFO] ------------------------------------------------------------------------ mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.4.1(default-clean) [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ AuditingWebService --- [INFO] Deleting C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\target mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.4.1(default-clean) mojoStarted org.apache.maven.plugins:maven-install-plugin:2.3.1(default-install) [INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ AuditingWebService --- [INFO] Installing C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\pom.xml to C:\Users\a.dionisi\.m2\repository\it\ids\AuditingWebService\2.2.1\AuditingWebService-2.2.1.pom mojoSucceeded org.apache.maven.plugins:maven-install-plugin:2.3.1(default-install) projectSucceeded it.ids:AuditingWebService:2.2.1 [INFO] Artifactory Build Info Recorder: Deploying artifacts to http://pch322x64:8081/artifactory/libs-releases-local [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService/2.2.1/AuditingWebService-2.2.1.pom [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1.war [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1.pom [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1-release-configuration.zip [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-ws-client/2.2.1/AuditingWebService-ws-client-2.2.1.jar [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-ws-client/2.2.1/AuditingWebService-ws-client-2.2.1.pom [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1-standard.jar [INFO] Deploying artifact: http://pch322x64:8081/artifactory/libs-releases-local/it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1.pom mavenExecutionResult exceptions not empty message : Internal error: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-installer\target\izpack\CustomComponents.jar. Skipping deployment of remaining artifacts (if any) and build info. cause : Error occurred while publishing artifact to Artifactory: C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-installer\target\izpack\CustomComponents.jar. Skipping deployment of remaining artifacts (if any) and build info. Stack trace : org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-installer\target\izpack\CustomComponents.jar. Skipping deployment of remaining artifacts (if any) and build info. at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:98) at hudson.maven.Maven3Builder.call(Maven3Builder.java:64) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-installer\target\izpack\CustomComponents.jar. Skipping deployment of remaining artifacts (if any) and build info. at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:134) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:78) at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:128) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64) at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 19 more Caused by: java.io.IOException: Failed to deploy file: HTTP response code: 409. HTTP response message: Failed to read POM for 'it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1.pom': only whitespace content allowed before start tag and not P (position: START_DOCUMENT seen P... @1:1) . at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:641) at org.jfrog.build.client.ArtifactoryBuildInfoClient.uploadFile(ArtifactoryBuildInfoClient.java:516) at org.jfrog.build.client.ArtifactoryBuildInfoClient.deployArtifact(ArtifactoryBuildInfoClient.java:291) at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deployArtifacts(BuildDeploymentHelper.java:132) ... 26 more This is the artifactory.log fragment: 2012-07-05 15:19:57,830 [pool-1-thread-11] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService/2.2.1/AuditingWebService-2.2.1.pom' Content-Length: 9477 2012-07-05 15:19:58,249 [pool-1-thread-18] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1.war' Content-Length: 0 2012-07-05 15:19:58,257 [pool-1-thread-15] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1.war' Content-Length: 26321548 2012-07-05 15:19:59,356 [pool-1-thread-14] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1.pom' Content-Length: 0 2012-07-05 15:19:59,448 [pool-1-thread-22] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-webapp/2.2.1/AuditingWebService-webapp-2.2.1-release-configuration.zip' Content-Length: 1130 2012-07-05 15:19:59,522 [art-exec-26] [INFO ] (o.a.s.a.ArchiveIndexer:102) - The content of the archive: 'AuditingWebService-webapp-2.2.1-release-configuration.zip' was indexed successfully. 2012-07-05 15:19:59,568 [pool-1-thread-28] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-ws-client/2.2.1/AuditingWebService-ws-client-2.2.1.jar' Content-Length: 0 2012-07-05 15:19:59,573 [pool-1-thread-17] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-ws-client/2.2.1/AuditingWebService-ws-client-2.2.1.jar' Content-Length: 54519 2012-07-05 15:19:59,777 [art-exec-26] [INFO ] (o.a.s.a.ArchiveIndexer:102) - The content of the archive: 'AuditingWebService-ws-client-2.2.1.jar' was indexed successfully. 2012-07-05 15:19:59,777 [pool-1-thread-20] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-ws-client/2.2.1/AuditingWebService-ws-client-2.2.1.pom' Content-Length: 5736 2012-07-05 15:19:59,870 [art-exec-24] [INFO ] (o.a.s.a.ArchiveIndexer:102) - The content of the archive: 'AuditingWebService-webapp-2.2.1.war' was indexed successfully. 2012-07-05 15:20:00,059 [pool-1-thread-16] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1-standard.jar' Content-Length: 0 2012-07-05 15:20:00,065 [pool-1-thread-19] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1-standard.jar' Content-Length: 36070751 2012-07-05 15:20:01,547 [pool-1-thread-21] [INFO ] (o.a.e.UploadServiceImpl:201) - Deploy to 'libs-releases-local:it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1.pom' Content-Length: 9499 2012-07-05 15:20:01,550 [pool-1-thread-21] [WARN ] (o.a.r.j.StoringRepoMixin:669) - IO error while trying to save resource libs-releases-local:it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1.pom'': Failed to read POM for 'it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1.pom': only whitespace content allowed before start tag and not P (position: START_DOCUMENT seen P... @1:1) . 2012-07-05 15:20:01,550 [pool-1-thread-21] [WARN ] (o.a.e.UploadServiceImpl:311) - Sending HTTP error code 409: Failed to read POM for 'it/ids/AuditingWebService-installer/2.2.1/AuditingWebService-installer-2.2.1.pom': only whitespace content allowed before start tag and not P (position: START_DOCUMENT seen P... @1:1) ..

    JFrog JIRA | 4 years ago | Alessandro Dionisi
    org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Error occurred while publishing artifact to Artifactory: C:\hudson_home\jobs\AuditingWebService-Build-release-2.2.1\workspace\AuditingWebService\AuditingWebService-installer\target\izpack\CustomComponents.jar. Skipping deployment of remaining artifacts (if any) and build info.

    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