yongan915
2015-09-18 05:18
采纳率: 20%
浏览 1.6k
已采纳

用ssh写的一个小的登陆网页老报这个错是什么原因?怎么解决?新手求助!请多多帮助!

2015-9-18 13:15:20 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Users\DELL\AppData\Local\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;D:\apache-tomcat-6.0.30\bin
2015-9-18 13:15:21 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2015-9-18 13:15:21 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 360 ms
2015-9-18 13:15:21 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2015-9-18 13:15:21 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.30
2015-9-18 13:15:21 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.
2015-9-18 13:15:22 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.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/db.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [classpath*:hibernate/User.hbm.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1403)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:545)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4172)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4671)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:701)
at org.apache.catalina.startup.Catalina.start(Catalina.java:585)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.io.FileNotFoundException: class path resource [classpath*:hibernate/User.hbm.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:677)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400)
... 27 more
2015-9-18 13:15:22 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2015-9-18 13:15:22 org.apache.catalina.core.StandardContext start
严重: Context [/ssh3] startup failed due to previous errors
2015-9-18 13:15:22 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2015-9-18 13:15:22 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/ssh3] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2015-9-18 13:15:22 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2015-9-18 13:15:22 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2015-9-18 13:15:22 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory configuration
2015-9-18 13:15:22 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2015-9-18 13:15:22 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2015-9-18 13:15:22 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2015-9-18 13:15:22 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2015-9-18 13:15:22 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2015-9-18 13:15:22 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/16 config=null
2015-9-18 13:15:22 org.apache.catalina.startup.Catalina start
信息: Server startup in 1622 ms


  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • threenewbee 2015-09-18 06:23
    已采纳

    第一:这是因为 User.hbm.xml 这个文件里面的 class 路径写错了。
    第二:先确定你项目里有这个文件吗,如果没有请添加,或者你已经存在application配置文件,此外还要注意最好把application.xml加入到classpath里,就是放到你的包里。最简单的是放在src下就行。
    第三:可能是tomact 没有加载进来,这个时候就要先清除,再重新加载。
    为什么还要写80个字才能发布呀,真烦人。

    评论
    解决 无用
    打赏 举报
查看更多回答(2条)

相关推荐 更多相似问题