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

ORA-00932 errors when accessing Movies and Contributors tables using LiveData causing no entries to be displayed on Oracle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 14.4.2, 13.10.7
    • None
    • Windows 11 Pro 64 bit, Firefox 102, using an instance of XWiki 14.4.2 on Oracle 19c, Tomcat 9.0.64
    • Unknown

    Description

      STEPS TO REPRODUCE

      1. Create an instance of XWiki configured with Oracle (tested with Oracle 19c)
      2. Go to <server>/xwiki/bin/view/Help/Applications/Movies?useLiveData=true and <server>/xwiki/bin/view/Help/Applications/Contributors?useLiveData=true
      3. Observe the LD table from the page and the console

      EXPECTED RESULTS
      The page displays the entries properly in a LD table.

      ACTUAL RESULTS
      No entries are displayed in the LD table. In XWiki console there is the following error:

      2022-07-01 13:29:31,119 [http-nio-1115-exec-10 - http://localhost:1115/xwiki/rest/liveData/sources/liveTable/entries?timestamp=1656671370776&namespace=wiki%3Axwiki&sourceParams.translationPrefix=movies.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&sourceParams.className=Help.Applications.Movies.Code.MoviesClass&properties=longText1&properties=doc.title&properties=staticList1&properties=date1&properties=databaseList1&properties=boolean1&properties=_actions&offset=0&limit=15&sort=longText1&descending=] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Error: 932, SQLState: 42000
      2022-07-01 13:29:31,121 [http-nio-1115-exec-10 - http://localhost:1115/xwiki/rest/liveData/sources/liveTable/entries?timestamp=1656671370776&namespace=wiki%3Axwiki&sourceParams.translationPrefix=movies.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&sourceParams.className=Help.Applications.Movies.Code.MoviesClass&properties=longText1&properties=doc.title&properties=staticList1&properties=date1&properties=databaseList1&properties=boolean1&properties=_actions&offset=0&limit=15&sort=longText1&descending=] ERROR o.h.e.j.s.SqlExceptionHelper   - ORA-00932: tipuri de date inconsistente: se a?tepta -, s-a primit CLOB
      
      2022-07-01 13:29:31,146 [http-nio-1115-exec-10 - http://localhost:1115/xwiki/rest/liveData/sources/liveTable/entries?timestamp=1656671370776&namespace=wiki%3Axwiki&sourceParams.translationPrefix=movies.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&sourceParams.className=Help.Applications.Movies.Code.MoviesClass&properties=longText1&properties=doc.title&properties=staticList1&properties=date1&properties=databaseList1&properties=boolean1&properties=_actions&offset=0&limit=15&sort=longText1&descending=] ERROR o.a.v.d.null                   - Exception in macro #gridresult_buildRowsJSON called at xwiki:XWiki.LiveTableResults[line 476, column 1]
      2022-07-01 13:29:31,146 [http-nio-1115-exec-10 - http://localhost:1115/xwiki/rest/liveData/sources/liveTable/entries?timestamp=1656671370776&namespace=wiki%3Axwiki&sourceParams.translationPrefix=movies.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&sourceParams.className=Help.Applications.Movies.Code.MoviesClass&properties=longText1&properties=doc.title&properties=staticList1&properties=date1&properties=databaseList1&properties=boolean1&properties=_actions&offset=0&limit=15&sort=longText1&descending=] ERROR o.a.v.d.null                   - Exception in macro #gridresultwithfilter_buildJSON called at xwiki:XWiki.LiveTableResults[line 499, column 1]
      2022-07-01 13:29:31,148 [http-nio-1115-exec-10 - http://localhost:1115/xwiki/rest/liveData/sources/liveTable/entries?timestamp=1656671370776&namespace=wiki%3Axwiki&sourceParams.translationPrefix=movies.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&sourceParams.className=Help.Applications.Movies.Code.MoviesClass&properties=longText1&properties=doc.title&properties=staticList1&properties=date1&properties=databaseList1&properties=boolean1&properties=_actions&offset=0&limit=15&sort=longText1&descending=] ERROR o.a.v.d.null                   - Exception in macro #gridresultwithfilter called at xwiki:XWiki.LiveTableResults[line 26, column 1]
      2022-07-01 13:29:31,248 [http-nio-1115-exec-10 - http://localhost:1115/xwiki/rest/liveData/sources/liveTable/entries?timestamp=1656671370776&namespace=wiki%3Axwiki&sourceParams.translationPrefix=movies.livetable.&sourceParams.queryFilters=currentlanguage%2Chidden&sourceParams.className=Help.Applications.Movies.Code.MoviesClass&properties=longText1&properties=doc.title&properties=staticList1&properties=date1&properties=databaseList1&properties=boolean1&properties=_actions&offset=0&limit=15&sort=longText1&descending=] ERROR r.i.e.ExceptionExceptionMapper - A REST endpoint failed with an unmapped exception.
      org.xwiki.livedata.LiveDataException: Failed to execute the live data query.
              at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.get(LiveTableLiveDataEntryStore.java:116)
              at org.xwiki.livedata.internal.rest.DefaultLiveDataEntriesResource.getEntries(DefaultLiveDataEntriesResource.java:200)
              at org.xwiki.livedata.internal.rest.DefaultLiveDataEntriesResource.getEntries(DefaultLiveDataEntriesResource.java:79)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:162)
              at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:281)
              at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:997)
              at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:746)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Router.doHandle(Router.java:422)
              at org.restlet.routing.Router.handle(Router.java:641)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:140)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
              at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:77)
              at org.restlet.Application.handle(Application.java:385)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Router.doHandle(Router.java:422)
              at org.restlet.routing.Router.handle(Router.java:641)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.routing.Router.doHandle(Router.java:422)
              at org.restlet.routing.Router.handle(Router.java:641)
              at org.restlet.routing.Filter.doHandle(Filter.java:150)
              at org.restlet.routing.Filter.handle(Filter.java:197)
              at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
              at org.restlet.Component.handle(Component.java:408)
              at org.restlet.Server.handle(Server.java:507)
              at org.restlet.engine.connector.ServerHelper.handle(ServerHelper.java:63)
              at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:143)
              at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1117)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at com.xpn.xwiki.web.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
              at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
              at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
              at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1787)
              at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
              at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Failed': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
       at [Source: (String)"Failed to execute the [velocity] macro. Cause: [ORA-00932: tipuri de date inconsistente: se a?tepta -, s-a primit CLOB ]. Click on this message for details.
      
      org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [## the $extra variable is passed to the call to #gridresultwithfilter below and is used to perform some default
      ## filtering on the LiveTable data even when the user has not performed any column filtering yet.
      ## When users start using column f"[truncated 22451 chars]; line: 1, column: 7]
              at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2391)
              at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:745)
              at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2961)
              at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:2002)
              at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:802)
              at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4703)
              at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3076)
              at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.getLiveTableResultsJSON(LiveTableLiveDataEntryStore.java:142)
              at org.xwiki.livedata.internal.livetable.LiveTableLiveDataEntryStore.get(LiveTableLiveDataEntryStore.java:107)
              ... 84 common frames omitted

      The error is ORA-00932: inconsistent datatypes: expected - got CLOB.

      The issue seems to be reproducing also on 13.10.7 and on older instances (tested on 12.10.11).

      Attachments

        Activity

          People

            Unassigned Unassigned
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: