ssh整合的時候 出現錯誤嚴重: Exception sending context initialized event to listener instance of class org.sprin
阿新 • • 發佈:2018-11-03
- 目前遇到次錯誤,不是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 ?