The other day, I downloaded and installed the open-source, free version of JFrog Artifactory version 6.10.0. Using the Artifactory UI, I was able to set up local, remote, and virtual repositories for Maven projects as needed in order to store builds on artifactory and use it to fetch Maven dependencies. Specifically, I set these up by choosing Maven when I first opened the UI, and it asked about setting up repos.
I am running artifactory as a service on Windows 10. In case it matters, I will say that, at the time I first installed it, I was getting 401 Unauthorized errors when I ran the maven "deploy" goal from Eclipse. I was using a project with the appropriate entries in the pom.xml file, and had the appropriate settings.xml file in my .m2 folder. The 401 error happened even though my settings.xml file had been made with admin credentials. I worked on changing the permissions in the artifactory UI, eventually resolving the issue after giving the "admin-access" user all permissions. To be clear, everything was working fine at this point. Dependencies were getting downloaded from proxy repos and artifacts were getting stored in artifactory when I ran the "deploy" goal from Eclipse.
Now, when I start Artifactory up, I see the typical startup animation followed by a screen that shows:
{
"errors" : [ {
"status" : 500,
"message" : "Artifactory failed to initialize: check Artifactory logs for errors."
} ]
}
EDIT: For clarification, I will add that the screen showing the above JSON error message is the only thing I see on screen when I go to http://localhost:8081/artifactory/webapp and wait for the start up animation to end. The application is completely unusable because it just shows the above JSON and stays at a screen showing it. That is the central problem I am facing.
Upon checking the artifactory logs, after the system information dump section, I see the following:
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
Any help on this would be greatly appreciated. I'm not sure if I've somehow stumbled upon an Artifactory bug or if I somehow broke the application when I created repos, used artifactory to store/fetch depencies, or had my artifacts stored there.
If it matters, here is an excerpt from my pom.xml file (with the name field changed to avoid any possible security issue.)
<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>
Here is my settings.xml file (with encrypted password information changed)
<?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>