Struggling to use the mapping model code generation

Hi i try to generate the mapping code for a very simple mapping model. (one field in one field out)

But i struggling to generate the mapping code. I properly missing something simple.

Is there any example how to use it ?

java.exe -jar kernel-md-datatransfer-codegen-30.3.0-MappingCodeGenerator-CLI-Experimental.jar -d C:\dev\projects\poc-ergo-use-mapping-models\models\simpleMappingDemo -m InputToOutput -o test1
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See SLF4J Error Codes for further details.
Exception in thread “main” java.lang.RuntimeException: unexpected problem or warning during code generation: Message2RankedNotification{message=‘The field was not found in the model. [feldUnbekannt]’, severity=ERROR, source=null}
at com.mgmtp.a12.kernel.md.datatransfer.a12internal.mappingmodel.cli.MappingModelCodegenCLI.lambda$main$6(MappingModelCodegenCLI.java:110)
at com.mgmtp.a12.kernel.md.datatransfer.internal.mappingmodel.MappingModelUtils.lambda$getMappingModelForCodegen$1(MappingModelUtils.java:101)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at com.mgmtp.a12.kernel.md.datatransfer.internal.mappingmodel.FixedShapeMappingModelForCodegen.validateMappingModel(FixedShapeMappingModelForCodegen.java:821)
at com.mgmtp.a12.kernel.md.datatransfer.internal.mappingmodel.FixedShapeMappingModelForCodegen.of(FixedShapeMappingModelForCodegen.java:119)
at com.mgmtp.a12.kernel.md.datatransfer.internal.mappingmodel.MappingModelUtils.getMappingModelForCodegen(MappingModelUtils.java:100)
at com.mgmtp.a12.kernel.md.datatransfer.internal.AbstractDataTransferCodeGenerator.generateDataTransferCode(AbstractDataTransferCodeGenerator.java:85)
at com.mgmtp.a12.kernel.md.datatransfer.internal.DataTransferCodeGenerator.generateDataTransferCodeStatic(DataTransferCodeGenerator.java:49)
at com.mgmtp.a12.kernel.md.datatransfer.a12internal.mappingmodel.MappingModelService.generateMappingCode(MappingModelService.java:142)
at com.mgmtp.a12.kernel.md.datatransfer.a12internal.mappingmodel.cli.MappingModelCodegenCLI.main(MappingModelCodegenCLI.java:104)

Hey @julian-typed-spruce , could you please attach the models here?

Hi sure

Input.json (1011 Bytes)

InputToOutputSMM.json (445 Bytes)

InputToOutput.json (857 Bytes)

Output.json (1014 Bytes)

Hey @julian-typed-spruce ,

unfortunately there is a bug so one can not reach the mapping code generation. It is fixed in 2025.06-ext4. As a workaround:

  • remove the attribute “ui_name” from the Mapping Model (line 30)
  • remove the additive-document annotation from the Precomputation Model.

We maintain an example based on the Project Template, please contact PS, if you are interested.

There we implemented a gradle task that takes care of these prerquisites.