springmvc+hbrat整合出现这个错误,求大神帮帮忙

问题描述

springmvc+hbrat整合出现这个错误,求大神帮帮忙

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoBase' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [applicationContext.xml]: 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' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
at com.test3.dao.DaoCity.getAllList(DaoCity.java:25)
at com.test3.serv.CityService.getAllList(CityService.java:21)
at com.test3.ctrl.CityCtrl.getCityList(CityCtrl.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:97)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1349)
at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1305)
at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1289)
at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1197)
at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993)
at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [applicationContext.xml]: 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' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 42 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 52 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.(Configuration.java:152)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newConfiguration(LocalSessionFactoryBean.java:818)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:549)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 59 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory (in EnvironmentClassLoader[web-app:production/webapp/default/ROOT])
at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1532)
at com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1502)
... 71 more

解决方案

spring配置文件配置有问题,,,先试下springmvc能运行不能,一个一个来

时间: 2024-11-08 18:08:01

springmvc+hbrat整合出现这个错误,求大神帮帮忙的相关文章

今天上传到小米应用平台 说以下错误 求大神帮分析下

问题描述 今天上传到小米应用平台 说以下错误 求大神帮分析下 java.lang.UnsatisfiedLinkError,dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/net.woaoo-2/base.apk"],nativeLibraryDirectories=[/data/app/net.woaoo-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn

算法-c++的一个简单的实现 求大神帮帮忙

问题描述 c++的一个简单的实现 求大神帮帮忙 1. 定义一个普通帐户类Account,成员变量包括:string型的m_acctNo(账号)和m_acctPass(取款密码),double型的m_balance(余额).成员函数包括构造函数,取款WithDraw(double m).存款Deposit(double m).修改密码ChangePass()和显示帐户信息Display(). 以Account类做基类,派生出信用卡类Credit,新增成员变量m_overDraft,表示信用卡透支额

c#-跪求大神帮帮忙,都好说。。。

问题描述 跪求大神帮帮忙,都好说... 实验目的: 1. 掌握常用控件的属性.方法.事件 2. 掌握窗体的常用属性.方法和事件 3. 掌握Windows应用程序人机界面可视化设计方法 4. 掌握事件驱动模型的思想 5. 巩固C#语言中类的定义.继承.流程控制语句等基础知识 实验步骤: (1) 在.Net环境中建立Windows窗体应用程序: (2) 定义枚举类型 Public enum SexType {男, 女, 未知}: Public enum ProTitle (助教,讲师,副教授.教授.

数据库出问题了,不会弄了,求大神帮帮忙,下午就要交作业了

问题描述 数据库出问题了,不会弄了,求大神帮帮忙,下午就要交作业了 解决方案 参考Management Data Warehouse Data Collection fails due to login failure 错误信息提到了可能是访问权限不足,你的SQL服务器代理的账户对MDW数据库需要有mdw_admin, mdw_reader, mdw_writer角色,对msdb有e dc_admin, dc_operator, dc_pro角色 SQL Server Agent with an

虚拟机下构架hadoop测试跑wordcount报错,求大神帮帮忙.

问题描述 虚拟机下构架hadoop测试跑wordcount报错,求大神帮帮忙. 用虚拟机虚拟一台namenode,三台datanode,配置完成可以运行起来,也可以在网页中查看状态,但是跑wordcount时出现了task id:attempt_1441184180788_0001 status:failed的错误,也没有抛出,实在没有办法,具体问题截屏如下,望大神们给予帮助 解决方案 http://www.cnblogs.com/madyina/p/3708153.html 解决方案二: 几台

新人小白求助 很简单的一个修改密码的代码,但密码一直修改不成功,求大神帮帮忙

问题描述 这是我的修改密码的代码,要求输入用户名,密码,原密码和确认密码四个内容usingSystem;usingSystem.Linq;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebC

c语言-pat 部分A+B 求大神帮帮忙,初学C语言

问题描述 pat 部分A+B 求大神帮帮忙,初学C语言 找不出错误... 正整数A的"DA(为1位整数)部分"定义为由A中所有DA组成的新整数PA.例如:给定A = 3862767,DA = 6,则A的"6部分"PA是66,因为A中有2个6. 现给定A.DA.B.DB,请编写程序计算PA + PB. 输入格式: 输入在一行中依次给出A.DA.B.DB,中间以空格分隔,其中0 < A, B < 1010. 输出格式: 在一行中输出PA + PB的值. 输入

图片-My sql服务启动不了,求大神帮帮忙!

问题描述 My sql服务启动不了,求大神帮帮忙! 第一张图片是我按照网上的教程添加的一个文本文件,里头有一些代码. 问题就如第二张图所示,服务无法启动,但是却没有发现任何错误.有谁能帮我吗 解决方案 直接命令行启动服务试试,然后出错后查看一下系统日志中的错误描述信息 解决方案二: 是不是要在最前面要加一行? [mysqld] 解决方案三: 在你的my.ini文件里啊,而且你先启动mysqld没有 ,C:>mysqld-nt.exe --install MySQL-noinstall --def

新生 求大神帮帮忙!

问题描述 新生 求大神帮帮忙! 解决方案 求大神帮帮忙 解决方案二: 先看看你的数据库启动了没 解决方案三: 试试: 打开'程序'-'所有程序'-'Microsoft SQL Server 2012 '-'配置工具'-'SQL Server 配置管理器',在弹出的窗体中,找到'SQL Server 2012 网络配置',把'MSSQLSERVER的协议'下的"Named Pipes"和"TCP/IP"启动,然后重新启动Microsoft SQL Server 201