-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: ORA-00932: inconsistent datatypes: expected - got CLOB
PostPosted: Mon Mar 20, 2006 7:30 am 
Senior
Senior

Joined: Tue May 10, 2005 9:00 am
Posts: 125
Hello, am getting this error from hibernate:

Code:
Hibernate: select distinct xwikidocum0_.XWD_WEB as col_0_0_, xwikidocum0_.XWD_NAME as col_1_0_ from xwikidoc xwikidocum0_, xwikiobjects baseobject1_, xwikilargestrings largestrin2_ inner join xwikiproperties largestrin2_1_ on largestrin2_.XWL_ID=largestrin2_1_.XWP_ID and largestrin2_.XWL_NAME=largestrin2_1_.XWP_NAME where baseobject1_.XWO_NAME=xwikidocum0_.XWD_FULLNAME and baseobject1_.XWO_CLASSNAME='XWiki.XWikiGroups' and baseobject1_.XWO_ID=largestrin2_.XWL_ID and largestrin2_.XWL_NAME='member' and (largestrin2_.XWL_VALUE='xwiki:XWiki.XWikiGuest' or largestrin2_.XWL_VALUE='XWiki.XWikiGuest' or largestrin2_.XWL_VALUE='XWikiGuest')
12:10:06,404  WARN http-8080-Processor2 http://localhost:8080/wiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:71 - SQL Error: 932, SQLState: 42000
12:10:06,405 ERROR http-8080-Processor2 http://localhost:8080/wiki/bin/view/Main/WebHome JDBCExceptionReporter:logExceptions:72 - ORA-00932: inconsistent datatypes: expected - got CLOB

I have included in post the 2 mappings involved by this failing select and the oracle table creation script generated from the oracle tables, which themselves where generated by hibernate from the mapping.

Does anyone know how to solve this, is it a hibernate bug that need to be adressed by team? All kind of help / suggestion welcomed, i am using 'xwiki' which has it's persistence using Hibernate.

Hibernate version:
3.x
Mapping documents:
xwikidoc table
Code:
<class name="com.xpn.xwiki.doc.XWikiDocument" table="xwikidoc">
        <id name="id" type="long" unsaved-value="any">
            <column name="XWD_ID" not-null="true"/>
            <generator class="assigned" />
        </id>
        <property name="fullName" type="string">
            <column name="XWD_FULLNAME" length="255" not-null="true"/>
        </property>

        <property name="name" type="string">
            <column name="XWD_NAME" length="255" not-null="true"/>
        </property>

        <property name="language" type="string">
            <column name="XWD_LANGUAGE" length="5" />
        </property>

        <property name="defaultLanguage" type="string">
            <column name="XWD_DEFAULT_LANGUAGE" length="5" />
        </property>

        <property name="translation" type="integer">
            <column name="XWD_TRANSLATION"  not-null="true" />
        </property>

        <property name="date" type="timestamp">
            <column name="XWD_DATE" not-null="true"/>
        </property>

        <property name="creationDate" type="timestamp">
            <column name="XWD_CREATION_DATE" />
        </property>

        <property name="author" type="string">
            <column name="XWD_AUTHOR" length="255"/>
        </property>

        <property name="creator" type="string">
            <column name="XWD_CREATOR" length="255"/>
        </property>

        <property name="web" type="string">
            <column name="XWD_WEB" length="255" not-null="true"/>
        </property>

        <property name="content" type="text">
            <column name="XWD_CONTENT" not-null="true"/>
        </property>

        <property name="archive" type="text">
            <column name="XWD_ARCHIVE" not-null="true"/>
        </property>

        <property name="version" type="string">
            <column name="XWD_VERSION" length="255" not-null="true"/>
        </property>

        <property name="parent" type="text">
            <column name="XWD_PARENT" length="511"/>
        </property>
    </class>

xwikiproperties:
Code:
<class name="com.xpn.xwiki.objects.BaseProperty" table="xwikiproperties">
        <composite-id unsaved-value="any">
            <key-property name="id" column="XWP_ID" type="integer" />
            <key-property name="name" column="XWP_NAME" type="string" />
        </composite-id>
        <property name="classType" type="string">
            <column name="XWP_CLASSTYPE" length="255"/>
        </property>

        <joined-subclass name="com.xpn.xwiki.objects.IntegerProperty" table="xwikiintegers">
            <key>
                <column name="XWI_ID"  />
                <column name="XWI_NAME"  />
            </key>
            <property name="value" type="integer">
                <column name="XWI_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.LongProperty" table="xwikilongs">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="value" type="long">
                <column name="XWL_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.FloatProperty" table="xwikifloats">
            <key>
                <column name="XWF_ID"  />
                <column name="XWF_NAME"  />
            </key>
            <property name="value" type="float">
                <column name="XWF_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.DoubleProperty" table="xwikidoubles">
            <key>
                <column name="XWD_ID"  />
                <column name="XWD_NAME"  />
            </key>
            <property name="value" type="double">
                <column name="XWD_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.StringProperty" table="xwikistrings">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="value" type="string">
                <column name="XWS_VALUE" length="255" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.DateProperty" table="xwikidates">
            <key>
                <column name="XWS_ID"  />
                <column name="XWS_NAME"  />
            </key>
            <property name="value" type="timestamp">
                <column name="XWS_VALUE" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.LargeStringProperty" table="xwikilargestrings">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="value" type="text">
                <column name="XWL_VALUE" length="60000" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.StringListProperty" table="xwikilargestrings">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <property name="textValue" type="text">
                <column name="XWL_VALUE" length="60000" />
            </property>
        </joined-subclass>

        <joined-subclass name="com.xpn.xwiki.objects.DBStringListProperty" table="xwikilists">
            <key>
                <column name="XWL_ID"  />
                <column name="XWL_NAME"  />
            </key>
            <list name="list" table="xwikilistitems" lazy="false">
                <key>
                    <column name="XWL_ID"  />
                    <column name="XWL_NAME"  />
                </key>
                <index column="XWL_NUMBER"/>
                <element column="XWL_VALUE" type="string" />
            </list>
        </joined-subclass>
    </class>

Name and version of the database you are using:

oracle 9, using ojdbc14.jar driver for oracle 10 as oracle 9 version does not support lobs!

The generated SQL (show_sql=true):
select distinct xwikidocum0_.XWD_WEB as col_0_0_, xwikidocum0_.XWD_NAME as col_1_0_ from xwikidoc xwikidocum0_, xwikiobjects baseobject1_, xwikilargestrings largestrin2_ inner join xwikiproperties largestrin2_1_ on largestrin2_.XWL_ID=largestrin2_1_.XWP_ID and largestrin2_.XWL_NAME=largestrin2_1_.XWP_NAME where baseobject1_.XWO_NAME=xwikidocum0_.XWD_FULLNAME and baseobject1_.XWO_CLASSNAME='XWiki.XWikiGroups' and baseobject1_.XWO_ID=largestrin2_.XWL_ID and largestrin2_.XWL_NAME='member' and (largestrin2_.XWL_VALUE='xwiki:XWiki.XWikiGuest' or largestrin2_.XWL_VALUE='XWiki.XWikiGuest' or largestrin2_.XWL_VALUE='XWikiGuest')


The generated tables (using hbm2ddl):
Code:
PROMPT CREATE TABLE delbd.xwikidoc

CREATE TABLE delbd.xwikidoc
(
    xwd_id                           NUMBER   (19)                   NOT NULL
  , xwd_fullname                     VARCHAR2 (255)                  NOT NULL
  , xwd_name                         VARCHAR2 (255)                  NOT NULL
  , xwd_language                     VARCHAR2 (5)                   
  , xwd_default_language             VARCHAR2 (5)                   
  , xwd_translation                  NUMBER   (10)                   NOT NULL
  , xwd_date                         TIMESTAMP(6)                    NOT NULL
  , xwd_creation_date                TIMESTAMP(6)                   
  , xwd_author                       VARCHAR2 (255)                 
  , xwd_creator                      VARCHAR2 (255)                 
  , xwd_web                          VARCHAR2 (255)                  NOT NULL
  , xwd_content                      CLOB                            NOT NULL
  , xwd_archive                      CLOB                            NOT NULL
  , xwd_version                      VARCHAR2 (255)                  NOT NULL
  , xwd_parent                       CLOB                           
)
ORGANIZATION        HEAP
NOMONITORING
PARALLEL
(
  DEGREE            1
  INSTANCES         1
)
NOCACHE
PCTUSED             
PCTFREE             10
INITRANS            1
MAXTRANS            255
STORAGE
(
  INITIAL           65536
  MINEXTENTS        1
  MAXEXTENTS        unlimited
  PCTINCREASE       0
  FREELISTS         1
  FREELIST GROUPS   1
  BUFFER_POOL       default
)
LOGGING
TABLESPACE          extend
;


PROMPT CREATE TABLE delbd.xwikiproperties

CREATE TABLE delbd.xwikiproperties
(
    xwp_id                           NUMBER   (10)                   NOT NULL
  , xwp_name                         VARCHAR2 (255)                  NOT NULL
  , xwp_classtype                    VARCHAR2 (255)                 
)
ORGANIZATION        HEAP
NOMONITORING
PARALLEL
(
  DEGREE            1
  INSTANCES         1
)
NOCACHE
PCTUSED             
PCTFREE             10
INITRANS            1
MAXTRANS            255
STORAGE
(
  INITIAL           65536
  MINEXTENTS        1
  MAXEXTENTS        unlimited
  PCTINCREASE       0
  FREELISTS         1
  FREELIST GROUPS   1
  BUFFER_POOL       default
)
LOGGING
TABLESPACE          extend
;

PROMPT CREATE UNIQUE INDEX delbd.sys_c0054833 ON delbd.xwikiproperties

CREATE UNIQUE INDEX delbd.sys_c0054833 ON delbd.xwikiproperties
(
    xwp_id
  , xwp_name
)
PARALLEL
(
  DEGREE            1
  INSTANCES         1
)
PCTFREE             10
INITRANS            2
MAXTRANS            255
STORAGE
(
  INITIAL           65536
  MINEXTENTS        1
  MAXEXTENTS        unlimited
  PCTINCREASE       
  FREELISTS         1
  FREELIST GROUPS   1
  BUFFER_POOL       default
)
LOGGING
TABLESPACE          extend
;




Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.