ssh整合的时候 出现错误严重: Exception sending context initialized event to listener instance of class org.sprin

  • 目前遇到次错误,不是100%,可能出现可能不出现,最早认为是applicationContext.xml 配置问题,验证后确认都是没有错的,目前有一个办法解决,是tomcat问题,更改tomcat的名字,在运行就能正常运行
严重: 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 class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file D:\IdeaSpace\ssh\out\artifacts\ssh_war_exploded\WEB-INF\classes\com\offcn\entity\Emp.hbm.xml
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
	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:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
	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:4973)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1740)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
	at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:835)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from file D:\IdeaSpace\ssh\out\artifacts\ssh_war_exploded\WEB-INF\classes\com\offcn\entity\Emp.hbm.xml
	at org.hibernate.cfg.Configuration.addFile(Configuration.java:366)
	at org.hibernate.cfg.Configuration.addDirectory(Configuration.java:709)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:710)
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
	... 57 more
Caused by: org.dom4j.DocumentException: Software caused connection abort: recv failed Nested exception: Software caused connection abort: recv failed
	at org.dom4j.io.SAXReader.read(SAXReader.java:484)
	at org.dom4j.io.SAXReader.read(SAXReader.java:264)
	at org.hibernate.cfg.Configuration.addFile(Configuration.java:352)
	... 62 more

在这里插入图片描述
把Unnamed 改名后可正常运行
在这里插入图片描述

注意:改一次名还报错,请重新在改一次,目前就会这种方法

[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Parsing configuration file [struts-default.xml]
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Parsing configuration file [struts-plugin.xml]
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Parsing configuration file [struts.xml]
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Overriding property struts.i18n.reload - old value: false new value: true
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Overriding property struts.configuration.xml.reload - old value: false new value: true
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Loading global messages from message
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Initializing Struts-Spring integration...
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | Setting autowire strategy to name
[SSH] INFO [RMI TCP Connection(3)-127.0.0.1] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(31) | ... initialized Struts-Spring integration successfully
[2018-10-31 04:13:52,545] Artifact ssh:war exploded: Artifact is deployed successfully
[2018-10-31 04:13:52,545] Artifact ssh:war exploded: Deploy took 11,560 milliseconds
十月 31, 2018 4:13:53 下午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
信息: 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.
[SSH] WARN [http-apr-8080-exec-2] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(45) | No configuration found for the specified action: 'userAction' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
[SSH] WARN [http-apr-8080-exec-2] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(45) | No configuration found for the specified action: 'userAction' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
[SSH] WARN [http-apr-8080-exec-4] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(45) | No configuration found for the specified action: 'userAction' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
[SSH] WARN [http-apr-8080-exec-4] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(45) | No configuration found for the specified action: 'userAction' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
[SSH] WARN [http-apr-8080-exec-6] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(45) | No configuration found for the specified action: 'userAction' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
[SSH] WARN [http-apr-8080-exec-6] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.warn(45) | No configuration found for the specified action: 'userAction' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
Hibernate: 
    select
        user0_.uid as uid1_,
        user0_.uname as uname1_,
        user0_.password as password1_ 
    from
        `user` user0_ 
    where
        user0_.uname=?
Hibernate: 
    select
        emp0_.eid as eid0_,
        emp0_.ename as ename0_,
        emp0_.eage as eage0_,
        emp0_.esex as esex0_,
        emp0_.esalary as esalary0_ 
    from
        `emp` emp0_
Hibernate: 
    select
        this_.eid as eid0_0_,
        this_.ename as ename0_0_,
        this_.eage as eage0_0_,
        this_.esex as esex0_0_,
        this_.esalary as esalary0_0_ 
    from
        `emp` this_ limit ?
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值