Artifactory在启动时引发异常:“由于输入结束,无法映射任何内容”

时间:2019-05-23 20:13:46

标签: java windows maven artifactory

前几天,我下载并安装了JFrog Artifactory 6.10.0版的开源免费版本。使用Artifactory UI,我能够根据需要为Maven项目设置本地,远程和虚拟存储库,以便在工件上存储构建并将其用于获取Maven依赖项。具体来说,我是在初次打开UI时选择Maven进行设置的,它询问是否要设置存储库。

我正在Windows 10上将人工制品作为服务运行。如果很重要,我会说,当我第一次安装它时,当我从Eclipse运行maven“部署”目标时,我会收到401未经授权的错误。我使用的项目在pom.xml文件中具有适当的条目,并且在我的.m2文件夹中具有适当的settings.xml文件。即使我的settings.xml文件是使用管理员凭据创建的,也会发生401错误。我致力于在人工UI中更改权限,最终在为“ admin-access”用户提供所有权限后解决了该问题。需要明确的是,此时一切正常。当我从Eclipse运行“部署”目标时,就从代理存储库中下载了依赖项,并将工件存储在了工件中。

现在,当我启动Artifactory时,我看到了典型的启动动画,随后是一个显示以下内容的屏幕:

    {
  "errors" : [ {
    "status" : 500,
    "message" : "Artifactory failed to initialize: check Artifactory logs for errors."
  } ]
}

编辑:为澄清起见,我将添加一个显示上述JSON错误消息的屏幕,这是我进入http://localhost:8081/artifactory/webapp并等待启动动画结束时在屏幕上看到的唯一内容。该应用程序完全不可用,因为它仅显示上面的JSON并停留在显示它的屏幕上。那是我面临的中心问题。

在检查工件日志后,在系统信息转储部分之后,我看到以下内容:

    2019-05-23 12:07:50,487 [art-init] [INFO ] (o.j.c.w.ConfigurationManagerImpl:445) - Replacing temporary DB channel with permanent DB channel
2019-05-23 12:07:50,488 [art-init] [INFO ] (o.j.c.w.ConfigurationManagerImpl:445) - Successfully closed temporary DB channel
2019-05-23 12:07:50,488 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:505) - Artifactory application context set to READY by refresh
2019-05-23 12:07:50,632 [art-init] [INFO ] (o.a.s.a.AccessServiceImpl:1529) - Successful register of Artifactory serviceId jfrt@01db44pt153v8z1j4eqnm60qxr in Access Federation
2019-05-23 12:07:50,710 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:96) - Application could not be initialized: No content to map due to end-of-input
 at [Source: (byte[])""; line: 1, column: 0]
java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:211)
    at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$200(ArtifactoryContextConfigListener.java:67)
    at org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:92)
Caused by: org.jfrog.common.JsonParsingException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (byte[])""; line: 1, column: 0]
    at org.jfrog.common.MapperUtilsBase.unchecked(MapperUtilsBase.java:233)
    at org.jfrog.common.MapperUtilsBase.readValue(MapperUtilsBase.java:203)
    at org.jfrog.common.JsonUtils.readValue(JsonUtils.java:27)
    at org.artifactory.storage.db.migration.service.MigrationStatusStorageServiceImpl.findMigrationByIdWithInfoBlob(MigrationStatusStorageServiceImpl.java:56)
    at org.artifactory.metadata.service.MetadataMigrationHelper.getMigrationStatus(MetadataMigrationHelper.java:194)
    at org.artifactory.metadata.service.MetadataMigrationHelper.shouldMigrate(MetadataMigrationHelper.java:65)
    at org.artifactory.metadata.service.MetadataMigrationHelper.migrateOrStartEventPipe(MetadataMigrationHelper.java:52)
    at org.artifactory.metadata.service.MetadataEventServiceImpl.onContextCreated(MetadataEventServiceImpl.java:121)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
    at com.sun.proxy.$Proxy220.onContextCreated(Unknown Source)
    at org.artifactory.spring.ArtifactoryApplicationContext.contextCreated(ArtifactoryApplicationContext.java:285)
    at org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:146)
    ... 7 common frames omitted
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (byte[])""; line: 1, column: 0]
    at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
    at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4133)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3988)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3079)
    at org.jfrog.common.MapperUtilsBase.lambda$readValue$14(MapperUtilsBase.java:203)
    at org.jfrog.common.MapperUtilsBase.unchecked(MapperUtilsBase.java:231)
    ... 23 common frames omitted

在此方面的任何帮助将不胜感激。我不确定我是不是偶然发现了Artifactory错误,还是在创建回购协议,使用人工制品存储/获取依赖项时是否以某种方式破坏了应用程序?

如果有关系,这是我pom.xml文件的摘录(名称字段已更改,以避免任何可能的安全问题。)

    <distributionManagement>
    <repository>
        <id>central</id>
        <name>my_computer-releases</name>
        <url>http://localhost:8081/artifactory/libs-release-local</url>
    </repository>
    <snapshotRepository>
        <id>snapshots</id>
        <name>my_computer-snapshots</name>
        <url>http://localhost:8081/artifactory/libs-snapshot-local</url>
    </snapshotRepository>
</distributionManagement>

这是我的settings.xml文件(更改了加密的密码信息)

   <?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
    <server>
      <username>${security.getCurrentUsername()}</username>
      <password>${security.getEscapedEncryptedPassword()!"[EncryptedPasswordHere]"}</password>
      <id>central</id>
    </server>
    <server>
      <username>${security.getCurrentUsername()}</username>
      <password>${security.getEscapedEncryptedPassword()!"[EncryptedPasswordHere]"}</password>
      <id>snapshots</id>
    </server>
  </servers>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://localhost:8081/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://localhost:8081/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://localhost:8081/artifactory/libs-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://localhost:8081/artifactory/libs-snapshot</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>
</settings>

1 个答案:

答案 0 :(得分:0)

如果功能正常。我认为不必担心这个问题。它只是抱怨某些库的pom xml出于某种原因可能是空的。