

CAP deploy error: class java.lang.Integer cannot be cast to class java.lang.Stri...
source link: https://answers.sap.com/questions/13762992/cap-deploy-error-class-javalanginteger-cannot-be-c.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CAP deploy error: class java.lang.Integer cannot be cast to class java.lang.String
Hi community,
I'm developing a CAP application in SAP Business Application Studio. When I try to deploy the mtar to cloud foundry, the following error occurrs.
Error building cloud application deploy model: class java.lang.Integer cannot be cast to class java.lang.String<br>

The image below is my project structure.

As you can see, I made the data model and service definition as simple as possible.
db/data-model.cds
namespace poc; entity BusinessPartnerBasicData { key ID : UUID; }<br>
srv/appl-service.cds
using poc as db from '../db/data-model'; Service ApplicationDataService { entity BusinessPartnerBasicData as projection on db.BusinessPartnerBasicData; }
package.json
{ "name": "poc-bp", "version": "1.0.0", "description": "A simple CAP project.", "repository": "<Add your repository here>", "license": "UNLICENSED", "private": true, "dependencies": { "@sap/cds": "^6", "express": "^4", "hdb": "^0.19.0" }, "devDependencies": { "sqlite3": "^5.0.4" }, "scripts": { "start": "cds run", "deploy": "cf deploy mta_archives/poc-bp_1.0.0.mtar" }, "engines": { "node": "^16.15" }, "eslintConfig": { "extends": "eslint:recommended", "env": { "es2020": true, "node": true, "jest": true, "mocha": true }, "globals": { "SELECT": true, "INSERT": true, "UPDATE": true, "DELETE": true, "CREATE": true, "DROP": true, "CDL": true, "CQL": true, "CXL": true, "cds": true }, "rules": { "no-console": "off", "require-atomic-updates": "off" } }, "cds": { "requires": { "[production]": { "db": { "kind": "hana-cloud" } }, "db": { "kind": "sql" } } } }
@sap/cds version: 6.3.2
If I create a project from scratch and add data model via 'cds add samples', deployment works fine. So I guess this is caused by my data model. If someone has experienced the same issue, kindly let me know how you handled this.Thanks,Mio
Recommend
-
18
Solve Error “char cannot be dereferenced” in Java Are you facing the error “char cannot be dereferenced”? So in this article, we’re going to see the main reason behi...
-
13
Solve Error “int cannot be dereferenced” in Java Dereferencing means accessing an object from the heap using a reference variable Or we can say It is a process of accessing the referred value by a reference....
-
13
How to pass an integer variable to another class advertisements I have one class with public int Result; Later in the game I use that variable...
-
11
Solved Error: cannot be cast to java.lang.ComparableThis article will look at how to solve the above-given Class Cast Exception. This ClassCast Exception occurs at runtime when we improperly typecast an object of a class to a related...
-
11
Ruby 3.1 adds try_convert method to Integer class for implicit conversions Aug 3, 2021 , by Jijo Bose 1 minute read Implicit...
-
10
MySQL Error "Incorrect integer value" for column 'name' at row 1″解决方法 2017.11.06 |...
-
2
How to Fix 'Could not find or Load main class error' in Java?Skip to content
-
8
Solving java.lang.OutOfMemoryError: Metaspace error 18 January 202318 January 2023 by
-
10
java.lang.ClassCastException: androidx.appcompat.app.ToolbarActionBar cannot be cast to androidx.appcompat.widget.Toolbar如果您发现本文排版有问题,可以先点击下面的链接切换...
-
2
Eclipse The type java.lang.String cannot be resolved 作者: wencst 分类: JAVA,
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK