bean-grails框架service互相引用问题

问题描述

grails框架service互相引用问题


我new了一个ReuqestService文件,,,在UserService中引用它,报错...在加requestService前不报错,把RequestService中的taskService去掉也不报错....但我需要在RequestService中引用taskService,,现在正无从下手

........

以下是报错信息
| Error 2015-05-19 21:32:01,696 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'ApplicationFilters': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
Message: Error creating bean with name 'ApplicationFilters': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
Line | Method
->> 262 | run in java.util.concurrent.FutureTask


| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'userService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
->> 262 | run in java.util.concurrent.FutureTask


| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eventService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
->> 262 | run in java.util.concurrent.FutureTask

Caused by BeanCreationException: Error creating bean with name 'companyService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
->> 262 | run in java.util.concurrent.FutureTask


| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name '(inner bean)#3': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
->> 262 | run in java.util.concurrent.FutureTask


| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by BeanCurrentlyInCreationException: Error creating bean with name 'userService': org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is not fully initialized yet
->> 262 | run in java.util.concurrent.FutureTask

时间: 2024-10-29 06:55:19

bean-grails框架service互相引用问题的相关文章

oc-spring管理的单例bean能否在service中手动new实例化?

问题描述 spring管理的单例bean能否在service中手动new实例化? 以下配置的ModuleTest这个类能否在其他service方法中直接手动new实例化? <bean id="moduleTest" class="com.hh.ProTest.ModuleTest"></bean> service的配置如下: <bean id="serviceTest" class="com.hh.Serv

grails 框架 hibernate user.save() 问题

问题描述 grails 框架 hibernate user.save() 问题 user 有 三个字段 ,id,name,age (age在数据库中默认值是0) user.save(),name赋值是"kevin",age赋值是18, 但是插入到数据库中name值是kevin,age是0,1分钟后数据库中的age又自动改为18,大神说这是hibernate的什么什么库的排队机制,无法理解^_^,. ,只有特殊的操作流程会触发1这一分钟左右的排队时间,请问谁给我讲一下,,以及是否可以解决

Grails框架优劣势分析及同类比较

Grails的优势 DRY(Don't Repeat Yourself,不要重复自己),约定优于配置(Convention over Configuration) DRY和约定优先于配置的思想,是由Rails兴起并迅速被广泛接收和欣赏的Web框架新思路.Grails作为JEE世界的Rails,把这些最前沿的设计理念带入已显得陈旧的JEE社区,拥有鲜明突出的特点,以及由此带来的优秀的开发效率. DRY 的思想是避免重复的信息.Grails中的DRY主要提现在URL映射定义上(URLMappings

发送邮件的问题

问题描述 我写了发送邮件的类 当自己写main测试的时候可以发送邮件但是在spring mvc 的框架 service层 引用这个对象的时候 tomcat启动就出现了 java.lang.NoClassDefFoundError: javax/mail/SendFailedException 谁遇到过这个问题啊 解决方案 应该是tomcat的jar包和你自己的jar冲突造成的.你替换一下试试解决方案二:代码啊代码

【浅谈JavaEE框架】Spring常用注解,自动扫描装配Bean

1.引入context命名空间(在Spring的配置文件中) 配置文件如下:  Xml代码   1.xmlns:context="http://www.springframework.org/schema/context"     2.http://www.springframework.org/schema/context   3.http://www.springframework.org/schema/context/spring-context-2.5.xsd    打开配置

Spring(一)之IOC、bean、注入

spring简介 spring的优势 概览 典型的完整Spring Web应用的模式图 IoC控制反转容器 简介 基本原理 - 容器和bean bean 容器 基于XML配置配置元数据 实例化容器 XML配置元数据的结构 bean 多种bean bean定义 bean的命名 bean的别名 实例化bean 使用静态工厂方法实例化 bean的作用域 Singleton作用域单例模式 Prototype作用域实例 Singleton beans和prototype-bean的依赖 其他作用域 初始化

一个快速集成框架:MVP+Dagger+主流框架,有它足矣

前言 今年的Android技术圈中MVP,Dagger2,Rxjava,Retrofit这些词汇非常火,随便打开一个技术论坛都充斥着大量的关于这些技术的文章,Github也充斥着各种以基于MVP+Retrofit+RxJava+Dagger2+MaterialDesign开发的xxxx为标题的开源项目或Demo. 但是大家这么热心的开源此类项目,一直重复的做着同样的事教授大家使用的方式和技巧有没有想过依赖一个第三方库,就可以快速的搭建此类框架? 特性 自动生成MVP,Dagger2相关类 版本更

使用Grails构建富Internet应用程序,第1部分:使用Grails和Flex构建Web应用程序

简介:富 Internet 应用程序(Rich Internet Applications,RIA)通过浏览器保证桌面应用程序 的动态性和功能.RIA 的主要特征之一就是将表示层移动到客户机,并使用服务器上健壮的 RESTful 服 务层支持它.这种想法借助 SOUI(Service Oriented User Interface)和 SOFEA(Service Oriented Front End Architecture)之类的热门词汇得到传播. 关于本系列 这个系列探索一些应 用程序架构,

使用Grails构建富Internet应用程序,第2部分

相关文章: 使用Grails构建富Internet应用程序,第1部分:使用Grails和Flex构建Web应用程序 Grails和Google Web Toolkit 简介:在这个共 2 部分的系列的第 2 部分中,将基于您在 第 1 部分 中用 Grails 创建的 Web 服 务创建新的服务.您将创建一个新的搜索页面,但这一次使用 Google Web Toolkit (GWT) 来创建这个 应用程序.此外,您还将使用 Ext GWT 库中的一些更丰富的 UI 小部件. 关于本系列 这个系列