Symptom
When running "mvn clean package install" in a CAP project on BTP BAS (Full Stack Cloud Application space), the build fails with errors like:
cannot find symbol: method getHeaderKey()
cannot find symbol: method getDocumentType()
cannot find symbol: method getCompanyCode()
The errors point to generated VDM classes under:
com/sap/cloud/sdk/s4hana/datamodel/odata/namespaces/<service>/
The methods appear to exist when opening the files in the IDE, but the compiler cannot find them. The code itself has not been changed.
Read more...
Environment
- SAP BTP Business Application Studio (Full Stack Cloud Application space)
- CAP (Cloud Application Programming Model) project
- Maven build (mvn clean package install)
- BAS runtime: SapMachine JDK 25 (upgraded from earlier version)
Product
Keywords
BTP, BAS, mvn, getXXX(), cannot find symbol, method getHeaderKey(), dependencies, SapMachine, JDK, Lombok, IDE , KBA , BC-XS-CDX-JAV , SAP CAP – Java runtime , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview