Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


1
(click on this box to dismiss)

How to connect the Grails web application with CUBRID database?

Hi,

I am creating web application with Grails web frame work. I have created the application and modify the DataSource.groovy file like this.

dataSource {
    pooled = true
    driverClassName = "cubrid.jdbc.driver.CUBRIDDriver"
    username = "dba"
    password = "123"
}

And my environment for the connection is development coded like this which connects my application to the CUBRID database.

environments {
    development {
        dataSource {
            dbCreate = "create" // one of 'create', 'create-drop', 'update', 'validate', ''
            url = "jdbc:cubrid://localhost:30000/grailsDB"
        }
    }
}

I tried several times with CUBRID bt its not work out. It populates the following error message.

Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccess Exception: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'cubrid.jdbc.driver.CUBRIDDriver'.

 The driver is not supported (Cannot load JDBC driver class 'cubrid.jdbc.driver.CUBRIDDriver' Error message) but the application is coded in Groovy language. Its well supported with Java language. Please give a solution it would be a great help. Thank you.

Dhip.

link comment (0)
asked 2 years ago
dhip
11
159 Answers
0

CUBRID URL should actually look like this:

jdbc:cubrid:host:port:database:::
In your case: jdbc:cubrid:localhost:30000:grailsDB:::

link comment (0)
answered 2 years ago
ginarrbrik
516
0

The error "Cannot load JDBC driver class 'cubrid.jdbc.driver.CUBRIDDriver" means that the cubrid JDBC jar file could not be found within your classpath.

Assuming you are on Windows, the jar file can be found in C:\CUBRID\jdbc\cubrid_jbdc.jar. Either add this file to your classpath or copy it to a location which already is within your classpath.

link comment (0)
answered 2 years ago
ovidiuv
55
0

Hi Guys, 

Thanks for your support. I solved the problem with make the url as url = "jdbc:cubrid:localhost:33000:grailsdb:::" and I have cleaned the project using netbeans to reduce the jar dependency. It identified the CUBRID driver class. Thank you for your support. 

Have a good day. Thank you very much.  

link comment (1)
answered 2 years ago
dhip
11
tagged




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



Internet Explorer: Mozilla Firefox: Google Chrome: