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

Missing hints in config commands for jackson #18

Closed
jvalkeal opened this issue Jun 2, 2022 · 0 comments · Fixed by #19
Closed

Missing hints in config commands for jackson #18

jvalkeal opened this issue Jun 2, 2022 · 0 comments · Fixed by #19
Labels
area/aot Belongs aot and native type/bug Is a bug report

Comments

@jvalkeal
Copy link
Collaborator

jvalkeal commented Jun 2, 2022

When executing config commands there is an error with native image.

$ spring-cli config list
Unable to read from path /home/jvalkealahti/.config/springcli/command-defaults.yml
java.lang.RuntimeException: Unable to read from path /home/jvalkealahti/.config/springcli/command-defaults.yml
	at org.springframework.cli.support.configfile.YamlConfigFile.read(YamlConfigFile.java:46)
	at org.springframework.cli.support.configfile.UserConfig.getConfig(UserConfig.java:60)
	at org.springframework.cli.support.SpringCliUserConfig.getCommandDefaults(SpringCliUserConfig.java:188)
	at org.springframework.cli.command.ConfigCommands.configList(ConfigCommands.java:117)
	at java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.shell.command.invocation.InvocableShellMethod.doInvoke(InvocableShellMethod.java:308)
	at org.springframework.shell.command.invocation.InvocableShellMethod.invoke(InvocableShellMethod.java:233)
	at org.springframework.shell.command.CommandExecution$DefaultCommandExecution.evaluate(CommandExecution.java:151)
	at org.springframework.shell.Shell.evaluate(Shell.java:205)
	at org.springframework.shell.Shell.run(Shell.java:137)
	at org.springframework.shell.jline.NonInteractiveShellRunner.run(NonInteractiveShellRunner.java:104)
	at org.springframework.shell.DefaultShellApplicationRunner.run(DefaultShellApplicationRunner.java:65)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:762)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
	at org.springframework.cli.SpringCliApplication.main(SpringCliApplication.java:30)
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `org.springframework.cli.support.SpringCliUserConfig$CommandDefaults` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: (DataInputStream); line: 2, column: 1]
	at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1904)
	at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400)
	at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1349)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1415)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3666)
	at org.springframework.cli.support.configfile.YamlConfigFile.read(YamlConfigFile.java:44)
	... 17 more

@jvalkeal jvalkeal added area/aot Belongs aot and native type/bug Is a bug report labels Jun 2, 2022
jvalkeal added a commit to jvalkeal/spring-cli that referenced this issue Jun 2, 2022
- Mostly config static classes which are not resolved
  until jackson doest things via reflection.
- Fixes spring-projects#18
jvalkeal added a commit that referenced this issue Jun 2, 2022
- Mostly config static classes which are not resolved
  until jackson doest things via reflection.
- Fixes #18
@jvalkeal jvalkeal added this to the 0.0.1-M1 milestone Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aot Belongs aot and native type/bug Is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant