Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-59807

Upgrade embedded H2 database

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      H2 version 1.4.185 throws exception with some more complex queries:

      [INFO] [talledLocalContainer] Caused by: org.h2.jdbc.JdbcSQLException: Data conversion error converting "1.17e+11"; SQL statement:
      [INFO] [talledLocalContainer] SELECT ID, VALUE FROM (SELECT O.ID, OAV.TEXT_VALUE_SHORT_LOWER AS VALUE FROM AO_8542F1_IFJ_OBJ O, AO_8542F1_IFJ_OBJ_ATTR OA, AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA, AO_8542F1_IFJ_OBJ_ATTR_VAL OAV WHERE O.ID = OA.OBJECT_ID AND OA.ID = OAV.OBJECT_ATTRIBUTE_ID AND OA.OBJECT_TYPE_ATTRIBUTE_ID = OTA.ID AND OTA.ID = ? AND O.ID IN (SELECT B.ID FROM (SELECT A.ID, A.RCOUNT FROM (SELECT FD.ID AS ID, COUNT(*) as RCOUNT FROM (SELECT O2.ID AS ID, OAV2.OBJECT_ATTRIBUTE_ID AS OAID FROM AO_8542F1_IFJ_OBJ O2, AO_8542F1_IFJ_OBJ_ATTR OA2, AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA2, AO_8542F1_IFJ_OBJ_ATTR_VAL OAV2 WHERE O2.ID = OA2.OBJECT_ID AND OA2.ID = OAV2.OBJECT_ATTRIBUTE_ID AND OA2.OBJECT_TYPE_ATTRIBUTE_ID = OTA2.ID AND ((OTA2.ID = ? AND (OAV2.TEXT_VALUE_SHORT_LOWER = ?))) GROUP BY OAID, ID) AS FD GROUP BY ID) AS A) AS B WHERE RCOUNT = ?)) AS C UNION ALL SELECT ID, 'HEJ' FROM AO_8542F1_IFJ_OBJ WHERE ID IN (SELECT C.ID FROM (SELECT O.ID FROM AO_8542F1_IFJ_OBJ O, AO_8542F1_IFJ_OBJ_ATTR OA, AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA, AO_8542F1_IFJ_OBJ_ATTR_VAL OAV WHERE O.ID = OA.OBJECT_ID AND OA.ID = OAV.OBJECT_ATTRIBUTE_ID AND OA.OBJECT_TYPE_ATTRIBUTE_ID = OTA.ID AND O.ID NOT IN (SELECT O3.ID FROM AO_8542F1_IFJ_OBJ O3, AO_8542F1_IFJ_OBJ_ATTR OA3, AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA3, AO_8542F1_IFJ_OBJ_ATTR_VAL OAV3 WHERE O3.ID = OA3.OBJECT_ID AND OA3.ID = OAV3.OBJECT_ATTRIBUTE_ID AND OA3.OBJECT_TYPE_ATTRIBUTE_ID = OTA3.ID AND OTA3.ID = ? AND O3.ID IN (SELECT B.ID FROM (SELECT A.ID, A.RCOUNT FROM (SELECT FD.ID AS ID, COUNT(*) as RCOUNT FROM (SELECT O2.ID AS ID, OAV2.OBJECT_ATTRIBUTE_ID AS OAID FROM AO_8542F1_IFJ_OBJ O2, AO_8542F1_IFJ_OBJ_ATTR OA2, AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA2, AO_8542F1_IFJ_OBJ_ATTR_VAL OAV2 WHERE O2.ID = OA2.OBJECT_ID AND OA2.ID = OAV2.OBJECT_ATTRIBUTE_ID AND OA2.OBJECT_TYPE_ATTRIBUTE_ID = OTA2.ID AND ((OTA2.ID = ? AND (OAV2.TEXT_VALUE_SHORT_LOWER = ?))) GROUP BY OAID, ID) AS FD GROUP BY ID) AS A) AS B WHERE RCOUNT = ?)) AND O.ID IN (SELECT B.ID FROM (SELECT A.ID, A.RCOUNT FROM (SELECT FD.ID AS ID, COUNT(*) as RCOUNT FROM (SELECT O2.ID AS ID, OAV2.OBJECT_ATTRIBUTE_ID AS OAID FROM AO_8542F1_IFJ_OBJ O2, AO_8542F1_IFJ_OBJ_ATTR OA2, AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA2, AO_8542F1_IFJ_OBJ_ATTR_VAL OAV2 WHERE O2.ID = OA2.OBJECT_ID AND OA2.ID = OAV2.OBJECT_ATTRIBUTE_ID AND OA2.OBJECT_TYPE_ATTRIBUTE_ID = OTA2.ID AND ((OTA2.ID = ? AND (OAV2.TEXT_VALUE_SHORT_LOWER = ?))) GROUP BY OAID, ID) AS FD GROUP BY ID) AS A) AS B WHERE RCOUNT = ?)) AS C) ORDER BY 2 ASC LIMIT 25 [22018-185]
      [INFO] [talledLocalContainer] 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
      [INFO] [talledLocalContainer] 	at org.h2.message.DbException.get(DbException.java:168)
      [INFO] [talledLocalContainer] 	at org.h2.value.Value.convertTo(Value.java:902)
      [INFO] [talledLocalContainer] 	at org.h2.table.Table.compareTypeSave(Table.java:1097)
      [INFO] [talledLocalContainer] 	at org.h2.index.BaseIndex.compareRows(BaseIndex.java:249)
      [INFO] [talledLocalContainer] 	at org.h2.mvstore.db.MVSecondaryIndex$MVStoreCursor.next(MVSecondaryIndex.java:511)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.next(IndexCursor.java:277)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:360)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryGroup(Select.java:326)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:639)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:272)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:177)
      [INFO] [talledLocalContainer] 	at org.h2.index.BaseIndex.find(BaseIndex.java:127)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.find(IndexCursor.java:159)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:329)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryGroup(Select.java:326)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:639)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:272)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:177)
      [INFO] [talledLocalContainer] 	at org.h2.index.BaseIndex.find(BaseIndex.java:127)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.find(IndexCursor.java:159)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:329)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryFlat(Select.java:532)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:644)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:272)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:177)
      [INFO] [talledLocalContainer] 	at org.h2.index.BaseIndex.find(BaseIndex.java:127)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.find(IndexCursor.java:159)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:329)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryFlat(Select.java:532)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:644)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCondition.getCurrentResult(IndexCondition.java:175)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.find(IndexCursor.java:105)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:329)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryFlat(Select.java:532)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:644)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:272)
      [INFO] [talledLocalContainer] 	at org.h2.index.ViewIndex.find(ViewIndex.java:177)
      [INFO] [talledLocalContainer] 	at org.h2.index.BaseIndex.find(BaseIndex.java:127)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.find(IndexCursor.java:159)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:329)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryFlat(Select.java:532)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:644)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCondition.getCurrentResult(IndexCondition.java:175)
      [INFO] [talledLocalContainer] 	at org.h2.index.IndexCursor.find(IndexCursor.java:105)
      [INFO] [talledLocalContainer] 	at org.h2.table.TableFilter.next(TableFilter.java:329)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryFlat(Select.java:532)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Select.queryWithoutCache(Select.java:644)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:322)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.SelectUnion.queryWithoutCache(SelectUnion.java:194)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.SelectUnion.query(SelectUnion.java:425)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:290)
      [INFO] [talledLocalContainer] 	at org.h2.command.dml.Query.query(Query.java:36)
      [INFO] [talledLocalContainer] 	at org.h2.command.CommandContainer.query(CommandContainer.java:90)
      [INFO] [talledLocalContainer] 	at org.h2.command.Command.executeQuery(Command.java:197)
      [INFO] [talledLocalContainer] 	at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:108)
      [INFO] [talledLocalContainer] 	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
      [INFO] [talledLocalContainer] 	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
      [INFO] [talledLocalContainer] 	at net.java.ao.EntityManager.findWithSQL(EntityManager.java:736)
      [INFO] [talledLocalContainer] 	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.findWithSQL(EntityManagedActiveObjects.java:150)
      [INFO] [talledLocalContainer] 	... 304 more
      [INFO] [talledLocalContainer] Caused by: java.lang.NumberFormatException: For input string: "1.17e+11"
      [INFO] [talledLocalContainer] 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      [INFO] [talledLocalContainer] 	at java.lang.Integer.parseInt(Integer.java:580)
      [INFO] [talledLocalContainer] 	at java.lang.Integer.parseInt(Integer.java:615)
      [INFO] [talledLocalContainer] 	at org.h2.value.Value.convertTo(Value.java:852)
      [INFO] [talledLocalContainer] 	... 375 more
      [INFO] [talledLocalContainer] Feb 15, 2016 1:19:32 PM com.sun.jersey.spi.container.ContainerResponse logException
      [INFO] [talledLocalContainer] SEVERE: Mapped exception to response: 500 (Internal Server Error)
      
      

      This is solved in the latest version of H2, version 1.4.191. Please embed the latest version in JIRA core.

      Thanks

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              9ecfeedc62bd Mathias Edblom
              Votes:
              7 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: