spring整合hibernate报错

一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.SetAllPropertiesRule begin
警告: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'URIEcoding' to 'utf-8' did not find a matching property.
一月 25, 2018 10:18:47 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ssh' did not find a matching property.
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.0.48
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Nov 30 2017 16:26:50 UTC
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.0.48.0
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jre1.8.0_151
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_151-b12
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         F:\eclipse\apache-tomcat-8.0.48
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         F:\eclipse\apache-tomcat-8.0.48
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=F:\eclipse\apache-tomcat-8.0.48
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=F:\eclipse\apache-tomcat-8.0.48
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=F:\eclipse\apache-tomcat-8.0.48\wtpwebapps
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=F:\eclipse\apache-tomcat-8.0.48\endorsed
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
一月 25, 2018 10:18:47 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_151\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_151/bin/server;C:/Program Files/Java/jre1.8.0_151/bin;C:/Program Files/Java/jre1.8.0_151/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_151\bin;C:\Program Files\Java\jdk1.8.0_151\jre\bin;F:\eclipse\apache-maven-3.5.2\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;F:\svn\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;F:\eclipse;;.
一月 25, 2018 10:18:47 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
一月 25, 2018 10:18:47 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
一月 25, 2018 10:18:47 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
一月 25, 2018 10:18:47 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
一月 25, 2018 10:18:47 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1075 ms
一月 25, 2018 10:18:47 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
一月 25, 2018 10:18:47 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.48
一月 25, 2018 10:18:49 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 25, 2018 10:18:49 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
一月 25, 2018 10:18:50 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
一月 25, 2018 10:18:51 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [cn.muke.ssh.domain.ProductDao] for bean with name 'productDao' defined in class path resource [applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: cn.muke.ssh.domain.ProductDao
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1262)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1331)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:897)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:566)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4852)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5313)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    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)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: cn.muke.ssh.domain.ProductDao
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
    at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:417)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1283)
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1254)
    ... 18 more

一月 25, 2018 10:18:51 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
一月 25, 2018 10:18:51 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/ssh] startup failed due to previous errors
一月 25, 2018 10:18:51 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
一月 25, 2018 10:18:51 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\docs
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\docs has finished in 128 ms
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\examples
一月 25, 2018 10:18:52 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
一月 25, 2018 10:18:52 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\examples has finished in 523 ms
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\host-manager
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\host-manager has finished in 35 ms
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\manager
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\manager has finished in 33 ms
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\ROOT
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\eclipse\apache-tomcat-8.0.48\webapps\ROOT has finished in 26 ms
一月 25, 2018 10:18:52 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
一月 25, 2018 10:18:52 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
一月 25, 2018 10:18:52 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 4773 ms

application-context.xml 文件如下:

<bean id="productService" class="cn.muke.ssh.service.ProductService">
        <property name="productDao" ref="productDao"/>
    </bean>
    
    <context:property-placeholder location="classpath:jdbc.properties"/>
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <property name="dirverClass" value="${jdbc.driverClass}"></property>
        <property name="jdbcUrl" value="${jdbc.url}"></property>
        <property name="user" value="${jdbc.username}"></property>
        <property name="password" value="${jdbc.password}"></property>
    </bean>
    
    <bean id="ssesionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSOurce"/>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hibernate.format_sql">true</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
            </props>
        </property>
    </bean>

项目目录 如下:


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Mountain TopN

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值