Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

[BUG] Jackson Serialization issue with kaoto frontend nightly #111

Closed
agibsonccc opened this issue Jul 12, 2022 · 4 comments
Closed

[BUG] Jackson Serialization issue with kaoto frontend nightly #111

agibsonccc opened this issue Jul 12, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@agibsonccc
Copy link

agibsonccc commented Jul 12, 2022

Describe the bug
A clear and concise description of what the bug is.

Stack trace:

Describe the bug
A clear and concise description of what the bug is.

Basic error stack trace:

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `io.kaoto.backend.model.deployment.kamelet.KameletBindingStatus$Condition` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.fabric8.kubernetes.client.CustomResourceList["items"]->java.util.ArrayList[0]->io.kaoto.backend.model.deployment.kamelet.Kamelet["status"]->io.kaoto.backend.model.deployment.kamelet.KameletBindingStatus["conditions"]->java.util.ArrayList[0])
 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.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
 at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
 at io.fabric8.kubernetes.client.utils.serialization.SettableBeanPropertyDelegate.deserializeAndSet(SettableBeanPropertyDelegate.java:131)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
 at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
 at io.fabric8.kubernetes.client.utils.serialization.SettableBeanPropertyDelegate.deserializeAndSet(SettableBeanPropertyDelegate.java:131)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
 at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
 at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4650)
 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2831)
 at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:3295)
 at io.fabric8.kubernetes.internal.KubernetesDeserializer.fromObjectNode(KubernetesDeserializer.java:130)
 at io.fabric8.kubernetes.internal.KubernetesDeserializer.deserialize(KubernetesDeserializer.java:94)
 at io.fabric8.kubernetes.internal.KubernetesDeserializer.deserialize(KubernetesDeserializer.java:45)
 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
 at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
 at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
 at io.fabric8.kubernetes.client.utils.serialization.SettableBeanPropertyDelegate.deserializeAndSet(SettableBeanPropertyDelegate.java:131)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
 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:3674)
 at io.fabric8.kubernetes.client.utils.Serialization.unmarshal(Serialization.java:317)
 ... 19 more
 

Using a simple send and receive from slack:

apiVersion: camel.apache.org/v1alpha1
group: camel.apache.org
kind: KameletBinding
metadata:
  additionalProperties: {}
  finalizers: []
  managedFields: []
  name: integration
  ownerReferences: []
plural: kameletbindings
scope: Namespaced
served: true
singular: kameletbinding
spec:
  source:
    ref:
      apiVersion: camel.apache.org/v1alpha1
      name: slack-source
      kind: Kamelet
    properties:
      channel: $HIDDEN
      token: $ HIDDEN
  sink:
    ref:
      apiVersion: camel.apache.org/v1alpha1
      name: slack-sink
      kind: Kamelet
    properties:
      channel: test
      webhookUrl: $HIDDEN
      username: kaoto
storage: true
version: v1alpha1

Tried using the kaoto operator at: https://github.com/KonduitAI/kaoto-operator (just changed some ports nothing else)

with the latest camel-k at:

 https://github.com/apache/camel-k/releases/download/1.10.0-nightly/camel-k-client-1.10.0-nightly-linux-64bit.tar.gz

I'm guessing this is a jackson incompatibility, a missing annotation or an incompatible property? Maybe missing an @JsonIgnore?
Main issue is here:

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of ```
io.kaoto.backend.model.deployment.kamelet.KameletBindingStatus$Condition` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

Missing creators usually mean there wasn't an empty constructor or an annotation constructor jackson could use to create the relevant object.

Edit: Looking at this on master it appears an empty constructor is already there?
https://github.com/KaotoIO/kaoto-backend/blob/main/kamelet-support/src/main/java/io/kaoto/backend/model/deployment/kamelet/KameletBindingStatus.java#L86

How often do the snapshots get updated? Could this just be me needing to build a newer version?

Environment (please complete the following information):

  • OS: [e.g. "Linux 5.10.0-9-amd64 Using sonarcloud action to add details on PR #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux"] Running latest minikube on a fedora 35 host.
  • Output of the mvn -version` command
  • Kaoto Version [e.g. 1.0] nightly

Additional context
Add any other context about the problem here.

@agibsonccc agibsonccc added the bug Something isn't working label Jul 12, 2022
@agibsonccc agibsonccc changed the title [BUG] [BUG] Jackson Serialization issue with kaoto frontend nightly Jul 12, 2022
@Delawen
Copy link
Member

Delawen commented Jul 22, 2022

This seems to happen in native Quarkus and not in "java" mode.

@Delawen
Copy link
Member

Delawen commented Jul 22, 2022

How often do the snapshots get updated? Could this just be me needing to build a newer version?

They are nightly so it shouldn't be an old version mess up.

@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 20, 2022
@Delawen Delawen closed this as completed Sep 21, 2022
@Delawen
Copy link
Member

Delawen commented Sep 21, 2022

This was fixed in #134

@Delawen Delawen removed the wontfix This will not be worked on label May 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants