我是Spring/hibernate的新手,我正在测试我的数据库连接,这个错误一直在显示.如果我错过了什么,请帮帮我.还可以从pom中找到以下休眠依赖项.xml.提前感谢:)
组织.springframework.豆.工厂BeanCreationException:创建名为dbtable的bean时出错,该bean在类路径资源[conf/db-context.xml]中定义:调用init方法失败,嵌套异常为java.lang.NoClassDefFoundError:org/hibernate/boot/registry/selector/StrategyRegistrationProvider位于org.springframework.豆.工厂支持AbstractAutowireCapableBeanFactory.org上的initializeBean(AbstractAutowireCapableBeanFactory.java:1804).springframework.豆.工厂支持AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)位于org.springframework.豆.工厂支持AbstractAutowireCapableBeanFactory.在org上创建Bean(AbstractAutowireCapableBeanFactory.java:542).springframework.豆.工厂支持AbstractBean工厂.org上的lambda$doGetBean$0(AbstractBeanFactory.java:335).springframework.豆.工厂支持DefaultSingletonBeanRegistry.org上的getSingleton(DefaultSingletonBeanRegistry.java:234).springframework.豆.工厂支持AbstractBean工厂.doGetBean(AbstractBeanFactory.java:333)位于com.导线.pl.web.控制器.生命周期.执行事件步骤.在com上执行(executeeventstep.java:44).导线.pl.web.控制器.生命周期.LifecycleRequestHandler.com上的runLifecycleSteps(LifecycleRequestHandler.java:246).导线.pl.web.控制器.生命周期.LifecycleRequestHandler.handleRequest(LifecycleRequestHandler.java:208)位于com.导线.pl.web.控制器.WebControllerImpl 2美元.在com上运行(WebControllerImpl.java:226).导线.pl.web.内部工具.探查器.WebProfiler.com上的profilingBlock(WebProfiler.java:211).导线.pl.web.控制器.WebControllerImpl.ProcessWithProfilingHousing(WebControllerImpl.java:221)位于com.导线.pl.web.控制器.WebControllerImpl.handleRequest(WebControllerImpl.java:195)位于com.导线.pl.web.控制器.WebServlet.handleRequest(WebServlet.java:146)位于com.导线.pl.web.控制器.WebServlet.javax上的doPost(WebServlet.java:86).servlet.http.HttpServlet.javax上的服务(HttpServlet.java:681).servlet.http.HttpServlet.服务(HttpServlet.java:764).阿帕奇.卡特琳娜.果心应用程序过滤器链.org上的internalDoFilter(ApplicationFilterChain.java:228).阿帕奇.卡特琳娜.果心应用程序过滤器链.com上的doFilter(ApplicationFilterChain.java:163).导线.pl.web.控制器.csrf.CSRFTokenFilter.doFilter(CSRFTokenFilter.java:44)位于org.阿帕奇.卡特琳娜.果心应用程序过滤器链.org上的internalDoFilter(ApplicationFilterChain.java:190).阿帕奇.卡特琳娜.果心应用程序过滤器链.doFilter(ApplicationFilterChain.java:163)位于org.阿帕奇.公猫websocket.服务器WsFilter.doFilter(WsFilter.java:53)位于org.阿帕奇.卡特琳娜.果心应用程序过滤器链.org上的internalDoFilter(ApplicationFilterChain.java:190).阿帕奇.卡特琳娜.果心应用程序过滤器链.doFilter(ApplicationFilterChain.java:163)位于org.阿帕奇.卡特琳娜.果心标准包装阀.在org上调用(StandardWrapperValve.java:202).阿帕奇.卡特琳娜.果心标准连接阀.在组织中调用(StandardContextValve.java:97).阿帕奇.卡特琳娜.验证器.AuthenticatorBase.在org调用(AuthenticatorBase.java:542).阿帕奇.卡特琳娜.果心标准主阀.调用(StandardHostValve.java:143).阿帕奇.卡特琳娜.阀门.错误报告阀.在org上调用(ErrorReportValve.java:92).阿帕奇.卡特琳娜.阀门.抽象逻辑阀.在org调用(AbstractAccessLogValve.java:687).阿帕奇.卡特琳娜.果心标准发动机阀.在组织中调用(StandardEngineValve.java:78).阿帕奇.卡特琳娜.连接器.郊狼适配器.org上的服务(CoyoteAdapter.java:357).阿帕奇.郊狼.http11.http11处理器.org上的服务(Http11Processor.java:382).阿帕奇.郊狼.AbstractProcessorLight.org上的进程(AbstractProcessorLight.java:65).阿帕奇.郊狼.AbstractProtocol$ConnectionHandler.过程(AbstractProtocol.java:893).阿帕奇.公猫util.网NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723),org.阿帕奇.公猫util.网SocketProcessorBase.在java上运行(SocketProcessorBase.java:49).基本/java.util.同时发生的线程池执行器.java上的runWorker(ThreadPoolExecutor.java:1128).基本/java.util.同时发生的ThreadPoolExecutor$Worker.在org上运行(ThreadPoolExecutor.java:628).阿帕奇.公猫util.螺纹.TaskThread$WrappingRunnable.在java上运行(TaskThread.java:61).基本/java.lang.Thread.运行(Thread.java:834)由:java引起.lang.NoClassDefFoundError:org/hibernate/boot/registry/selector/StrategyRegistrationProvider.基本/java.lang.ClassLoader.java上的defineClass1(本机方法).基本/java.lang.ClassLoader.java上的defineClass(ClassLoader.java:1016).基本/java.安全SecureClassLoader.java上的defineClass(SecureClassLoader.java:174).基本/java.网URLClassLoader.defineClass(URLClassLoader.java:550)...68更多原因:java.lang.ClassNotFoundException:org.冬眠靴子注册表.选择器.java的StrategyRegistrationProvider.基本/java.网URLClassLoader.java上的findClass(URLClassLoader.java:471).基本/java.lang.ClassLoader.java上的loadClass(ClassLoader.java:588).基本/java.lang.ClassLoader.loadClass(ClassLoader.java:521)...109更多
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.framework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${springframework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc</artifactId>
<version>${sqlserver.jdbc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>${commons.dbcp2.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>
org.apache.servicemix.bundles.ehcache
</artifactId>
<version>${ehcache.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${apache.poi.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.24.Final </version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.4.24.Final</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons.beanutils.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>5.4.24.Final</version>
<exclusions>
<exclusion>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>