<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117969213" />
  <subtitle>Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117969213</id>
  <updated>2026-04-06T18:26:34Z</updated>
  <dc:date>2026-04-06T18:26:34Z</dc:date>
  <entry>
    <title>RE: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118016631" />
    <author>
      <name>Pankaj Kumar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118016631</id>
    <updated>2019-12-07T07:39:29Z</updated>
    <published>2019-12-07T07:39:29Z</published>
    <summary type="html">I used com.liferay.portal.dao.orm.custom.sql.api dependence  and its start working.</summary>
    <dc:creator>Pankaj Kumar</dc:creator>
    <dc:date>2019-12-07T07:39:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118003385" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118003385</id>
    <updated>2019-12-05T11:38:47Z</updated>
    <published>2019-12-05T11:38:47Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;krishna patel:&lt;/div&gt;&lt;blockquote&gt;&lt;br /&gt;Hi pankaj,&lt;br /&gt;Have you tried compileInclude to add dependency at runtime?&lt;br /&gt;compileInclude group: &amp;#39;com.liferay&amp;#39;, name: &amp;#39;com.liferay.portal.dao.orm.custom.sql&amp;#39;, version: &amp;#39;1.0.3&amp;#39;&lt;br /&gt;&lt;br /&gt;You can also include or exclude the transitive dependencies by,&lt;br /&gt;​​​​​​​compileInclude group: &amp;#39;com.liferay&amp;#39;, name: &amp;#39;com.liferay.portal.dao.orm.custom.sql&amp;#39;, version: &amp;#39;1.0.3&amp;#39;, transitive:false&lt;br /&gt;&lt;/blockquote&gt;Nope, &lt;strong&gt;do not just try compileInclude randomly&lt;/strong&gt;, and &lt;strong&gt;especially not on Liferay-delivered dependencies&lt;/strong&gt;.&lt;br /&gt;Coming back to the original post: @Reference provides a reference to a service - in order to use CustomSQL, I&amp;#39;d expect that you&amp;#39;ll have to use an additional filter to determine &lt;em&gt;which&lt;/em&gt; customSQL you&amp;#39;d like - that is provided that customSQL is registered as service at all. &lt;br /&gt;I currently have no code available to check, but with a pure reference and no filter, this is definitely not what you expect.</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2019-12-05T11:38:47Z</dc:date>
  </entry>
  <entry>
    <title>RE: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118002685" />
    <author>
      <name>krishna patel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118002685</id>
    <updated>2019-12-05T11:12:02Z</updated>
    <published>2019-12-05T11:12:02Z</published>
    <summary type="html">Hi pankaj,&lt;br /&gt;Have you tried compileInclude to add dependency at runtime?&lt;br /&gt;compileInclude group: &amp;#39;com.liferay&amp;#39;, name: &amp;#39;com.liferay.portal.dao.orm.custom.sql&amp;#39;, version: &amp;#39;1.0.3&amp;#39;&lt;br /&gt;&lt;br /&gt;You can also include or exclude the transitive dependencies by,&lt;br /&gt;​​​​​​​compileInclude group: &amp;#39;com.liferay&amp;#39;, name: &amp;#39;com.liferay.portal.dao.orm.custom.sql&amp;#39;, version: &amp;#39;1.0.3&amp;#39;, transitive:false</summary>
    <dc:creator>krishna patel</dc:creator>
    <dc:date>2019-12-05T11:12:02Z</dc:date>
  </entry>
  <entry>
    <title>RE: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117974818" />
    <author>
      <name>Pankaj Kumar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117974818</id>
    <updated>2019-12-04T14:28:13Z</updated>
    <published>2019-12-04T14:28:13Z</published>
    <summary type="html">Hi Chris,&lt;br /&gt;I tried that option getting below error.&lt;br /&gt;java.lang.NoClassDefFoundError: Lcom/liferay/portal/dao/orm/custom/sql/CustomSQLUtil;</summary>
    <dc:creator>Pankaj Kumar</dc:creator>
    <dc:date>2019-12-04T14:28:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117970650" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117970650</id>
    <updated>2019-12-04T08:30:39Z</updated>
    <published>2019-12-04T08:30:39Z</published>
    <summary type="html">You need CustomSQLUtil.&lt;br /&gt;Add the following to your gradle dependencies. Then you should be able to use it in your code.&lt;br /&gt;compileOnly &amp;#39;com.liferay:com.liferay.portal.dao.orm.custom.sql:1.0.0&amp;#39;&lt;a href="https://mvnrepository.com/artifact/com.liferay/com.liferay.portal.dao.orm.custom.sql"&gt;&lt;br /&gt;&lt;/a&gt;</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2019-12-04T08:30:39Z</dc:date>
  </entry>
  <entry>
    <title>Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117969212" />
    <author>
      <name>Pankaj Kumar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117969212</id>
    <updated>2019-12-04T06:33:51Z</updated>
    <published>2019-12-04T06:33:51Z</published>
    <summary type="html">Hi All,I am using Liferay DXP 7.2.While calling custom sql i am getting below error &lt;br /&gt;Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL, but class was expected&lt;br /&gt;&lt;br /&gt;I am using @Reference&lt;br /&gt;    private CustomSQL _customSQL;&lt;br /&gt;&lt;br /&gt;to read the custom sql file.&lt;br /&gt;Can any body help me on this.</summary>
    <dc:creator>Pankaj Kumar</dc:creator>
    <dc:date>2019-12-04T06:33:51Z</dc:date>
  </entry>
</feed>
