<?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: CAP - Java &amp;gt;  Sqlite db access in Eclipse IDE in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490098#M4679927</link>
    <description>&lt;P&gt;It looks like the spring and cds config have been mixed up. There is no "cds.datasource.url" property, but only a "spring.datasource.url" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;Maybe that is what you wanted to do?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;---
spring:
  config.activate.on-profile: default
  datasource:
    url: "jdbc:sqlite:C://Users//Somnath//eclipse-workspace//orderDemo//sqlite.db"
    driver-class-name: org.sqlite.JDBC
    initialization-mode: never
cds:
  datasource:
    auto-config.enabled: false&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Oct 2021 06:54:57 GMT</pubDate>
    <dc:creator>marcbecker</dc:creator>
    <dc:date>2021-10-08T06:54:57Z</dc:date>
    <item>
      <title>CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaq-p/12490094</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;New to CAP Java Domain, so question may sound bit basic &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;I am using eclipse IDE to create simple CAP Java application. While trying to use sqlite db , facing challenge to integrate with the DB and running spring-boot:run&lt;/P&gt;
  &lt;P&gt;Steps follow:&lt;/P&gt;
  &lt;P&gt;1. basic scenam.cds / service.cds done and I can run spring-boot:run command and it works &lt;/P&gt;
  &lt;P&gt;2. now added sqlite3 as a dev depedency and executed cds deploy --to sql command which created sqlite.db file under project root directoy. &lt;/P&gt;
  &lt;P&gt;3. sqlite3 is already installed in my windows machine also, PATH variable is updated. &lt;/P&gt;
  &lt;P&gt;So when I am running spring-boot:run command it fails &lt;/P&gt;
  &lt;P&gt;with below error:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.sap.c
ds.framework.spring.config.runtime.CdsRuntimeInitializer': Unsatisfied dependency expressed through field
'services'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating be
an with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boo
t/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; n
ested exception is org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execut
e database script from resource [URL [file:/C:/Users/Somnath/eclipse-workspace/orderDemo/srv/target/classe
s/schema.sql]]; nested exception is java.lang.IllegalArgumentException: 'script' must not be null or empty
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Do I need to make certain changes in application.yaml file... or something else I need to take care of?&lt;/P&gt;
  &lt;P&gt;If you please suggest. &lt;/P&gt;
  &lt;P&gt;Thanks in advance!&lt;/P&gt;
  &lt;P&gt;-BR.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 05:07:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaq-p/12490094</guid>
      <dc:creator>somnath</dc:creator>
      <dc:date>2021-10-05T05:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490095#M4679924</link>
      <description>&lt;P&gt;What is your application.yaml configuration?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 07:24:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490095#M4679924</guid>
      <dc:creator>marcbecker</dc:creator>
      <dc:date>2021-10-05T07:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490096#M4679925</link>
      <description>&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;Here is the settings for application.yaml file&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;---
spring:
  config.activate.on-profile: default
cds:
  datasource:
    auto-config.enabled: false
    url: "jdbc:sqlite:C://Users//Somnath//eclipse-workspace//orderDemo//sqlite.db"
    driver-class-name: org.sqlite.JDBC
    initialization-mode: never


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Oct 2021 08:34:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490096#M4679925</guid>
      <dc:creator>somnath</dc:creator>
      <dc:date>2021-10-05T08:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490097#M4679926</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;marcbecker&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Could you please share your views, if I need make any corrections in application.yaml.&lt;/P&gt;&lt;P&gt;- Thanks, Somnath&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 03:16:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490097#M4679926</guid>
      <dc:creator>somnath</dc:creator>
      <dc:date>2021-10-08T03:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490098#M4679927</link>
      <description>&lt;P&gt;It looks like the spring and cds config have been mixed up. There is no "cds.datasource.url" property, but only a "spring.datasource.url" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;Maybe that is what you wanted to do?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;---
spring:
  config.activate.on-profile: default
  datasource:
    url: "jdbc:sqlite:C://Users//Somnath//eclipse-workspace//orderDemo//sqlite.db"
    driver-class-name: org.sqlite.JDBC
    initialization-mode: never
cds:
  datasource:
    auto-config.enabled: false&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Oct 2021 06:54:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490098#M4679927</guid>
      <dc:creator>marcbecker</dc:creator>
      <dc:date>2021-10-08T06:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490099#M4679928</link>
      <description>&lt;P&gt;Thank you so much &lt;SPAN class="mention-scrubbed"&gt;marcbecker&lt;/SPAN&gt;. Yes it solved my problem, but along with this I had to change a little few things and mentioning here in case this helps to someone. &lt;/P&gt;&lt;P&gt; I finally set the application.yaml file as below: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;---
spring:
  config.activate.on-profile: default
  datasource:
    auto-config.enabled: false
    url: "jdbc:sqlite:C://Users//Somnath//eclipse-workspace//orderDemo//sqlite.db"
    jdbc.driver: org.sqlite.JDBC
    initialization-mode: never&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As I encountered another problem : "Cannot load driver class: org.sqlite. JDBC"&lt;/P&gt;&lt;P&gt;So I add pom dependency: &lt;A href="https://stackoverflow.com/questions/25420284/spring-boot-cannot-load-jdbc-driver-class-org-sqlite-jdbc" target="_blank"&gt;Link&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dependency&amp;gt;
&amp;lt;groupId&amp;gt;org.xerial&amp;lt;/groupId&amp;gt;
&amp;lt;artifactId&amp;gt;sqlite-jdbc&amp;lt;/artifactId&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks again Marc! &lt;/P&gt;&lt;P&gt;Closing this thread as answered.&lt;/P&gt;&lt;P&gt;BR.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 03:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490099#M4679928</guid>
      <dc:creator>somnath</dc:creator>
      <dc:date>2021-10-11T03:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: CAP - Java &gt;  Sqlite db access in Eclipse IDE</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490100#M4679929</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;The spring.datasource.auto-config.enabled property however does not exist. &lt;BR /&gt;There is only a cds.datasource.auto-config.enabled property. &lt;/P&gt;&lt;P&gt;Nevertheless setting that property is not required in your scenario, when explicitly specifying a spring.datasource.url property, as that anyway turns of the auto configuration of datasources from service bindings.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Marc&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 06:57:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-java-gt-sqlite-db-access-in-eclipse-ide/qaa-p/12490100#M4679929</guid>
      <dc:creator>marcbecker</dc:creator>
      <dc:date>2021-10-11T06:57:08Z</dc:date>
    </item>
  </channel>
</rss>

