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

Error with datamapper #10

Open
rhuss opened this issue Aug 8, 2017 · 3 comments
Open

Error with datamapper #10

rhuss opened this issue Aug 8, 2017 · 3 comments

Comments

@rhuss
Copy link
Contributor

rhuss commented Aug 8, 2017

When deploying an integration with a datamapper included:

---
flows:
- steps:
  - kind: endpoint
    uri: twitter-mention
  - kind: endpoint
    uri: atlas:mapping-step-2.json
  - kind: log
    message: Hello, I was mentioned ${body}
    loggingLevel: INFO
  - kind: endpoint
    uri: salesforce-upsert-contact

and with this mapping file

{
  "AtlasMapping": {
    "jsonType": "io.atlasmap.v2.AtlasMapping",
    "dataSource": [
      {
        "jsonType": "io.atlasmap.v2.DataSource",
        "id": "twitter4j.Status",
        "uri": "atlas:java?className=twitter4j.Status",
        "dataSourceType": "SOURCE"
      },
      {
        "jsonType": "io.atlasmap.v2.DataSource",
        "id": "io.syndesis.connector.salesforce.Contact",
        "uri": "atlas:java?className=io.syndesis.connector.salesforce.Contact",
        "dataSourceType": "TARGET"
      }
    ],
    "mappings": {
      "mapping": [
        {
          "jsonType": "io.atlasmap.v2.Mapping",
          "mappingType": "MAP",
          "inputField": [
            {
              "jsonType": "io.atlasmap.java.v2.JavaField",
              "name": "screenName",
              "path": "/user/screenName",
              "fieldType": "STRING",
              "docId": "twitter4j.Status"
            }
          ],
          "outputField": [
            {
              "jsonType": "io.atlasmap.java.v2.JavaField",
              "name": "TwitterScreenName__c",
              "path": "/TwitterScreenName__c",
              "fieldType": "STRING",
              "docId": "io.syndesis.connector.salesforce.Contact"
            }
          ]
        }
      ]
    },
    "name": "UI.486657",
    "lookupTables": {
      "lookupTable": []
    },
    "properties": {
      "property": []
    }
  }
}

I get the following error:

com.mediadriver.atlas.api.v2.AtlasValidationException: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'io.atlasmap.v2.AtlasMapping' into a subtype of [simple type, class com.mediadriver.atlas.v2.AtlasMapping]: no such class found
 at [Source: java.io.InputStreamReader@fe38a6f; line: 1, column: 29]
	at com.mediadriver.atlas.core.v2.AtlasMappingService.loadMappingJson(AtlasMappingService.java:123)
	at org.apache.camel.component.atlasmap.AtlasEndpoint.onExchange(AtlasEndpoint.java:180)
	at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)
	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:541)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)

It seems that somewhere still the package com.mediadriver.atlas is referenced but should be io.atlasmap

@jimmidyson any idea where this comes from ?

@dsimansk
Copy link
Member

dsimansk commented Aug 8, 2017

@rhuss I've seen it today also and I suspect old version of camel-atlasmap that was released on 26th Apr.

@rhuss
Copy link
Contributor Author

rhuss commented Aug 8, 2017

@dsimansk you are right: The json mapping references the new io.atlasmap, but thats nothing on the classpath for this old component. I will update the camel-atlasmap to the latest version.

@rhuss
Copy link
Contributor Author

rhuss commented Aug 8, 2017

Openend issue at atlasmap-attic/camel-atlasmap#9 for that. Is not so trivial, though as we need to re-implement some missing features.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants