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

NPE in XWikiHibernateStore.search

    XMLWordPrintable

Details

    • Medium
    • Easy
    • N/A
    • N/A

    Description

      I think, I found a bug!

      line 2508 forwards the call to the overloaded method line 2512, passing the parameter whereParams, but with parameter parameterValues = null.

      this causes a NPE in line 2527, whenever whereParams != null

       

      [2023-07-09 22:03:01] [info] com.xpn.xwiki.XWikiException: Error number 3223 in 3: Exception while searching documents with sql select distinct doc.fullName from XWikiDocument as doc 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiHibernateStore.lambda$search$21(XWikiHibernateStore.java:2557) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:902) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2519) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiHibernateStore.search(XWikiHibernateStore.java:2508) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiCacheStore.search(XWikiCacheStore.java:708) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.XWiki.search(XWiki.java:2495) 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl.findUser(XWikiAuthServiceImpl.java:428)
      ...
      [2023-07-09 22:03:01] [info] Caused by: java.lang.NullPointerException: null 
      [2023-07-09 22:03:01] [info] #011at com.xpn.xwiki.store.XWikiHibernateStore.lambda$search$21(XWikiHibernateStore.java:2527)
      

       

       

       

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              hengels Holger Engels
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: