Uploaded image for project: 'User Profiles for Confluence'
  1. User Profiles for Confluence
  2. UPC-630

System error when editing profile element with empty Help Texts

    Details

    • Fehlerklasse:
      Mittel
    • Zeitpunkt des Auftretens:
      Abnahme / Betrieb
    • Popularity:
      1

      Description

      Symptom:
      Whenever a user edits a profile element, an error similar to the following one is displayed (and can be found in the logs):

      2015-10-14 11:47:02,380 http-nio-8080-exec-9 ERROR      [o.a.c.c.C.[.[localhost].[/jira].[action]] Servlet.service() for servlet [action] in context with path [/jira] threw exception [com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
          Database:
              - name:H2
              - version:1.4.185 (2015-01-16)
              - minor version:4
              - major version:1
          Driver:
              - name:H2 JDBC Driver
              - version:1.4.185 (2015-01-16)
      
          org.h2.jdbc.JdbcSQLException: Referentielle Integrit├Át verletzt: "FK_AO_2C3287_USER_PROFILE_ELEMENT_HELP_TEXT_ID: PUBLIC.AO_2C3287_USER_PROFILE_ELEMENT FOREIGN KEY(HELP_TEXT_ID) REFERENCES PUBLIC.AO_2C3287_TRANSLATABLE(ID) (2)"
          Referential integrity constraint violation: "FK_AO_2C3287_USER_PROFILE_ELEMENT_HELP_TEXT_ID: PUBLIC.AO_2C3287_USER_PROFILE_ELEMENT FOREIGN KEY(HELP_TEXT_ID) REFERENCES PUBLIC.AO_2C3287_TRANSLATABLE(ID) (2)"; SQL statement:
          DELETE FROM PUBLIC.AO_2C3287_TRANSLATABLE WHERE ID IN (?) [23503-185]] with root cause
          org.h2.jdbc.JdbcSQLException: Referentielle Integrit├Át verletzt: "FK_AO_2C3287_USER_PROFILE_ELEMENT_HELP_TEXT_ID: PUBLIC.AO_2C3287_USER_PROFILE_ELEMENT FOREIGN KEY(HELP_TEXT_ID) REFERENCES PUBLIC.AO_2C3287_TRANSLATABLE(ID) (2)"Referential integrity constraint violation: "FK_AO_2C3287_USER_PROFILE_ELEMENT_HELP_TEXT_ID: PUBLIC.AO_2C3287_USER_PROFILE_ELEMENT FOREIGN KEY(HELP_TEXT_ID) REFERENCES PUBLIC.AO_2C3287_TRANSLATABLE(ID) (2)"; SQL statement:DELETE FROM PUBLIC.AO_2C3287_TRANSLATABLE WHERE ID IN (?) [23503-185]
              at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
              at org.h2.message.DbException.get(DbException.java:179)
              at org.h2.message.DbException.get(DbException.java:155)
              at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:426)
              at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:443)
              at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:318)
              at org.h2.table.Table.fireConstraints(Table.java:920)
              at org.h2.table.Table.fireAfterRow(Table.java:938)
              at org.h2.command.dml.Delete.update(Delete.java:100)
              at org.h2.command.CommandContainer.update(CommandContainer.java:78)
              at org.h2.command.Command.executeUpdate(Command.java:254)
              at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:157)
              at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:143)
              at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
              at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
              at net.java.ao.EntityManager.delete(EntityManager.java:511)
              at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.delete(EntityManagedActiveObjects.java:102)
              at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.delete(TenantAwareActiveObjects.java:271)
              ... 3 filtered
              at java.lang.reflect.Method.invoke(Method.java:497)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
              at com.sun.proxy.$Proxy5056.delete(Unknown Source)
              at de.communardo.atlassian.plugins.userprofile.api.translation.Translatable.delete(Translatable.java:114)
              at de.communardo.atlassian.plugins.userprofile.api.translation.Translatable.store(Translatable.java:93)
              at de.communardo.atlassian.plugins.userprofile.api.configuration.UserProfileElement.store(UserProfileElement.java:406)
              at de.communardo.atlassian.plugins.userprofile.api.configuration.AdditionalUserProfileElement.store(AdditionalUserProfileElement.java:92)
              at de.communardo.atlassian.plugins.userprofile.api.configuration.ConfigurationServiceBase.storeUserProfileElement(ConfigurationServiceBase.java:224)
              at de.communardo.jira.plugins.userprofile.configuration.profileelements.EditProfileElementAction.doExecute(EditProfileElementAction.java:124)
              ... 1 filtered
              at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:67)
              ... 7 filtered
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
              ... 50 filtered
              at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
              ... 147 filtered
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      
      

      How to reproduce:

      1. create a profile element
      2. add values to "Help Text (Default)" and/or "Help Text (German)"
      3. save the element
      4. edit the profile element
      5. remove all values from "Help Text (Default)" and/or "Help Text (German)" (also spaces)
      6. save the element
      7. edit the profile element again
      8. do not add any value to "Help Text (Default)" and/or "Help Text (German)"
      9. save the element
        • the error should occur now

      Workaround

      • while editing the profile element add any value for either "Help Text (Default)" or "Help Text (German)"
        • a space character should be enough

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              twi Tino Winkler
              Reporter:
              twi Tino Winkler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Work-time