今天想集成tapestry5,spring ,hibernate,jdbc.缺遇到了一个奇怪的问题.现在我把spring的配置XML帖一下
报了以下错误,说不能创建这个bean.
4:15:09.250 ERROR! [main] org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:64) >14> Construction of service ServletApplicationInitializer failed: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:348)
at org.apache.tapestry.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:273)
at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:106)
at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:61)
at org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:31)
at org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:49)
at org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54)
at org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:61)
at $ServletApplicationInitializer_1134ceb811c._delegate($ServletApplicationInitializer_1134ceb811c.java)
at $ServletApplicationInitializer_1134ceb811c.initializeApplication($ServletApplicationInitializer_1134ceb811c.java)
at org.apache.tapestry.TapestryFilter.init(TapestryFilter.java:86)
at org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java:71)
at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:310)
at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:509)
at org.mortbay.util.Container.start(Container.java:72)
at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
at org.mortbay.util.Container.start(Container.java:72)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104)
at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)
Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:767)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537)
at org.apache.tapestry.internal.spring.SpringModuleDef$1.getBean(SpringModuleDef.java:57)
at org.apache.tapestry.internal.spring.SpringModuleDef$1.getServiceInterface(SpringModuleDef.java:78)
at org.apache.tapestry.ioc.internal.ModuleImpl.findServiceIdsForInterface(ModuleImpl.java:148)
at org.apache.tapestry.ioc.internal.RegistryImpl.findServiceIdsForInterface(RegistryImpl.java:470)
at org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:439)
at org.apache.tapestry.ioc.services.TapestryIOCModule$2.provide(TapestryIOCModule.java:132)
at $ObjectProvider_1134ceb8123.provide($ObjectProvider_1134ceb8123.java)
at $ObjectProvider_1134ceb811d.provide($ObjectProvider_1134ceb811d.java)
at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:550)
at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:557)
at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:50)
at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:217)
at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:248)
at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:327)
... 20 more
14:15:09.265 INFO [main] org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:152) >10> Initializing filter 'OpenSessionInViewFilter'
14:15:09.296 INFO [main] org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:177) >10> Filter 'OpenSessionInViewFilter' configured successfully
org.mortbay.util.MultiException[java.lang.RuntimeException: Exception constructing service 'ServletApplicationInitializer': Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract]
at org.mortbay.http.HttpServer.doStart(HttpServer.java:686)
at org.mortbay.util.Container.start(Container.java:72)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104)
at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)
java.lang.RuntimeException: Exception constructing service 'ServletApplicationInitializer': Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:69)
at $ServletApplicationInitializer_1134ceb811c._delegate($ServletApplicationInitializer_1134ceb811c.java)
at $ServletApplicationInitializer_1134ceb811c.initializeApplication($ServletApplicationInitializer_1134ceb811c.java)
at org.apache.tapestry.TapestryFilter.init(TapestryFilter.java:86)
at org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java:71)
at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:310)
at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:509)
at org.mortbay.util.Container.start(Container.java:72)
at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
at org.mortbay.util.Container.start(Container.java:72)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104)
at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)
Caused by: java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:348)
at org.apache.tapestry.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:273)
at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:106)
at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:61)
at org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:31)
at org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:49)
at org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54)
at org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:61)
... 12 more
Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:767)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537)
at org.apache.tapestry.internal.spring.SpringModuleDef$1.getBean(SpringModuleDef.java:57)
at org.apache.tapestry.internal.spring.SpringModuleDef$1.getServiceInterface(SpringModuleDef.java:78)
at org.apache.tapestry.ioc.internal.ModuleImpl.findServiceIdsForInterface(ModuleImpl.java:148)
at org.apache.tapestry.ioc.internal.RegistryImpl.findServiceIdsForInterface(RegistryImpl.java:470)
at org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:439)
at org.apache.tapestry.ioc.services.TapestryIOCModule$2.provide(TapestryIOCModule.java:132)
at $ObjectProvider_1134ceb8123.provide($ObjectProvider_1134ceb8123.java)
at $ObjectProvider_1134ceb811d.provide($ObjectProvider_1134ceb811d.java)
at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:550)
at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:557)
at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:50)
at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:217)
at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:248)
at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:327)
... 20 more
java.lang.RuntimeException: Exception constructing service 'ServletApplicationInitializer': Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:69)
at $ServletApplicationInitializer_1134ceb811c._delegate($ServletApplicationInitializer_1134ceb811c.java)
at $ServletApplicationInitializer_1134ceb811c.initializeApplication($ServletApplicationInitializer_1134ceb811c.java)
at org.apache.tapestry.TapestryFilter.init(TapestryFilter.java:86)
at org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java:71)
at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:310)
at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:509)
at org.mortbay.util.Container.start(Container.java:72)
at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
at org.mortbay.util.Container.start(Container.java:72)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282)
at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104)
at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)
Caused by: java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:348)
at org.apache.tapestry.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:273)
at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:106)
at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:61)
at org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:31)
at org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:49)
at org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54)
at org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:61)
... 12 more
Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'transactionIntercetorTemplate': Bean definition is abstract
at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:767)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537)
at org.apache.tapestry.internal.spring.SpringModuleDef$1.getBean(SpringModuleDef.java:57)
at org.apache.tapestry.internal.spring.SpringModuleDef$1.getServiceInterface(SpringModuleDef.java:78)
at org.apache.tapestry.ioc.internal.ModuleImpl.findServiceIdsForInterface(ModuleImpl.java:148)
at org.apache.tapestry.ioc.internal.RegistryImpl.findServiceIdsForInterface(RegistryImpl.java:470)
at org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:439)
at org.apache.tapestry.ioc.services.TapestryIOCModule$2.provide(TapestryIOCModule.java:132)
at $ObjectProvider_1134ceb8123.provide($ObjectProvider_1134ceb8123.java)
at $ObjectProvider_1134ceb811d.provide($ObjectProvider_1134ceb811d.java)
at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:550)
at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:557)
at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:50)
at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:217)
at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:248)
at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:327)
... 20 more
我想尽量重复利用bean,结果tapestry5报出这样的错误.如果不用的abstract=true的话,用另一种方式配置是OK的.