Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17065

Warnings for deprecated usage of HQL ordinal parameters when removing a deleted attachment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 12.1, 11.10.4
    • 12.1-rc-1
    • Old Core
    • None
    • Windows 10 Pro 64 bit, Firefox 73, using a local instance of XWiki 12.1 RC1 on PostgreSQL 12
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Delete some attachments
      2. Go to Drawer > Page Index > Deleted Attachments tab
      3. Click on 'Deleted on' filter and select 'Yesterday' for ex.
      4. Click 'X' to permanently delete an attachment
      5. Observe the XWiki console

      EXPECTED RESULTS

      No warnings/errors are displayed.

      ACTUAL RESULTS

      Some warnings are displayed related to deprecated usage of HQL parameters every time a date filter is applied or an attachment is permanently deleted. Stacktrace:

      2020-02-21 14:42:15,288 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=3&datt.date=1582149600000-1582235999999&&sort=datt.filename&dir=asc] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select datt.id, datt.filename from DeletedAttachment as datt where 1=1  and datt.date between ? and ?  order by datt.filename asc] has been converted to [select datt.id, datt.filename from DeletedAttachment as datt where 1=1  and datt.date between ?1 and ?2  order by datt.filename asc]
      2020-02-21 14:42:15,299 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=3&datt.date=1582149600000-1582235999999&&sort=datt.filename&dir=asc] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select count(*) from DeletedAttachment as datt where 1=1  and datt.date between ? and ? ] has been converted to [select count(*) from DeletedAttachment as datt where 1=1  and datt.date between ?1 and ?2 ]
      2020-02-21 14:43:06,065 [http://localhost:1210/xwiki/bin/delattachment/aaa/WebHome/a%20doc%20with%20spaces.txt?trashId=3&form_token=RTSjobdxhQ078rvx8ANjyA&confirm=1&ajax=1] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?] has been converted to [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?1]
      2020-02-21 14:43:20,628 [http://localhost:1210/xwiki/bin/delattachment/aaa/WebHome/a%20doc%20with%20spaces%202.txt?trashId=4&form_token=RTSjobdxhQ078rvx8ANjyA&confirm=1&ajax=1] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?] has been converted to [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?1]
      2020-02-21 14:50:55,765 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=5&datt.date=1582236000000-1582322399999&&sort=datt.filename&dir=asc] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select datt.id, datt.filename from DeletedAttachment as datt where 1=1  and datt.date between ? and ?  order by datt.filename asc] has been converted to [select datt.id, datt.filename from DeletedAttachment as datt where 1=1  and datt.date between ?1 and ?2  order by datt.filename asc]
      2020-02-21 14:50:57,562 [http://localhost:1210/xwiki/bin/view/XWiki/DeletedAttachments?list=1&xpage=plain&outputSyntax=plain&offset=1&limit=15&reqNo=5&datt.date=1582236000000-1582322399999&&sort=datt.filename&dir=asc] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [select count(*) from DeletedAttachment as datt where 1=1  and datt.date between ? and ? ] has been converted to [select count(*) from DeletedAttachment as datt where 1=1  and datt.date between ?1 and ?2 ]
      2020-02-21 14:51:04,486 [http://localhost:1210/xwiki/bin/delattachment/aaa/WebHome/Adresa%20Matrix%20Riot%20ONLINE.txt?trashId=1&form_token=RTSjobdxhQ078rvx8ANjyA&confirm=1&ajax=1] WARN  c.x.x.XWiki                    - Deprecated usage legacy-style HQL ordinal parameters (`?`); use JPA-style ordinal parameters (e.g., `?1`) instead. Query [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?] has been converted to [delete from com.xpn.xwiki.doc.DeletedAttachment where id=?1]

      Reproduced also on XWiki 11.10.4 Snapshot.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: