<?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 to create entity  because column name exceeds 30 characters</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110249065" />
  <subtitle>Unable to create entity  because column name exceeds 30 characters</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110249065</id>
  <updated>2026-10-15T12:00:19Z</updated>
  <dc:date>2026-10-15T12:00:19Z</dc:date>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118320291" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118320291</id>
    <updated>2020-01-23T08:45:27Z</updated>
    <published>2020-01-23T08:45:27Z</published>
    <summary type="html">See &lt;a href="https://issues.liferay.com/browse/LRDOCS-5449"&gt;https://issues.liferay.com/browse/LRDOCS-5449 &lt;/a&gt;for an alternative solution</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2020-01-23T08:45:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118319828" />
    <author>
      <name>Pankaj Kumar</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118319828</id>
    <updated>2020-01-23T03:39:28Z</updated>
    <published>2020-01-23T03:39:28Z</published>
    <summary type="html">It&amp;#39;s worked for me in DXP 7.2</summary>
    <dc:creator>Pankaj Kumar</dc:creator>
    <dc:date>2020-01-23T03:39:28Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118163660" />
    <author>
      <name>Manushi Jani</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118163660</id>
    <updated>2019-12-28T23:30:32Z</updated>
    <published>2019-12-28T23:30:32Z</published>
    <summary type="html">&amp;lt;p&amp;gt;This works perfect for liferay 7.0,7.1,7.2.&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;p&amp;gt;Thanks a lot!!&amp;lt;/p&amp;gt;</summary>
    <dc:creator>Manushi Jani</dc:creator>
    <dc:date>2019-12-28T23:30:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118163362" />
    <author>
      <name>Manushi Jani</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118163362</id>
    <updated>2019-12-28T23:29:12Z</updated>
    <published>2019-12-28T23:29:12Z</published>
    <summary type="html">&lt;blockquote&gt;&lt;br /&gt;&amp;lt;blockquote&amp;gt;&lt;br /&gt;  &amp;lt;div class=&amp;#34;quote-title&amp;#34;&amp;gt;William Berks:&amp;lt;/div&amp;gt;&lt;br /&gt;  &amp;lt;div class=&amp;#34;quote&amp;#34;&amp;gt;&lt;br /&gt;    &amp;lt;div class=&amp;#34;quote-content&amp;#34;&amp;gt;&lt;br /&gt;      &amp;lt;p&amp;gt;The DTD, &amp;lt;a&lt;br /&gt;        href=&amp;#34;http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd&amp;#34;&amp;gt;http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd&amp;lt;/a&amp;gt;,&lt;br /&gt;        does not define a &amp;#39;database-name-max-length&amp;#39; attribute for the&lt;br /&gt;        service-builder element.  If I try to add it anyway, I still get&lt;br /&gt;        the name length error when trying to run the service builder.&amp;lt;/p&amp;gt;&lt;br /&gt;      &amp;lt;p&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;      &amp;lt;p&amp;gt;I would love to change the column name, but this is an existing database.&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt; This seems to be fixed in&lt;br /&gt; http://www.liferay.com/dtd/liferay-service-builder_7_1_0.dtd. The&lt;br /&gt;attribute is now allowed.&lt;/blockquote&gt;&lt;br /&gt;This is not allowed in Liferay 7.2</summary>
    <dc:creator>Manushi Jani</dc:creator>
    <dc:date>2019-12-28T23:29:12Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112862586" />
    <author>
      <name>Kevin Neibarger</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112862586</id>
    <updated>2019-03-22T14:39:52Z</updated>
    <published>2019-03-22T14:39:52Z</published>
    <summary type="html">&lt;blockquote&gt;David H Nebinger&amp;lt;p&amp;gt;30 chars sounds like enough, but when you specify the namespace and&lt;br /&gt;  use Java-standard naming, SB will create the table as&lt;br /&gt;  NAMESPACE_ENTITYNAME and that often will exceed the 30.&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt; &amp;lt;/p&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Is there anyway for the service builder to ignore appending the namespace? In my 6.2 legacy code entities were created without actual tables to serve as placeholders. It was done this way to wrap FinderImpl which called SQL queries. Since the module-hbm.xml appends the namespace for tables we get all kinds of compile errors on the generated classes. Worst case scenario I can pull out these &amp;#34;empty&amp;#34; entities and manually build the api behind them, but it would work better if we could just ignore the namespace appended to the entity name.</summary>
    <dc:creator>Kevin Neibarger</dc:creator>
    <dc:date>2019-03-22T14:39:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111578083" />
    <author>
      <name>John O'Flaherty</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111578083</id>
    <updated>2018-11-16T12:03:39Z</updated>
    <published>2018-11-16T12:03:39Z</published>
    <summary type="html">Thanks &lt;span
  style="color: inherit;font-family: inherit;font-size: 14.0px;"&gt;Pasi
  Kössi, another reason to move to 7.1 :)&lt;/span&gt;</summary>
    <dc:creator>John O'Flaherty</dc:creator>
    <dc:date>2018-11-16T12:03:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111549467" />
    <author>
      <name>Pasi Kössi</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111549467</id>
    <updated>2018-11-14T14:40:20Z</updated>
    <published>2018-11-14T14:40:20Z</published>
    <summary type="html">&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;William Berks:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;The DTD, &lt;a
        href="http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd"&gt;http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd&lt;/a&gt;,
        does not define a 'database-name-max-length' attribute for the
        service-builder element.  If I try to add it anyway, I still get
        the name length error when trying to run the service builder.&lt;/p&gt;
      &lt;p&gt; &lt;/p&gt;
      &lt;p&gt;I would love to change the column name, but this is an existing database.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
 This seems to be fixed in
 http://www.liferay.com/dtd/liferay-service-builder_7_1_0.dtd. The
attribute is now allowed.</summary>
    <dc:creator>Pasi Kössi</dc:creator>
    <dc:date>2018-11-14T14:40:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110720767" />
    <author>
      <name>John O'Flaherty</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110720767</id>
    <updated>2018-08-16T15:44:01Z</updated>
    <published>2018-08-16T15:44:01Z</published>
    <summary type="html">&lt;p&gt;Hi William,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I was able to set the following and service builder didn't throw any
  issues for me. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&amp;lt;service-builder database-name-max-length=&amp;quot;999&amp;quot;
  package-path=&amp;quot;com.qad.meetingroomdisplays&amp;quot;&amp;gt;&lt;br /&gt;   
   &amp;lt;author&amp;gt;j2o&amp;lt;/author&amp;gt;&lt;br /&gt;   
   &amp;lt;namespace&amp;gt;MeetingRoomDisplays&amp;lt;/namespace&amp;gt;&lt;br /&gt;   
   &amp;lt;database-name-max-length&amp;gt;999&amp;lt;/database-name-max-length&amp;gt;&lt;br /&gt;  &lt;/p&gt;
&lt;p&gt;I hope that helps,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;John&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>John O'Flaherty</dc:creator>
    <dc:date>2018-08-16T15:44:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110637329" />
    <author>
      <name>Surendra K</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110637329</id>
    <updated>2018-07-25T07:46:18Z</updated>
    <published>2018-07-25T07:46:18Z</published>
    <summary type="html">&lt;p&gt;Hi William&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Add databaseNameMaxLength=100 attribute in build.gradle file of your
  service module.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;ex&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;buildService {&lt;br /&gt;     apiDir =
  &amp;quot;../microservices-api/src/main/java&amp;quot;&lt;br /&gt;   
   databaseNameMaxLength=100&lt;br /&gt; }&lt;/p&gt;</summary>
    <dc:creator>Surendra K</dc:creator>
    <dc:date>2018-07-25T07:46:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110611745" />
    <author>
      <name>William Berks</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110611745</id>
    <updated>2018-07-20T23:29:21Z</updated>
    <published>2018-07-20T23:29:21Z</published>
    <summary type="html">&lt;p&gt;The DTD, &lt;a
  href="http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd"&gt;http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd&lt;/a&gt;,
  does not define a 'database-name-max-length' attribute for the
  service-builder element.  If I try to add it anyway, I still get the
  name length error when trying to run the service builder.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I would love to change the column name, but this is an existing database.&lt;/p&gt;</summary>
    <dc:creator>William Berks</dc:creator>
    <dc:date>2018-07-20T23:29:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110344287" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110344287</id>
    <updated>2018-06-26T17:18:02Z</updated>
    <published>2018-06-26T17:18:02Z</published>
    <summary type="html">&lt;p&gt;30 chars sounds like enough, but when you specify the namespace and
  use Java-standard naming, SB will create the table as
  NAMESPACE_ENTITYNAME and that often will exceed the 30.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2018-06-26T17:18:02Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110317155" />
    <author>
      <name>Jorge Diaz</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110317155</id>
    <updated>2018-06-22T05:43:11Z</updated>
    <published>2018-06-22T05:43:11Z</published>
    <summary type="html">&lt;p&gt;Oracle database 12.1 and older versions don't support table names
  longer than 30 characters, see: https://stackoverflow.com/questions/756558/what-is-the-maximum-length-of-a-table-name-in-oracle#756569&lt;/p&gt;</summary>
    <dc:creator>Jorge Diaz</dc:creator>
    <dc:date>2018-06-22T05:43:11Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110251310" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110251310</id>
    <updated>2018-06-21T15:30:07Z</updated>
    <published>2018-06-21T15:30:07Z</published>
    <summary type="html">&lt;p&gt;In your service.xml file, &amp;lt;service-builder /&amp;gt; is the root
  element.  Add the &amp;quot;database-name-max-length&amp;quot; attribute on
  the root element.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Me, I never really do this.  I tend to use nice clean entity names
  per java standards, but I'll also add the db-name and table-name
  attributes on the &amp;lt;entity /&amp;gt; and &amp;lt;column /&amp;gt; tags to use
  more compressed names following db naming standards.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Note that the 30 char max was for those DBs where this kind of thing
  can be a PITA to identify and resolve, so putting the message in early
  was seen  as a way to prevent getting all the way down the road only
  to encounter it during deployment.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2018-06-21T15:30:07Z</dc:date>
  </entry>
  <entry>
    <title>Unable to create entity  because column name exceeds 30 characters</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110249064" />
    <author>
      <name>John O'Flaherty</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110249064</id>
    <updated>2018-06-21T14:39:30Z</updated>
    <published>2018-06-21T14:39:30Z</published>
    <summary type="html">&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I am in the process of migrating 6.2 portlet code over to DXP, many
  issues mostly resolved however this one eludes me as yet. In my
  service.xml we can have table and column names longer than 30
  characters. In 6.2 this didn't seem to cause any issues however in DXP
  i get the below message: &lt;/p&gt;
&lt;p&gt;
  &lt;strong&gt;Unable to create entity  because column name exceeds 30
    characters. Some databases do not allow column names longer than 30
    characters. To disable this warning set the
    &amp;quot;service-builder&amp;quot; attribute
    &amp;quot;database-name-max-length&amp;quot; to the max length that your
    database supports. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This is a clear message about whats happened, however what isn't
  clear is to where to set this attribute and value. It would be helpful
  to be able to set for both table names and column names.&lt;/p&gt;
&lt;p&gt;I'd appreciate any assistance ,&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;John&lt;/p&gt;</summary>
    <dc:creator>John O'Flaherty</dc:creator>
    <dc:date>2018-06-21T14:39:30Z</dc:date>
  </entry>
</feed>
