当我启动Tomcat 7服务器时,我收到以下错误?同样在Tomcat 6中工作正常。
Eclipse Luna控制台出错:
严重:StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException:使用名称' onDemandAggregate'创建bean时出错。在ServletContext资源[/WEB-INF/webaccess-servlet-crons.xml]中定义:无法解析对bean' aggregateTransaction'的引用设置bean属性' aggregateHandler&#39 ;;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名称为' aggregateTransaction'的bean时出错在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义:无法解析对bean' transactionManager'的引用设置bean属性' transactionManager&#39 ;;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名称为' transactionManager'的bean时出错。在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义:无法解析对bean的引用' hibernateSessionFactory'设置bean属性' sessionFactory&#39 ;;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为' hibernateSessionFactory'的bean时出错。在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义: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) at java.security.AccessController.doPrivileged(Native Method) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at 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) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) 在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at 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) at 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) at java.util.concurrent.Executors $ RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source) 在java.lang.Thread.run(未知来源) 引起:org.springframework.beans.factory.BeanCreationException:创建名称为' aggregateTransaction'的bean时出错在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义:无法解析对bean' transactionManager'的引用设置bean属性' transactionManager&#39 ;;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名称为' transactionManager'的bean时出错。在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义:无法解析对bean的引用' hibernateSessionFactory'设置bean属性' sessionFactory&#39 ;;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为' hibernateSessionFactory'的bean时出错。在ServletContext资源[/WEB-INF/webaccess-servlet.xml]中定义: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) at java.security.AccessController.doPrivileged(Native Method) 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at 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个
这对我有帮助...... 谢谢。
答案 0 :(得分:0)
是的,你是正确的在tomcat7 lib文件夹中添加了jta1.1jar和ojdbc14.jar。 问题解决了。谢谢你的时间。