Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

(click on this box to dismiss)

Does the CUBRID db supports the Grails Hibernate function?


I am encountering big problem with the cubrid database and grails hibernate function. I have created the domain class and the mappings as follow. 

class DEvent {
    String city
    String name
    DUser organizer
    String venue
    Date startDate
    Date endDate
    String description
    static hasMany = [volunteers:DUser, sponsorships:SponsorShip, tasks:Task, messages:Message]
    String toString(){
        "$name, $city"

    static constraints = {
        description(maxSize : 5000)
        volunteers(nullable : true)
        sponsorships(nullable : true)
        tasks(nullable : true)
        messages(nullable : true)

And my DUser domain class look like this:

class DUser {
    String fullName
    String userName
    String password
    String email
    String website
    String bio
    String toString(){ fullName}
    static constraints = {

When i try to run the grails application it prompted to a error message l

Caused by MappingException: No Dialect mapping for JDBC type: 12
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    603 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run . . . in java.lang.Thread

Please if you have any one have the answer please let me know. Thank you very much.

링크 댓글 쓰기 (1)
질문시간 2년 전
This is just a hunch since I'm not familiar with hibernate. Can you try to change bio(maxSize:5000) to a size less than 4000? I think 5000 is out of range for CUBRID dialect. - [레벨:8]ginarrbrik 2년 전
73 답변들

"JDBC type: 12" is VARCHAR. It could not map VARCHAR(5000) with data types defined in the dialect.

On line 63 of (the Hibernate dialect) you can notice that there is a character size limitation of 4000 chars. This is a default configuration of the dialect. For your case, a fallback data type has to be introduced for cases when the length is over 4000 chars.

If you can compile Hibernate yourself, you can add the following code on line 63 just before the original VARCHAR(4000) definition like:

registerColumnType( Types.VARCHAR, "string" );
registerColumnType( Types.VARCHAR, 4000, "varchar($l)" );

This will ensure that strings over 4000 characters get registered as STRING data type which is equivalent to VARCHAR(1,073,741,823), i.e. the maximum value.

I will also push the fix to Hibernate.

링크 댓글 쓰기 (0)
답변시간 2년 전

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: