Skip to Content
Nov 25, 2022 at 12:36 PM

Map hana cloud virtual table with CDS entity in java project

175 Views Last edit Dec 25, 2022 at 01:51 AM 4 rev

I'm trying to connect an existing virtual table that I create in Business Application Studio with a CDS entity.

Ex. my VT name is: com.somedomain.virtualtables::VtAaa
This is a convention and it will be checked at deployment time of my project.

Here is my CDS entity definition:

entity ![com.somedomain.virtualtables::VtAaa] {
  key matnr : String(18);
  key werks : String(4);

On mvn clean compile I get an error:

[ERROR] Stopped execution due to exception: 
java.lang.IllegalArgumentException: not a valid name: Virtualtables::VtAaa_
    at com.squareup.javapoet.Util.checkArgument (
    at com.squareup.javapoet.TypeSpec$Builder.<init> (
    at com.squareup.javapoet.TypeSpec$Builder.<init> (
    at com.squareup.javapoet.TypeSpec.interfaceBuilder (
    at com.squareup.javapoet.TypeSpec.interfaceBuilder (
    at (<br>

So the name of my entity isn't correct and can't be compiled.
I also tried to map my entity with synonym definition to simplify the entity name but then I get errors on HDI deployment that synonym object should contain namespace "com.somedomain.synonyms".