kyal2000 opened a new issue #2534:
URL: https://github.com/apache/camel-k/issues/2534


   We already discussed this one on Zulip:
   
   Dennis Wiesemann: I want to use a AtlasMap mapping in my Route
   My Route looks as follows:
   ```
   from("timer:java?period=10000")
                 .setBody()
                   .constant(<JSON Object>)
                 .to("log:info")
                 .to("atlasmap:pricesJsonXml.adm")
                 .to("log:info");
   ```
   Run command: `kamel run --dev -n demo-case AtlasTest.java --source 
pricesJsonXml.adm --compression`
   
   I'm getting this error: `AtlasMap context cannot initialize without mapping 
definition, ignoring: Mapping URI=null`
   With an NullPointerException
   
   Does anyone know where this comes from?
   
   Thanks in advance
   
   Aurélien Pupier: I think the --source is not the right argument:
   from kamel run --help:
   --source stringArray             Add source file to your integration, this 
is added to the list of files listed as arguments of the command
   I think it should be --resource to use:
   --resource stringArray           Add a runtime resource from a Configmap, a 
Secret or a file (syntax: [configmap|secret|file]:name[/key][@path], where name 
represents the local file path or the configmap/secret name, key optionally 
represents the configmap/secret key to be filtered and path represents the 
destination path)
   
   Dennis Wiesemann: Yes you're right my bad i copied the wrong command i 
already used --resource
   
   Luca Burgazzoli: does it work with --resource ?
   
   Dennis Wiesemann: No i get this error with --resource
   
   Luca Burgazzoli: can you try with 'atlasmap:classpath:/pricesJsonXml.adm'
   
   Dennis Wiesemann: Got the same exception
   
   Luca Burgazzoli: ok, one last attempt
   
   Luca Burgazzoli: --resource file:pricesJsonXml.adm@/tmp/pricesJsonXml.adm
   
   Luca Burgazzoli: then atlasmap:file:/tmp/pricesJsonXml.adm
   
   Dennis Wiesemann: When running the run command i get:
   panic: runtime error: invalid memory address or nil pointer dereference
   
   Luca Burgazzoli: which version of camel k ?
   
   Dennis Wiesemann: 1.5
   
   Luca Burgazzoli: try without the @
   
   Luca Burgazzoli: --resource file:pricesJsonXml.adm
   
   Luca Burgazzoli: then atlasmap:file:/etc/camel/resources/pricesJsonXml.adm
   
   Luca Burgazzoli: Dennis Wiesemann said:
   
   When running the run command i get:
   panic: runtime error: invalid memory address or nil pointer dereference
   
   @Pasquale Congiusti ^^^
   
   Dennis Wiesemann: First of all sorry
   Forgot to upgrade the local kamel client :-)
   now both alternatives throw the same NullPointerException as before
   
   Luca Burgazzoli: ok, needs to be investigated more
   
   Luca Burgazzoli: mind opening an issue ?
   
   Dennis Wiesemann: Okay i'll open one


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to