XWiki Enterprise
  1. XWiki Enterprise
  2. XE-1032

Error at first-time starting after upgrade to XE 3.2: $Proxy148 cannot be cast to oracle.sql.CLOB

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 2003, OracleXE 10.2, Glassfish 3.1.1, XE 3.2
    • Similar issues:
      XE-1279Error starting xwiki
      XE-1065XWiki schema cannot be updated in Oracle 11g
      XE-1409Unable to downgrade XE UI from 5.4-milestone1 to 5.3 using the distribution wizard
      XE-1413NullPointerException after upgrade from 6.0.1 to 6.1 (Debian package)
      XE-223After login to XE we always get a Document does not exist with the bread crumb showing View->Main
      XE-1047XWiki always starts with errors on Windows
      XE-1189Debian package fail to upgrade
      XE-1322Standalone Distribution fails to start getting Java error
      XE-1417Merge conflict during the upgrade of a subwiki from 6.1 to 6.2-SNAPSHOT on XWiki.XWikiPreferences
      XE-971Unable to see velocity error when faile to start Open Office Server

      Description

      When I did upgrade XE from 3.1 to 3.2, at first-time starting after upgrade I got error:
      javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
      Wrapped Exception: Error number 3201 in 3: Exception while saving document xwiki:XWiki.XWikiPreferences
      Wrapped Exception: $Proxy148 cannot be cast to oracle.sql.CLOB
      ...
      (full text of error from logs look at attached file)

      Also, as I see in logs, same problem not only with XWiki.XWikiPreferences, but also with some other pages (Scheduler.WatchListHourlyNotifier, ... and some user-created pages).

      All modifications in hibernate.cfg.xml I made as described (same as in my previous well-working XE 3.1).
      Also in hibernate.cfg.xml exists two lines about clobs in Oracle:
      <property name="hibernate.connection.SetBigStringTryClob">true</property>
      <property name="hibernate.jdbc.batch_size">0</property>

      This is not my first upgrade on Oracle (I succesfully upgraded XE from version to version starting from 2.0), and before all was ok.

      1. catalina.out
        6 kB
        shouldbe
      2. error_log.txt
        59 kB
        Eugen Colesnicov
      3. hibernate.cfg.xml
        3 kB
        shouldbe
      4. tomcat.log
        11 kB
        shouldbe
      5. xwiki.cfg
        29 kB
        shouldbe
      6. xwiki.properties
        16 kB
        shouldbe

        Issue Links

          Activity

          Hide
          Eugen Colesnicov added a comment -

          This is error log from glassfish

          Show
          Eugen Colesnicov added a comment - This is error log from glassfish
          Hide
          Eugen Colesnicov added a comment -

          Confirm this thread http://xwiki.475771.n2.nabble.com/XE-Upgrade-to-3-2-on-Oracle-failed-td6900832.html, this problem exists on other environment too:
          Ubuntu 10.01, 32bit, tomcat6 Oracle 10g (10.2) (thanks shouldbe_q931).

          Show
          Eugen Colesnicov added a comment - Confirm this thread http://xwiki.475771.n2.nabble.com/XE-Upgrade-to-3-2-on-Oracle-failed-td6900832.html , this problem exists on other environment too: Ubuntu 10.01, 32bit, tomcat6 Oracle 10g (10.2) (thanks shouldbe_q931).
          Hide
          shouldbe added a comment - - edited

          There are some obvious redactions to the hibernate.cfg.xml, xwiki.cfg and xwiki.properties files that I uploaded

          Show
          shouldbe added a comment - - edited There are some obvious redactions to the hibernate.cfg.xml, xwiki.cfg and xwiki.properties files that I uploaded
          Hide
          shouldbe added a comment -

          tomcat.log and catalina.out are log fragments from when the error happens

          Show
          shouldbe added a comment - tomcat.log and catalina.out are log fragments from when the error happens
          Hide
          Eugen Colesnicov added a comment - - edited

          I tried fresh install 3.2 on Oracle - also without success.
          Another error, but looks similar:
          Wrapped Exception: Error number 0 in 3: Exception while hibernate execute
          Wrapped Exception: could not execute query
          ...
          As a result - can say - that XWiki 3.2 totally cannot work with Oracle.

          Show
          Eugen Colesnicov added a comment - - edited I tried fresh install 3.2 on Oracle - also without success. Another error, but looks similar: Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: could not execute query ... As a result - can say - that XWiki 3.2 totally cannot work with Oracle.
          Hide
          Thomas K added a comment -

          I am experiencing same issue using JBoss EAP 4.3.0. A fresh 3.2 installation is unable to create its tables in a fresh Oracle schema. The provided hibernate mappings lead hibernate to generate CREATE TABLE statements that contain multiple columns of type LONG (which is not permitted in Oracle - max. 1 LONG column per table). Adjusting the hibernate mapping files (*.oracle.hbm.xml) eventually allowed the creation of tables in Oracle using the CLOB data type (which is also consistent with XWiki 3.1 behaviour). However, that leads to the mentioned "Wrapped Exception: $Proxy97 cannot be cast to oracle.sql.CLOB" exception.
          Result here is the same: no XWiki 3.2 with Oracle.
          For reference I am attaching my modified hibernate mapping files for reproducing this error on a fresh Oracle DB: thomask_hbm_files.zip. I have also adjusted some text columns with length 2000 to use VARCHAR2(2000) instead of CLOB as that seams more efficient and VARCHAR2's can be up to 4000 chars in length.

          Show
          Thomas K added a comment - I am experiencing same issue using JBoss EAP 4.3.0. A fresh 3.2 installation is unable to create its tables in a fresh Oracle schema. The provided hibernate mappings lead hibernate to generate CREATE TABLE statements that contain multiple columns of type LONG (which is not permitted in Oracle - max. 1 LONG column per table). Adjusting the hibernate mapping files (*.oracle.hbm.xml) eventually allowed the creation of tables in Oracle using the CLOB data type (which is also consistent with XWiki 3.1 behaviour). However, that leads to the mentioned "Wrapped Exception: $Proxy97 cannot be cast to oracle.sql.CLOB" exception. Result here is the same: no XWiki 3.2 with Oracle. For reference I am attaching my modified hibernate mapping files for reproducing this error on a fresh Oracle DB: thomask_hbm_files.zip. I have also adjusted some text columns with length 2000 to use VARCHAR2(2000) instead of CLOB as that seams more efficient and VARCHAR2's can be up to 4000 chars in length.
          Hide
          Vincent Massol added a comment -

          Fixed with XWIKI-7254

          Show
          Vincent Massol added a comment - Fixed with XWIKI-7254

            People

            • Assignee:
              Vincent Massol
              Reporter:
              Eugen Colesnicov
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: