gpt4 book ai didi

tomcat - Tomcat 7启动-org.springframework.beans.factory.BeanCreationException:创建名称为bean的错误吗?

转载 作者:行者123 更新时间:2023-11-28 22:26:16 25 4
gpt4 key购买 nike

当我启动Tomcat 7服务器时,出现以下错误?在Tomcat 6中也可以正常工作。

Eclipse Luna控制台中的错误:

严重:StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException:创建在ServletContext资源[/WEB-INF/webaccess-servlet-crons.xml]中定义的名称为'onDemandAggregate'的bean时出错:设置bean属性'时无法解析对bean'aggregateTransaction'的引用aggregateHandler';嵌套的异常是org.springframework.beans.factory.BeanCreationException:在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义名称为'aggregateTransaction'的bean创建时出错:设置bean属性时无法解析对bean'transactionManager'的引用'transactionManager';嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义的名称为'transactionManager'的bean时出错:设置bean属性时无法解析对bean'hibernateSessionFactory'的引用'sessionFactory';嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义的名称为“ hibernateSessionFactory”的bean时出错:初始化bean失败;嵌套的异常是java.lang.NoClassDefFoundError:javax / transaction / TransactionManager
    在org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    在org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run(AbstractAutowireCapableBeanFactory.java:409)
    在java.security.AccessController.doPrivileged(本机方法)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:264)
    在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
    在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    在org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
    在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
    在org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
    在org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
    在org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
    在org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    在javax.servlet.GenericServlet.init(GenericServlet.java:160)
    在org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
    在org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
    在org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
    在org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
    在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
    在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    在org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
    在org.apache.catalina.startup.HostConfig $ DeployDescriptor.run(HostConfig.java:1636)
    在java.util.concurrent.Executors $ RunnableAdapter.call(未知来源)
    在java.util.concurrent.FutureTask.run(未知来源)
    在java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)
    在java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源)
    在java.lang.Thread.run(未知来源)
由以下原因引起:org.springframework.beans.factory.BeanCreationException:在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义名称为'aggregateTransaction'的bean创建时出错:设置bean属性时无法解析对bean'transactionManager'的引用'transactionManager';嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义的名称为'transactionManager'的bean时出错:设置bean属性时无法解析对bean'hibernateSessionFactory'的引用'sessionFactory';嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义的名称为“ hibernateSessionFactory”的bean时出错:初始化bean失败;嵌套的异常是java.lang.NoClassDefFoundError:javax / transaction / TransactionManager
    在org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    在org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory $ 1.run(AbstractAutowireCapableBeanFactory.java:409)
    在java.security.AccessController.doPrivileged(本机方法)
    在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:264)
    在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
    在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    在org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    ...另外36个

这将对我有帮助...
谢谢。

最佳答案

是的,您正确添加了tomcat7 lib文件夹中的jta1.1jar和ojdbc14.jar。
问题已解决。感谢您的宝贵时间。

关于tomcat - Tomcat 7启动-org.springframework.beans.factory.BeanCreationException:创建名称为bean的错误吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43783378/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com