Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102319

Exception in console when create a custom field with very long name

    Details

      Description

      Steps to reproduce:

      1. Start portal and login.
      2. Go to "Custom Field" and select anyone, like Blog.
      3. Create a custom field for blog, input a name longer than 75 characters, press "save" button.

      Expected result:
      Custom field can be saved, or a error message shows like "The name is too long".

      Actual result:
      User is redirected back to previous page, and exception in console.

      2019-09-25 15:03:36.325 ERROR [http-nio-8080-exec-8][JDBCExceptionReporter:234] Data truncation: Data too long for column 'name' at row 1
      2019-09-25 15:03:36.329 ERROR [http-nio-8080-exec-8][PortletServlet:112] javax.portlet.PortletException: java.lang.RuntimeException: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into ExpandoColumn (companyId, tableId, name, type_, defaultData, typeSettings, columnId) values (?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: Could not execute JDBC batch update
      javax.portlet.PortletException: java.lang.RuntimeException: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; SQL [insert into ExpandoColumn (companyId, tableId, name, type_, defaultData, typeSettings, columnId) values (?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: Could not execute JDBC batch update
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:203)
      	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:418)
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:95)
      	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:260)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
      	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
      	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)
      

        Attachments

          Activity

            People

            • Assignee:
              sharry.shi Sharry Shi
              Reporter:
              hong.zhao Hong Zhao
              Participants of an Issue:
              Recent user:
              Tomas Polesovsky (topolik)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                9 weeks ago

                Packages

                Version Package
                Master