2012-08-31 09:19:45,248 [pool-7-thread-1] INFO [localhost].[/testGrails] - Initializing Spring root WebApplicationContext
| Error 2012-08-31 09:19:52,160 [pool-7-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: 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 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
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 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
Line | Method
->> 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
Caused by 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 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
->> 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
Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'lobHandlerDetector' while setting bean property 'lobHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
->> 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
Caused by BeanCreationException: Error creating bean with name 'lobHandlerDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
->> 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
Caused by MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
->> 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
Caused by SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
->> 1429 | createConnectionFactory in org.apache.commons.dbcp.BasicDataSource
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1371 | createDataSource in ''
| 1044 | getConnection in ''
| 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
Caused by ClassNotFoundException: com.mysql.jdbc.Driver
->> 366 | run in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 355 | run in ''
| 354 | findClass in java.net.URLClassLoader
| 423 | loadClass in java.lang.ClassLoader
| 356 | loadClass in ''
| 1420 | createConnectionFactory in org.apache.commons.dbcp.BasicDataSource
| 1371 | createDataSource in ''
| 1044 | getConnection in ''
| 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
Process finished with exit code 1
相关推荐
这个例子实现了用grails 连接mysql 数据库,并且把内容显示出来,可以增删除改,下载这个例子后大家要把jdk tomcat grails环境搭好,然后用grails run-app来执行,也可以用其它的开发工具,本人用的是netbeans
2. **GORM(Grails Object Relational Mapping)**: GORM 是Grails的ORM框架,提供了与数据库交互的能力,支持关系型数据库,如MySQL、PostgreSQL等。它提供了CRUD操作,以及事务管理和动态查询。 3. **插件系统**...
### 使用IntelliJ IDEA连接MySQL数据库的详细指南 在现代软件开发中,数据库操作是必不可少的一部分,特别是对于那些需要处理大量数据的应用程序来说更是如此。IntelliJ IDEA是一款由JetBrains开发的强大集成开发...
GORM支持多种数据库,如MySQL、PostgreSQL等。 4. **Grails命令行工具**:提供了一系列的命令,如`generate-all`用于自动生成控制器、视图和模型类,极大地提高了开发效率。 5. **Grails插件系统**:Grails拥有...
【Grails项目搭建详解】 Grails是一个基于Groovy语言的开源Web应用框架,它简化了开发过程,尤其适合快速构建动态网站。在Eclipse中搭建Grails项目可能相对复杂,但通过以下步骤,即使是初学者也能顺利进行。 1. *...
Grails默认使用H2内存数据库,如需使用MySQL,需修改`Config.groovy`中的数据库配置。添加如下代码: ```groovy dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" username = "your_db_...
1. GORM:Grails的ORM框架,支持关系型数据库如MySQL、PostgreSQL,也支持NoSQL数据库如MongoDB。GORM通过领域类(Domain Class)实现数据建模,提供便捷的数据操作接口。 2. 视图层:Grails支持多种模板引擎,如GSP...
《Grails用户手册》 Grails,作为一个基于Groovy语言的开源Web应用框架,深受开发者喜爱,它简化了Java开发的复杂性,提供了强大的MVC(Model-View-Controller)架构,以及丰富的插件系统。这份用户手册将帮助你...
GORM支持多种数据库,包括MySQL、PostgreSQL和Oracle等,使得开发者可以专注于业务逻辑,而无需关心底层的数据库细节。 #### Services(服务) 在Grails中,服务(Services)是用来封装业务逻辑的组件。它们可以在...
GORM 提供了对数据库的操作接口,使得开发者可以通过面向对象的方式操作数据,减少了与SQL的直接交互,支持关系型数据库如MySQL、PostgreSQL等。 5. **Grails插件系统** Grails 的强大之处在于其丰富的插件库,如...
对于Grails开发,我们需要的是Eclipse中的Grails插件,它能够提供对Grails项目的创建、运行、调试等一系列功能。 **Grails**是基于Groovy语言的全栈式Web开发框架,它借鉴了Ruby on Rails的设计理念,提供了快速...
- 支持的数据库(如MySQL、PostgreSQL等)。 - **开发工具**: - IntelliJ IDEA 8.1用于开发Grails应用,提供集成开发环境支持。 - **入门示例**: - **RaceTrack应用**:本书通过一个名为RaceTrack的应用实例...
Grails遵循一套默认的规约,比如数据库连接、目录结构等,这减少了大量手动配置的需求。然而,当需要自定义时,可以通过`Config.groovy`配置文件进行修改。 5. **运行与测试** - **运行Grails应用**:使用`grails...
在`grails-app/conf/DataSource.groovy`文件中,我们可以配置不同的环境(如开发、测试和生产)下的数据库连接信息。例如,对于MySQL: ```groovy environments { development { dataSource { dbCreate = ...
本指南将深入介绍如何使用Grails结合MySQL数据库来实现用户登录功能,帮助初学者快速入门。 首先,我们需要安装Grails环境。在Windows系统中,可以下载Grails安装包并添加到系统的PATH环境变量中;在Linux或Mac系统...
Grails是一个基于Groovy语言的全栈框架,它遵循约定优于配置的原则,并且紧密集成Spring和Hibernate等流行的Java库,简化了开发流程。Grails在IT行业中尤其受到重视,因为它能够帮助开发者快速搭建并部署基于MVC模式...
- **软件需求**:Grails 1.0rc1、JDK 1.5或更高版本、MySQL和MySQL JDBC Driver(非必需)、Eclipse 3.2或更高版本(带Web Tools和Groovy插件,非必需)。 #### 结语 Grails为Web开发提供了强大的框架支持,尤其...
### Grails 快速开发 Web 应用程序 #### 一、Grails 概述 Grails 是一种基于 Groovy 的开源应用框架,用于简化 Web 应用程序的开发过程。它采用约定优于配置的原则,这使得开发者可以更快地创建功能丰富的 Web ...