<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: SAP CAP project with persistent database: Error - missing localized_* tables in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/13859999#M4882707</link>
    <description>&lt;P&gt;Hi I know this is an old post but I am currently doing this same training project and I have the same issue. I'm surprised there isn't a more definitive solution 4 years later but I got it to work. I have had this problem before on other frameworks and the problem lies in the package-lock.json file. Delete that file, do an 'npm install' and redeploy with 'cds deploy'. That should refresh the package-lock file and update all the settings and work.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 19:45:54 GMT</pubDate>
    <dc:creator>MattRook</dc:creator>
    <dc:date>2024-09-09T19:45:54Z</dc:date>
    <item>
      <title>SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaq-p/12131428</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I am trying to run the sample bookshop app provided in the SAP CAP samples(&lt;A href="https://github.com/SAP-samples/cloud-cap-samples"&gt;https://github.com/SAP-samples/cloud-cap-samples&lt;/A&gt;). It runs as expected when using the default in-memory sqlite database (which is the default setting). If I try to change the settings to use a persistent sqlite database, the services are throwing errors of form: &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SQLITE_ERROR: no such table: localized_&amp;lt;service-name&amp;gt;_&amp;lt;entitiy-name&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:4004/browse/Books" target="test_blank"&gt;http://localhost:4004/browse/Books&lt;/A&gt;


&amp;lt;error xmlns="http://docs.oasis-open.org/odata/ns/metadata"&amp;gt;
&amp;lt;code&amp;gt;500&amp;lt;/code&amp;gt;
&amp;lt;message&amp;gt;SQLITE_ERROR: no such table: localized_CatalogService_Books&amp;lt;/message&amp;gt;
&amp;lt;/error&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Following is a step by step detail of what I've done. Any insight into what might be going wrong and how to fix it would be very much appreciated. Thanks!&lt;/P&gt;
  &lt;P&gt;Clone sample apps from &lt;A href="https://github.com/SAP-samples/cloud-cap-samples"&gt;https://github.com/SAP-samples/cloud-cap-samples&lt;/A&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;cd cloud-cap-samples/
npm i
npm run bookshop
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The default configuration runs the sqlite database in-memory. In order to use the persistent database, do following changes: &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;cd packages/bookshop
cds deploy --to sqlite:my.db
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The cds deploy command will create a persistent database and fill the necessary tables using sample CSV data files. It also updates the package.json with cds configuration to use a persistent database instead of the default in-memory database. You should see console messages like following:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;gt; filling sap.capire.bookshop.Authors from db/data/sap.capire.bookshop-Authors.csv
 &amp;gt; filling sap.capire.bookshop.Books from db/data/sap.capire.bookshop-Books.csv
 &amp;gt; filling sap.capire.bookshop.Books_texts from db/data/sap.capire.bookshop-Books_texts.csv
 &amp;gt; filling sap.capire.bookshop.OrderItems from db/data/sap.capire.bookshop-OrderItems.csv
 &amp;gt; filling sap.capire.bookshop.Orders from db/data/sap.capire.bookshop-Orders.csv
 &amp;gt; filling sap.common.Currencies from db/data/sap.common-Currencies.csv
 &amp;gt; filling sap.common.Currencies_texts from db/data/sap.common-Currencies_texts.csv
/&amp;gt; successfully deployed to ./my.db
 &amp;gt; updated ./package.json
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The package.json should have an updated "cds" section as follows - &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;"cds": {
    "requires": {
      "db": {
        "kind": "sqlite",
        "model": "db/schema.cds",
        "credentials": {
          "database": "my.db"
        }
      }
    }
  }&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Now, if we trigger command 'cds run', the cds should start serving using the persistent database.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;cds run&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;[cds] - connect to datasource - sqlite:my.db
[cds] - serving AdminService at /admin
[cds] - serving CatalogService at /browse - with impl: srv/cat-service.js
[cds] - service definitions loaded from:


  app/index.cds
  srv/admin-service.cds
  srv/cat-service.cds
  app/admin/fiori-service.cds
  app/browse/fiori-service.cds
  app/orders/fiori-service.cds
  app/common.cds
  db/schema.cds
  ../../node_modules/@sap/cds/common.cds


[cds] - launched in: 1303.835ms
[cds] - server listening on &lt;A href="http://localhost:4004" target="test_blank"&gt;http://localhost:4004&lt;/A&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Now, if you go to link &lt;A href="http://localhost:4004/browse/Books" target="test_blank"&gt;http://localhost:4004/browse/Books&lt;/A&gt;, it shows following error:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;error xmlns="http://docs.oasis-open.org/odata/ns/metadata"&amp;gt;
&amp;lt;code&amp;gt;500&amp;lt;/code&amp;gt;
&amp;lt;message&amp;gt;SQLITE_ERROR: no such table: localized_CatalogService_Books&amp;lt;/message&amp;gt;
&amp;lt;/error&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 05:23:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaq-p/12131428</guid>
      <dc:creator>iashishsingh</dc:creator>
      <dc:date>2020-02-18T05:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131429#M4533381</link>
      <description>&lt;P&gt;Dear Ashish,&lt;/P&gt;&lt;P&gt;Thanks for reporting this issue, it seems like a bug!&lt;BR /&gt;Which version of `@sap/cds` are you using? You can find this information by typing `cds -v`.&lt;/P&gt;&lt;P&gt;I tested it with `@sap/cds: 3.21.3` and it works fine.&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;BR /&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 06:04:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131429#M4533381</guid>
      <dc:creator>david_kunz2</dc:creator>
      <dc:date>2020-02-18T06:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131430#M4533382</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;Thanks for your quick reply! &lt;/P&gt;&lt;P&gt;My machine also has the same 3.21.3 version. Here is the output of `cds -v`:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@sap/cds-dk: 1.4.4
@sap/cds: 3.21.3
@sap/cds-compiler: 1.21.1
@sap/cds-foss: 1.1.0
@sap/cds-messaging: 1.5.0
@sap/cds-reflect: 2.9.2
@sap/cds-rest: 1.3.0
@sap/cds-services: 1.22.0
@sap/generator-cds: 2.11.1
Node.js: v10.16.0&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The bookshop/package.json has "@sap/cds": "latest" under "dependencies".&lt;/P&gt;&lt;P&gt;Sorry, I did not clearly understand you. Is it a bug in cds or does it look like a setup issue at my end?&lt;/P&gt;&lt;P&gt;Thanks David!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 06:29:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131430#M4533382</guid>
      <dc:creator>iashishsingh</dc:creator>
      <dc:date>2020-02-18T06:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131431#M4533383</link>
      <description>&lt;P&gt;Some additional information:&lt;/P&gt;&lt;P&gt;If I deploy the same app to SAP HANA cloud using the guide: &lt;A href="https://cap.cloud.sap/docs/advanced/deploy-to-cloud"&gt;https://cap.cloud.sap/docs/advanced/deploy-to-cloud&lt;/A&gt;, the service works fine as expected. The issue appears to be occurring when using the persistent database as sqlite.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 06:32:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131431#M4533383</guid>
      <dc:creator>iashishsingh</dc:creator>
      <dc:date>2020-02-18T06:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131432#M4533384</link>
      <description>&lt;P&gt;Great question, well formed and lots of detail. Nice work! &lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 07:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131432#M4533384</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2020-02-18T07:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131433#M4533385</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;dj.adams.sap&lt;/SPAN&gt; and thanks! Have learned a lot from your live recordings which I discovered very recently on Youtube. Can't appreciate you enough for the efforts you have been making!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 07:16:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131433#M4533385</guid>
      <dc:creator>iashishsingh</dc:creator>
      <dc:date>2020-02-18T07:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131434#M4533386</link>
      <description>&lt;P&gt;Could you change the `model` property in package.json to &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"model": ["db", "srv"]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and try again?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 08:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131434#M4533386</guid>
      <dc:creator>chgeo</dc:creator>
      <dc:date>2020-02-19T08:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131435#M4533387</link>
      <description>&lt;P&gt;Hi Christian. Thanks for your suggestion! I tried changing it to &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"model": ["db", "srv"]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but getting the same error as before. To make it easier for the error to be reproduced, I've pushed my changes under a fork of cloud-cap-samples repo here: &lt;A href="https://github.com/git-ashish/cloud-cap-samples"&gt;https://github.com/git-ashish/cloud-cap-samples&lt;/A&gt;. The changes have been made to packages/bookshop folder.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 05:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131435#M4533387</guid>
      <dc:creator>iashishsingh</dc:creator>
      <dc:date>2020-02-20T05:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131436#M4533388</link>
      <description>&lt;P&gt;We have analysed the issue and will fix it in the next release (around next week).  As a workaround you can revert this &lt;A href="https://github.com/SAP-samples/cloud-cap-samples/commit/02469acebb5b66bf843e29f6f5eafe26cf4b33aa"&gt;commit&lt;/A&gt; in the bookshop repository.&lt;/P&gt;&lt;P&gt;Anyways, thanks for reporting!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 13:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131436#M4533388</guid>
      <dc:creator>chgeo</dc:creator>
      <dc:date>2020-02-20T13:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131437#M4533389</link>
      <description>&lt;P&gt;Thanks Christian! Reverting this &lt;A href="https://github.com/SAP-samples/cloud-cap-samples/commit/02469acebb5b66bf843e29f6f5eafe26cf4b33aa"&gt;commit&lt;/A&gt; did not solve the error but looking forward the fix in the next release!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 12:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131437#M4533389</guid>
      <dc:creator>iashishsingh</dc:creator>
      <dc:date>2020-02-21T12:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131438#M4533390</link>
      <description>&lt;P&gt;Hi  @&lt;SPAN class="mention-scrubbed"&gt;christian.georgi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; the issue is with this package.json file. I delete this lines in the json and all run fine:&lt;/P&gt;&lt;P&gt; "requires": {
 "db": {
 "kind": "sqlite",
 "model": [
 "db",
 "srv"
 ],
 "credentials": {
 "database": "sqlite.db"
 }
 }
 }&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 02:46:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131438#M4533390</guid>
      <dc:creator>jalf1991</dc:creator>
      <dc:date>2020-06-02T02:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131439#M4533391</link>
      <description>&lt;P&gt;Instead of &lt;STRONG&gt;cds run&lt;/STRONG&gt; command try the following command&lt;/P&gt;&lt;P&gt;npx nodemon -e cds,csv,properties -w app -w db -x "cds deploy &amp;amp;&amp;amp; cds run"&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 04:57:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131439#M4533391</guid>
      <dc:creator>former_member643578</dc:creator>
      <dc:date>2020-07-02T04:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131440#M4533392</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;i have similar issues after deployment to CFm but just using in-memory db!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 14:56:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131440#M4533392</guid>
      <dc:creator>hschaefer123</dc:creator>
      <dc:date>2020-09-25T14:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131441#M4533393</link>
      <description>&lt;P&gt;Hey, I faced the same problem with the localized-error. Did you find a solving?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 09:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131441#M4533393</guid>
      <dc:creator>NicolasSchwarz</dc:creator>
      <dc:date>2021-01-21T09:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131442#M4533394</link>
      <description>&lt;P&gt;This really does the trick. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 00:05:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131442#M4533394</guid>
      <dc:creator>former_member214945</dc:creator>
      <dc:date>2021-05-07T00:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131443#M4533395</link>
      <description>&lt;P&gt;This really does work, thank you!  Can you explain what this command is doing differently than just normal cds deploy followed by cds run?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 00:35:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/12131443#M4533395</guid>
      <dc:creator>jasonmuzzy</dc:creator>
      <dc:date>2021-06-09T00:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAP CAP project with persistent database: Error - missing localized_* tables</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/13859999#M4882707</link>
      <description>&lt;P&gt;Hi I know this is an old post but I am currently doing this same training project and I have the same issue. I'm surprised there isn't a more definitive solution 4 years later but I got it to work. I have had this problem before on other frameworks and the problem lies in the package-lock.json file. Delete that file, do an 'npm install' and redeploy with 'cds deploy'. That should refresh the package-lock file and update all the settings and work.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 19:45:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-cap-project-with-persistent-database-error-missing-localized-tables/qaa-p/13859999#M4882707</guid>
      <dc:creator>MattRook</dc:creator>
      <dc:date>2024-09-09T19:45:54Z</dc:date>
    </item>
  </channel>
</rss>

