Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on mvn package #89

Open
atomotic opened this issue Aug 7, 2018 · 5 comments
Open

error on mvn package #89

atomotic opened this issue Aug 7, 2018 · 5 comments

Comments

@atomotic
Copy link
Contributor

atomotic commented Aug 7, 2018

trying to build the develop branch:

[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.0:build (default) on project elucidate-server: Could not build image: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.spotify.docker.client.messages.RegistryAuth` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('enabled')

@garyttierney
Copy link
Member

garyttierney commented Aug 7, 2018

Hi @atomotic,

Could you please attach the stacktrace and any additional info for that Maven run? You can re-run using mvn -e -X package to get the complete error information.

I think the issue here is that the package goal tries to create a Docker image, even when there is no Docker client installed locally.

@atomotic
Copy link
Contributor Author

atomotic commented Aug 7, 2018

Caused by: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.spotify.docker.client.messages.RegistryAuth` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('enabled')
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["experimental"])
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1342)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1031)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:371)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:323)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1366)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:171)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1276)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3972)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2264)
	at com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:2746)
	at com.spotify.docker.client.DockerConfigReader.parseDockerConfig(DockerConfigReader.java:116)
	at com.spotify.docker.client.DockerConfigReader.fromConfig(DockerConfigReader.java:51)
	at com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier.authForBuild(ConfigFileRegistryAuthSupplier.java:106)
	... 29 more

i see at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["experimental"])
i guess that the problem could be in my docker config (18.05.0-ce macos)

➜  ~ cat .docker/config.json
{
  "experimental" : "enabled",
  "credsStore" : "osxkeychain",
  "orchestrator" : "swarm"
}

related to:
spotify/docker-client#657

@atomotic
Copy link
Contributor Author

atomotic commented Aug 7, 2018

upgrade to dockerfile-maven-plugin 1.4.3 fix the issue, now the build works and also the docker image is ready.

https://github.com/dlcs/elucidate-server/blob/develop/elucidate-server/pom.xml#L30

atomotic added a commit to atomotic/elucidate-server that referenced this issue Aug 8, 2018
fixes packaging issue on macos dlcs#89
@danielgrant
Copy link
Contributor

Hi @workergnome, can you attempt a build now using the develop branch, following @atomotic's pull request?

@workergnome
Copy link

running mvn clean package install -U -DskipTests from within the elucidate-parent directory on the develop branch, It builds successfully now, though with a certain number of warnings.

geomacy added a commit to geomacy/brooklyn-dist that referenced this issue Nov 18, 2018
Building on OSX I get

```
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.0:build (default) on project brooklyn-dist: Could not build image: com.spotify.docker.client.shaded.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.spotify.docker.client.messages.RegistryAuth` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('osxkeychain')
[ERROR]  at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: java.util.LinkedHashMap["credSstore"])
```

Updating the plugin to 1.4.3 per the comment below fixed this issue for
me.

dlcs/elucidate-server#89 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants