title: Liferay JSF service builder configuration error
body: <p>Am newbie to Liferay. I have created one JSF portlet and added the service builder to it. Using this link <a href="https://dev.liferay.com/pt/develop/tutorials/-/knowledge_base/6-2/using-service-builder-to-generate-a-persistence-fr" rel="nofollow noreferrer">Generate a Persistence Framework</a>. After configure a service builder i have generated the source using service builder. But am getting following exception when build service of project.</p>
  <pre><code> Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: No entity column exist with column database name guestbookId for entity Guestbook
   [echo]     at com.liferay.portal.tools.service.builder.ServiceBuilder._getEntityColumnByColumnDBName(ServiceBuilder.java:4242)
   [echo]     at com.liferay.portal.tools.service.builder.ServiceBuilder._getColumnLengths(ServiceBuilder.java:3857)
   [echo]     at com.liferay.portal.tools.service.builder.ServiceBuilder._createSQLIndexes(ServiceBuilder.java:3355)
   [echo]     at com.liferay.portal.tools.service.builder.ServiceBuilder.&lt;init&gt;(ServiceBuilder.java:796)
   [echo]     at com.liferay.portal.tools.service.builder.ServiceBuilder.main(ServiceBuilder.java:216)
   [echo]     -Dservice.tpl.spring_xml_session=com/liferay/portal/tools/service/builder/dependencies/spring_xml_session.ftl
   [echo] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
  [mkdir] Created dir: D:\liferay\liferay-plugins-sdk-7.0\portlets\jsfguestbook-portlet\docroot\WEB-INF\service-classes
   [copy] Copied 9 empty directories to 9 empty directories under D:\liferay\liferay-plugins-sdk-7.0\portlets\jsfguestbook-portlet\docroot\WEB-INF\service-classes
  [javac] Compiling 38 source files to D:\liferay\liferay-plugins-sdk-7.0\portlets\jsfguestbook-portlet\docroot\WEB-INF\service-classes
  [javac] Note: Some input files use or override a deprecated API.
  [javac] Note: Recompile with -Xlint:deprecation for details.
  [javac] Note: Some input files use unchecked or unsafe operations.
  [javac] Note: Recompile with -Xlint:unchecked for details.
    [jar] Building jar: D:\liferay\liferay-plugins-sdk-7.0\portlets\jsfguestbook-portlet\docroot\WEB-INF\lib\jsfguestbook-portlet-service.jar
  [delete] Deleting directory D:\liferay\liferay-plugins-sdk-7.0\portlets\jsfguestbook-portlet\docroot\WEB-INF\service-classes
  BUILD SUCCESSFUL
  Total time: 8 seconds
  </code></pre>
  <p>Also after built the service i have added the code as per article. I got no method is configured for following code.</p>
  <pre><code>public Guestbook getFirstGuestbookByName(long groupId, String name) throws SystemException {
      Guestbook guestbook = null;
  
      List&lt;Guestbook&gt; guestbooks = guestbookPersistence.findByName(groupId, name); // This method is not exist.
      if (guestbooks != null &amp;&amp; guestbooks.size() &gt; 0) {
          guestbook = guestbooks.get(0);
      }
  
      return guestbook;
  }
  </code></pre>
  <p>My service.xml configuration is follows</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!DOCTYPE service-builder PUBLIC &quot;-//Liferay//DTD Service Builder 7.0.0//EN&quot; &quot;http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd&quot;&gt;
  &lt;service-builder package-path=&quot;com.liferay.docs.guestbook&quot;&gt;
  &lt;author&gt;muthuvignesh.k&lt;/author&gt;
  &lt;namespace&gt;GB&lt;/namespace&gt;
  &lt;entity name=&quot;Guestbook&quot; local-service=&quot;true&quot; uuid=&quot;true&quot;&gt;
  
      &lt;!-- PK fields --&gt;
  
      &lt;column name=&quot;guestbookId&quot; type=&quot;long&quot; primary=&quot;true&quot;&gt;&lt;/column&gt;
  
      &lt;!-- Group instance --&gt;
  
      &lt;column name=&quot;groupId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
  
      &lt;!-- Audit fields --&gt;
  
      &lt;column name=&quot;companyId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;userId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;userName&quot; type=&quot;String&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;createDate&quot; type=&quot;Date&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;modifiedDate&quot; type=&quot;Date&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;name&quot; type=&quot;String&quot;&gt;&lt;/column&gt;
      &lt;finder name=&quot;GroupId&quot; return-type=&quot;Collection&quot;&gt;
          &lt;finder-column name=&quot;groupId&quot;&gt;&lt;/finder-column&gt;
      &lt;/finder&gt;
  &lt;/entity&gt;
  &lt;entity name=&quot;Entry&quot; local-service=&quot;true&quot; uuid=&quot;true&quot;&gt;
  
      &lt;!-- PK fields --&gt;
  
      &lt;column name=&quot;entryId&quot; type=&quot;long&quot; primary=&quot;true&quot;&gt;&lt;/column&gt;
  
      &lt;!-- Group instance --&gt;
  
      &lt;column name=&quot;groupId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
  
      &lt;!-- Audit fields --&gt;
  
      &lt;column name=&quot;companyId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;userId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;userName&quot; type=&quot;String&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;createDate&quot; type=&quot;Date&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;modifiedDate&quot; type=&quot;Date&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;name&quot; type=&quot;String&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;email&quot; type=&quot;String&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;message&quot; type=&quot;String&quot;&gt;&lt;/column&gt;
      &lt;column name=&quot;guestbookId&quot; type=&quot;long&quot;&gt;&lt;/column&gt;
      &lt;finder name=&quot;G_G&quot; return-type=&quot;Collection&quot;&gt;
          &lt;finder-column name=&quot;groupId&quot;&gt;&lt;/finder-column&gt;
          &lt;finder-column name=&quot;guestbookId&quot;&gt;&lt;/finder-column&gt;
      &lt;/finder&gt;
  &lt;/entity&gt;
  &lt;exceptions&gt;
      &lt;exception&gt;GuestbookName&lt;/exception&gt;
      &lt;exception&gt;EntryName&lt;/exception&gt;
      &lt;exception&gt;EntryMessage&lt;/exception&gt;
      &lt;exception&gt;EntryEmail&lt;/exception&gt;
  &lt;/exceptions&gt;
  </code></pre>
  
  <p>Since i have using Liferay 7.0 for this. How to overcome this.</p>