<?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>Unable find model model.impl.TestImpl java.lang.ClassNotFoundException:</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110216947" />
  <subtitle>Unable find model model.impl.TestImpl java.lang.ClassNotFoundException:</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110216947</id>
  <updated>2026-04-03T20:01:23Z</updated>
  <dc:date>2026-04-03T20:01:23Z</dc:date>
  <entry>
    <title>RE: Unable find model model.impl.TestImpl java.lang.ClassNotFoundException:</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110232980" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110232980</id>
    <updated>2018-06-20T18:01:09Z</updated>
    <published>2018-06-20T18:01:09Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Right, but for DXP you should not use TestLocalServiceUtil.&lt;/p&gt;
&lt;p&gt;Instead, your class should have the @Component annotation, then
  somewhere inside you'd have like:&lt;/p&gt;
&lt;p&gt;
  &lt;code&gt;@Reference&amp;lt;br&amp;gt; private TestLocalService _testLocalService;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Then your actual Liferay DXP code becomes:&lt;/p&gt;
&lt;p&gt;
  &lt;code&gt;DynamicQuery dynamic = _testLocalService.dynamicQuery();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also, as&amp;nbsp; a side note, in 6.2 you could also (and should also) have
  used TestLocalService.dynamicQuery() as it avoids the class loader issues.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2018-06-20T18:01:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable find model model.impl.TestImpl java.lang.ClassNotFoundException:</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110231483" />
    <author>
      <name>Kiran Yalavali</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110231483</id>
    <updated>2018-06-20T15:53:33Z</updated>
    <published>2018-06-20T15:53:33Z</published>
    <summary type="html">&lt;p&gt;Thanks david for your quick response,&lt;/p&gt;
&lt;p&gt;these issue was resolved following below code for change in Liferay DXP.&lt;/p&gt;
&lt;p&gt;In liferay 6.2   DynamicQuery dynamic =DynamicQueryFactoryUtil.forClass(Test.class);&lt;/p&gt;
&lt;p&gt;In liferay DXP   DynamicQuery dynamic = TestLocalServiceUtil.dynamicQuery();&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kiran.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Kiran Yalavali</dc:creator>
    <dc:date>2018-06-20T15:53:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable find model model.impl.TestImpl java.lang.ClassNotFoundException:</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110217302" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110217302</id>
    <updated>2018-06-19T16:31:05Z</updated>
    <published>2018-06-19T16:31:05Z</published>
    <summary type="html">&lt;p&gt;If you are using DXP, you should not be using the static util class.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Change over to the TestLocalService and have it injected using OSGi's
  @Reference annotation.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2018-06-19T16:31:05Z</dc:date>
  </entry>
  <entry>
    <title>Unable find model model.impl.TestImpl java.lang.ClassNotFoundException:</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110216946" />
    <author>
      <name>Kiran Yalavali</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110216946</id>
    <updated>2018-06-19T14:31:27Z</updated>
    <published>2018-06-19T14:31:27Z</published>
    <summary type="html">&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;currently I'm working on Liferay dxp EE &lt;/p&gt;
&lt;p&gt;How to Resolve this issue  &lt;strong&gt;[DynamicQueryFactoryImpl:103]
    Unable find model model.impl.TestImpl&lt;br /&gt;
    java.lang.ClassNotFoundException: model.impl.TestImpl &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But In liferay dxp i'm using below dynamic query&lt;/p&gt;
&lt;p&gt;DynamicQuery dynn = TestLocalServiceUtil.dynamicQuery();&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please advice me it's very helpful.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Kiran.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Kiran Yalavali</dc:creator>
    <dc:date>2018-06-19T14:31:27Z</dc:date>
  </entry>
</feed>
