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

Exception "inconsistent datatypes" on VisitStats in Oracle 10g

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.3, 3.4-milestone-1, 3.2.1
    • 1.8
    • Statistics
    • None
    • JBoss 4.2.1, JBoss 4.2.2
      XE 1.8 with XEM 1.7
    • VisitStats JDBC hibernate inconsistent datatypes

    Description

      There is a problem with field XWV_COOKIE in table XWIKISTATSVISIT. It throws an exception about "inconsistent datatypes" - see error stack below.
      I've found JIRA:XASTATS-12 in UNRESOLVED state, so it's an already reported problem. Maybe someone can still take a look...

      The original field-type in database is CLOB.
      In xwiki.hdm.xml (xwiki-core-1.8.jar) the field is declared as:
      <property name="cookie" type="string">
      <column name="XWV_COOKIE" not-null="true" length="8192"/>
      </property>

      Workaround:
      I've dropped the field and recreated it as VARCHAR(2000) in database. The exception is gone - but i don't have the knowledge in hibernate or the application to contribute to the problem solution.

      Error Stack:
      11:58:03,601 WARN [JDBCExceptionReporter] SQL Error: 932, SQLState: 42000
      11:58:03,601 ERROR [JDBCExceptionReporter] ORA-00932: inconsistent datatypes: expected - got CLOB
      11:58:03,601 ERROR [StatsUtil] Failed to search visit object in the database from cookie
      org.xwiki.query.QueryException: Exception while execute query. Query statement = [from VisitStats as obj where obj.cookie=:fieldValue and obj.endDate > :date order by obj.endDate desc]
      at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:93)
      at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:56)
      at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:230)
      at com.xpn.xwiki.stats.impl.StatsUtil.findVisitByField(StatsUtil.java:526)
      at com.xpn.xwiki.stats.impl.StatsUtil.findVisitByCookie(StatsUtil.java:551)
      at com.xpn.xwiki.stats.impl.StatsUtil.findVisitByCookieOrIPUA(StatsUtil.java:385)
      at com.xpn.xwiki.stats.impl.StatsUtil.findVisit(StatsUtil.java:330)
      at com.xpn.xwiki.stats.impl.xwiki.XWikiStatsStoreService.addStats(XWikiStatsStoreService.java:195)
      at com.xpn.xwiki.stats.impl.XWikiStatsServiceImpl.notify(XWikiStatsServiceImpl.java:147)
      at com.xpn.xwiki.notify.XWikiActionRule.verify(XWikiActionRule.java:62)
      at com.xpn.xwiki.notify.XWikiNotificationManager.verify(XWikiNotificationManager.java:245)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:311)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:145)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:111)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      ...

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              tronicek Rudolf Tronicek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: