Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-2158

Error upon adding country without setting the priority

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 1.1.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Hi,

       

      could you please assist to Jan Rodan in the issue below:

       

      "First steps with Commerce and I run into a DB insert issue during Country creation. Maybe I have to create Bug therefore because our Use Case to have more than one country cannot be shown:

       

      2019-03-18 15:25:04.790 ERROR [http-nio-8080-exec-6][JDBCExceptionReporter:234] Batch entry 0 insert into CommerceCountry (uuid_, groupId, companyId, userId, userName, createDate, modifiedDate, name, billingAllowed, shippingAllowed, twoLettersISOCode, threeLettersISOCode, numericISOCode, subjectToVAT, priority, active_, lastPublishDate, commerceCountryId) values ('7ebc1719-8764-cd24-f703-2df2ff720792', 39361, 20099, 20139, 'Test Test', '2019-03-18 15:25:04.749000+00', '2019-03-18 15:25:04.749000+00', '<?xml version=''1.0'' encoding=''UTF-8''?><root available-locales="en_US" default-locale="en_US"><Name language-id="en_US">Germany</Name></root>', 'TRUE', 'TRUE', 'DE', 'GER', 0, 'TRUE', 0.0, 'TRUE', NULL, 39715) was aborted: ERROR: duplicate key value violates unique constraint "ix_d84b0322"_  Detail: Key (groupid, numericisocode)=(39361, 0) already exists.  Call getNextException to see other errors in the batch. [Sanitized]
      
      2019-03-18 15:25:04.794 ERROR [http-nio-8080-exec-6][JDBCExceptionReporter:234] ERROR: duplicate key value violates unique constraint "ix_d84b0322"_  Detail: Key (groupid, numericisocode)=(39361, 0) already exists. [Sanitized]
      
      2019-03-18 15:25:04.841 ERROR [http-nio-8080-exec-6][PortletServlet:112] javax.portlet.PortletException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      
      javax.portlet.PortletException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      
       at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand.processAction(BaseMVCActionCommand.java:69)
      

       

      You can reproduce the error if you add country without setting the priority and then add a second one by doing the same. You manually have to set the priority. Doing that, the error did not occur."

       

      Thanks a lot!

        Attachments

          Activity

            People

            Assignee:
            sandor.vida Sandor Vida
            Reporter:
            sandor.vida Sandor Vida
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package