<?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>Liferay 7.4 Service Builder Error [NoClassDefFoundError]</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122317087" />
  <subtitle>Liferay 7.4 Service Builder Error [NoClassDefFoundError]</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122317087</id>
  <updated>2026-04-06T09:19:39Z</updated>
  <dc:date>2026-04-06T09:19:39Z</dc:date>
  <entry>
    <title>RE: RE: Liferay 7 Service Builder Error [NoClassDefFoundError]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122323118" />
    <author>
      <name>Sumair Ahmed</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122323118</id>
    <updated>2024-01-24T06:31:09Z</updated>
    <published>2024-01-05T07:58:03Z</published>
    <summary type="html">&lt;p&gt;I did buildService by using gradle gw buildService. It's working now. &lt;/p&gt;
&lt;p&gt;Thanks for the assistance. &lt;/p&gt;</summary>
    <dc:creator>Sumair Ahmed</dc:creator>
    <dc:date>2024-01-05T07:58:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Liferay 7 Service Builder Error [NoClassDefFoundError]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122320941" />
    <author>
      <name>Roselaine Marques</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122320941</id>
    <updated>2024-01-04T10:15:38Z</updated>
    <published>2024-01-04T10:15:38Z</published>
    <summary type="html">&lt;p&gt;And which version the &lt;em&gt;com.liferay.gradle.plugins.workspace&lt;/em&gt;
  is using inside &lt;em&gt;settings.gradle&lt;/em&gt; in your workspace? Have you
  updated it? &lt;/p&gt;</summary>
    <dc:creator>Roselaine Marques</dc:creator>
    <dc:date>2024-01-04T10:15:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Liferay 7 Service Builder Error [NoClassDefFoundError]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122318986" />
    <author>
      <name>Sumair Ahmed</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122318986</id>
    <updated>2024-01-24T06:31:09Z</updated>
    <published>2024-01-03T11:16:59Z</published>
    <summary type="html">&lt;p&gt;Any leads?&lt;/p&gt;
&lt;p&gt;Also, I have tried by changing the JDK, and using 7.4 GA105 to build.&lt;/p&gt;</summary>
    <dc:creator>Sumair Ahmed</dc:creator>
    <dc:date>2024-01-03T11:16:59Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Liferay 7 Service Builder Error [NoClassDefFoundError]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122317304" />
    <author>
      <name>Sumair Ahmed</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122317304</id>
    <updated>2024-01-24T06:31:09Z</updated>
    <published>2024-01-02T10:00:25Z</published>
    <summary type="html">&lt;p&gt;Using portal-7.4-ga105&lt;/p&gt;</summary>
    <dc:creator>Sumair Ahmed</dc:creator>
    <dc:date>2024-01-02T10:00:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7 Service Builder Error [NoClassDefFoundError]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122317144" />
    <author>
      <name>Roselaine Marques</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122317144</id>
    <updated>2024-01-02T09:59:31Z</updated>
    <published>2024-01-02T09:59:30Z</published>
    <summary type="html">&lt;p&gt;Which DXP version are you using?&lt;/p&gt;
&lt;p&gt;You can see in your $Liferay_Workspace/gradle.properties the value
  configured in the property -&amp;gt; &lt;strong&gt; liferay.workspace.product&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Roselaine Marques</dc:creator>
    <dc:date>2024-01-02T09:59:30Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.4 Service Builder Error [NoClassDefFoundError]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122317086" />
    <author>
      <name>Sumair Ahmed</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122317086</id>
    <updated>2024-01-24T06:31:09Z</updated>
    <published>2024-01-02T08:41:16Z</published>
    <summary type="html">&lt;p&gt;I am using Liferay Dev Studio to create the Liferay module project
  and select &lt;strong&gt;service-builder&lt;/strong&gt; template. &lt;/p&gt;
&lt;p&gt;When it's created and run the gradle &lt;strong&gt;buldService&lt;/strong&gt; it
  gives following error&lt;/p&gt;
&lt;p&gt;Task :modules:new-portlet:new-portlet-service:&lt;strong&gt;buildService FAILED&lt;/strong&gt;
  &lt;br&gt; Exception in thread &amp;quot;main&amp;quot;
    java.lang.&lt;strong&gt;NoClassDefFoundError: com/liferay/petra/string/StringBundler&lt;/strong&gt;
  &lt;br&gt;     at
  com.liferay.portal.kernel.util.Validator.&amp;lt;clinit&amp;gt;(Validator.java:1205)&lt;br&gt;
      at
  com.liferay.portal.tools.ArgumentsMap.get(ArgumentsMap.java:30)&lt;br&gt;   
   at
  com.liferay.portal.tools.ArgumentsMap.get(ArgumentsMap.java:24)&lt;br&gt;   
   at
  com.liferay.portal.tools.service.builder.ServiceBuilder.main(ServiceBuilder.java:172)&lt;br&gt;
  Caused by: java.lang.ClassNotFoundException:
  com.liferay.petra.string.StringBundler&lt;br&gt;     at
  java.net.URLClassLoader.findClass(Unknown Source)&lt;br&gt;     at
  java.lang.ClassLoader.loadClass(Unknown Source)&lt;br&gt;     at
  java.lang.ClassLoader.loadClass(Unknown Source)&lt;br&gt;     ... 4 more&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;My &lt;strong&gt;build.gradle&lt;/strong&gt; file look like this&lt;/p&gt;
&lt;p&gt;apply plugin: &amp;quot;com.liferay.portal.tools.service.builder&amp;quot;&lt;/p&gt;
&lt;p&gt;dependencies {&lt;br&gt;     implementation
  project(&amp;quot;:modules:new-portlet:new-portlet-api&amp;quot;)&lt;br&gt;    &lt;br&gt;
      implementation
  &amp;quot;com.liferay.portal:release.portal.api&amp;quot;&lt;br&gt; }&lt;/p&gt;
&lt;p&gt;
  &lt;br&gt; buildService {&lt;br&gt;     apiDir =
  &amp;quot;../xyz-portlet-api/src/main/java&amp;quot;&lt;br&gt; }&lt;/p&gt;
&lt;p&gt;group = &amp;quot;com.sibisoft.northstar.xyz&amp;quot;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I have added below petra String but the issue remains same&lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;    compileOnly group: 'com.liferay', name: 'com.liferay.petra.string'&lt;/strong&gt;
  &lt;br&gt;  &lt;/p&gt;</summary>
    <dc:creator>Sumair Ahmed</dc:creator>
    <dc:date>2024-01-02T08:41:16Z</dc:date>
  </entry>
</feed>
