<?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>Dependency issue for JournalArticle Impl in Liferay 7.1</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110921561" />
  <subtitle>Dependency issue for JournalArticle Impl in Liferay 7.1</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110921561</id>
  <updated>2026-04-06T04:27:12Z</updated>
  <dc:date>2026-04-06T04:27:12Z</dc:date>
  <entry>
    <title>RE: Dependency issue for JournalArticle Impl in Liferay 7.1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110956056" />
    <author>
      <name>Amos Fong</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110956056</id>
    <updated>2018-09-14T18:16:09Z</updated>
    <published>2018-09-14T18:16:09Z</published>
    <summary type="html">&lt;p&gt;You could select the journalArticle.resourcePrimKey instead and then
  retrieve the journalArticles yourself via the journalArticleLocalService&lt;/p&gt;</summary>
    <dc:creator>Amos Fong</dc:creator>
    <dc:date>2018-09-14T18:16:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: Dependency issue for JournalArticle Impl in Liferay 7.1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110928917" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110928917</id>
    <updated>2018-09-11T16:16:38Z</updated>
    <published>2018-09-11T16:16:38Z</published>
    <summary type="html">&lt;p&gt;I'm not sure there's a workable solution for this.&lt;/p&gt;
&lt;p&gt;The different entities are parts of different class loaders.  You may
  not be able to cross these boundaries so easily.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2018-09-11T16:16:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Dependency issue for JournalArticle Impl in Liferay 7.1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110922266" />
    <author>
      <name>deveshree zawar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110922266</id>
    <updated>2018-09-11T07:57:34Z</updated>
    <published>2018-09-11T07:57:34Z</published>
    <summary type="html">&lt;p&gt;Hi david,&lt;/p&gt;
&lt;p&gt;I am trying to get result from multiple table with inner join. So
  created custom sql for the journal article table.&lt;/p&gt;
&lt;p&gt;&amp;lt;custom-sql&amp;gt;&lt;br /&gt;     &amp;lt;sql id =
  &amp;quot;com.acc.bby.service.persistence.ConfigurationFinder.findJournalArticleByCategoryIds&amp;quot;&amp;gt;&lt;br /&gt;
      SELECT * FROM journalarticle ja &lt;br /&gt;     INNER JOIN assetentry
  ae ON ae.classPK = ja.resourcePrimKey&lt;br /&gt;     INNER JOIN
  assetentryassetcategoryrel ae_at ON ae.entryId =
  ae_at.assetEntryId&lt;br /&gt;     INNER JOIN assetcategory tags ON
  ae_at.assetCategoryId = tags.categoryId &lt;br /&gt;     WHERE
  tags.categoryId IN (?) AND  ja.status = (?);&lt;br /&gt;   
   &amp;lt;/sql&amp;gt;&lt;br /&gt; &amp;lt;/custom-sql&amp;gt;&lt;/p&gt;
&lt;p&gt;Attached is my FinderImpl class.&lt;/p&gt;
&lt;p&gt;I am facing issue on adding the entity :&lt;/p&gt;
&lt;p&gt;query.addEntity(&amp;quot;JournalArticle&amp;quot;, JournalArticleImpl.class));&lt;/p&gt;
&lt;p&gt;I have tried accessing the JournalArticleImpl class using the class
  loader as well as the above line, but m facing the dependency issues.&lt;/p&gt;</summary>
    <dc:creator>deveshree zawar</dc:creator>
    <dc:date>2018-09-11T07:57:34Z</dc:date>
  </entry>
  <entry>
    <title>RE: Dependency issue for JournalArticle Impl in Liferay 7.1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110921931" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110921931</id>
    <updated>2018-09-11T07:17:14Z</updated>
    <published>2018-09-11T07:17:14Z</published>
    <summary type="html">&lt;p&gt;JournalArticleImpl is not in the portal's class loader.  With using
  PortalClassLoaderUtil.getClassLoader(), you are asking for the
  portal's class loader which will not have the JournalArticleImpl class
  in it.&lt;/p&gt;
&lt;p&gt;I'm not sure what you're doing, but you may find it a bit easier to
  just use a dynamic query.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2018-09-11T07:17:14Z</dc:date>
  </entry>
  <entry>
    <title>Dependency issue for JournalArticle Impl in Liferay 7.1</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110921560" />
    <author>
      <name>deveshree zawar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110921560</id>
    <updated>2018-09-11T06:44:34Z</updated>
    <published>2018-09-11T06:44:34Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am accessing the journal article impl class for the custom sql i
  have created.&lt;/p&gt;
&lt;p&gt;Below is my piece of code:&lt;/p&gt;
&lt;p&gt;SQLQuery query = session.createSQLQuery(sql);&lt;br /&gt;       
   query.setCacheable(false);&lt;br /&gt;       
   query.addEntity(&amp;quot;JournalArticle&amp;quot;, PortalClassLoaderUtil.getClassLoader().loadClass(&amp;quot;com.liferay.journal.model.impl.JournalArticleImpl&amp;quot;));&lt;/p&gt;
&lt;p&gt;I have below dependencies in build.gradle:&lt;/p&gt;
&lt;p&gt;compileOnly group: 'com.liferay', name:
  'com.liferay.journal.service', version: '2.0.2'  &lt;br /&gt;   
   compileOnly group: &amp;quot;com.liferay.portal&amp;quot;, name:
  &amp;quot;com.liferay.portal.impl&amp;quot;, version: &amp;quot;2.32.0&amp;quot;&lt;br /&gt;
      compileOnly group: &amp;quot;com.liferay&amp;quot;, name:
  &amp;quot;com.liferay.journal.api&amp;quot;, version: &amp;quot;2.0.0&amp;quot;&lt;br /&gt;
      compileOnly group: &amp;quot;com.liferay&amp;quot;, name:
  &amp;quot;com.liferay.journal.web&amp;quot;, version: &amp;quot;1.5.0&amp;quot;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;But i am getting the below error : &lt;/p&gt;
&lt;div&gt;
  &lt;p&gt;
    &lt;span&gt;
      &lt;span&gt;
        &lt;span&gt;
          &lt;span&gt;Unresolved requirement: Import-Package:
            com.liferay.journal.model.impl; version=&amp;quot;[1.0.0,2.0.0)&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p&gt;
    &lt;span&gt;
      &lt;span&gt;
        &lt;span&gt;
          &lt;span&gt;java.lang.ClassNotFoundException: com.liferay.journal.model.impl.JournalArticleImpl&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p&gt; &lt;/p&gt;
  &lt;p&gt;
    &lt;span&gt;
      &lt;span&gt;
        &lt;span&gt;
          &lt;span&gt;Not finding any relevant dependency to be added in build.gradle.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p&gt;
    &lt;span&gt;
      &lt;span&gt;
        &lt;span&gt;
          &lt;span&gt;Any help would be appreciated.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</summary>
    <dc:creator>deveshree zawar</dc:creator>
    <dc:date>2018-09-11T06:44:34Z</dc:date>
  </entry>
</feed>
