<?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 CDS Import error in JAVA in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800346#M4806228</link>
    <description>&lt;P&gt; Normally, this should just work with VS Code. Have you checked if the class not being found is actually available in the srv/src/gen/java folder structure? If it is not you need to check your build configuration. If it is available your VS Code Java LSP does not recognize the additional source folder. You can add some Maven configuration in the srv/pom.xml file that helps IDEs to discover additional source folders. Please check this article for further details: &lt;A rel="nofollow" href="https://www.baeldung.com/maven-add-src-directories"&gt;https://www.baeldung.com/maven-add-src-directories&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;That's most probably all I can do for you on this channel. If the issue persists you can open a ticket on our internal channels (as you're an SAP employee).&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2023 07:47:03 GMT</pubDate>
    <dc:creator>robinjayasinghe</dc:creator>
    <dc:date>2023-10-12T07:47:03Z</dc:date>
    <item>
      <title>CAP CDS Import error in JAVA</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaq-p/12800343</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
  &lt;P&gt;I am getting "&lt;EM&gt;&lt;STRONG&gt;The import cds cannot be resolvedJava(268435846)" &lt;/STRONG&gt;&lt;/EM&gt;in my CAP JAVA project.&lt;/P&gt;
  &lt;P&gt;I updated the project from pom.xml file and also cleaned and reloaded the java server from command center but still facing the same issue.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2216631-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt; Is there something I need to config to get rid of these?&lt;/P&gt;
  &lt;P&gt;Thanks for your Help&lt;/P&gt;
  &lt;P&gt;Cheers&lt;/P&gt;
  &lt;P&gt;Saurav&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 04:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaq-p/12800343</guid>
      <dc:creator>Saurav</dc:creator>
      <dc:date>2023-10-11T04:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: CAP CDS Import error in JAVA</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800344#M4806226</link>
      <description>&lt;P&gt;The build error you see indicates that the IDE cannot resolve the code that is being generated from the CDS sources of your project. Have you already performed a full Maven build of your project? You could do so by calling "mvn compile" on the commandline (the terminal view of your IDE). After that you can reload the Java server one more time.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 06:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800344#M4806226</guid>
      <dc:creator>robinjayasinghe</dc:creator>
      <dc:date>2023-10-11T06:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: CAP CDS Import error in JAVA</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800345#M4806227</link>
      <description>&lt;P&gt;Hi Robin,&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;I did that compilation and again reloaded the Java server but still facing same issue.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 15:41:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800345#M4806227</guid>
      <dc:creator>Saurav</dc:creator>
      <dc:date>2023-10-11T15:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: CAP CDS Import error in JAVA</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800346#M4806228</link>
      <description>&lt;P&gt; Normally, this should just work with VS Code. Have you checked if the class not being found is actually available in the srv/src/gen/java folder structure? If it is not you need to check your build configuration. If it is available your VS Code Java LSP does not recognize the additional source folder. You can add some Maven configuration in the srv/pom.xml file that helps IDEs to discover additional source folders. Please check this article for further details: &lt;A rel="nofollow" href="https://www.baeldung.com/maven-add-src-directories"&gt;https://www.baeldung.com/maven-add-src-directories&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;That's most probably all I can do for you on this channel. If the issue persists you can open a ticket on our internal channels (as you're an SAP employee).&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 07:47:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800346#M4806228</guid>
      <dc:creator>robinjayasinghe</dc:creator>
      <dc:date>2023-10-12T07:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: CAP CDS Import error in JAVA</title>
      <link>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800347#M4806229</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;I noticed that I had the same issue and I was working on an SAP Tutorial for CAP Java. I don't seem to be the only one either as someone as already created a post about it. &lt;A href="https://answers.sap.com/questions/13961026/an-error-occurs-in-steps-1-3-of-cap-tutorial-exten.html"&gt;An error occurs in steps 1-3 of CAP Tutorial 'Extend the bookstore with custom code' | SAP Community&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I get the following error in my handler file. Path is srv/src/main/java/com/sap/cap/bookstore/handlers/OrdersService.java&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2223608-handler-error.png" /&gt;&lt;/P&gt;&lt;P&gt;When I go into the Java file for this import. I get the following warning for the package name.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2223610-java-file-warning.png" /&gt;&lt;/P&gt;&lt;P&gt;The path for the Java file is srv/src/gen/java/cds/gen/ordersservice/OrdersService_.java&lt;/P&gt;&lt;P&gt;It seems like the issue is the Java file isn't in the classpath for the project. How would I adjust the classpath when the project is in BAS, is this something I need to add to the pom.xml file?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Silas&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 15:00:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cap-cds-import-error-in-java/qaa-p/12800347#M4806229</guid>
      <dc:creator>SilasL</dc:creator>
      <dc:date>2023-10-26T15:00:34Z</dc:date>
    </item>
  </channel>
</rss>

