SSH整合时出的问题

整合SSH,运行时报:org.springframework.beans.factory.BeanDefinitionStoreException找了很久现是:

把contextConfigLocation写成了ContextConfigLoad(以前我以为是可以随便命名,原来不可以)

<context-param>

<param-name>contextConfigLoad</param-name>

<param-value>classpath:applicationContext.xml</param-value>

</context-param>

 <listener>

完整的错误如下:

2009-3-20 23:06:50 org.apache.catalina.startup.HostConfig checkResources

信息:Reloadingcontext[/MySSH]

2009-3-2023:06:54org.apache.catalina.core.ApplicationContextlog

信息:ClosingSpringrootWebApplicationContext

2009-3-2023:07:16org.apache.catalina.core.StandardContextaddApplicationListener

信息:Thelistener"org.springframework.web.context.ContextLoaderListener"isalreadyconfiguredforthiscontext.Theduplicatedefinitionhasbeenignored.

log4j:WARNNoappenderscouldbefoundforlogger(org.springframework.core.CollectionFactory).

log4j:WARNPleaseinitializethelog4jsystemproperly.

2009-3-2023:07:19org.apache.catalina.core.ApplicationContextlog

信息:InitializingSpringrootWebApplicationContext

2009-3-2023:07:20org.apache.catalina.core.StandardContextlistenerStart

严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanDefinitionStoreException:IOExceptionparsingXMLdocumentfromServletContextresource[/WEB-INF/applicationContext.xml];nestedexceptionisjava.io.FileNotFoundException:CouldnotopenServletContextresource[/WEB-INF/applicationContext.xml]

atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)

atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)

atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)

atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)

atorg.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)

atorg.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)

atorg.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)

atorg.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)

atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)

atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)

atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4350)

atorg.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1114)

atorg.apache.catalina.startup.HostConfig.check(HostConfig.java:1212)

atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)

atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

atorg.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)

atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)

atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)

atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)

atjava.lang.Thread.run(Thread.java:619)

Causedby:java.io.FileNotFoundException:CouldnotopenServletContextresource[/WEB-INF/applicationContext.xml]

atorg.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:116)

atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)

...23more

2009-3-2023:07:20org.apache.catalina.core.StandardContextstart

严重:ErrorlistenerStart

2009-3-2023:07:20org.apache.catalina.core.StandardContextstart

严重:Context[/MySSH]startupfailedduetopreviouserrors

2009-3-2023:07:20org.apache.catalina.core.ApplicationContextlog

信息:ClosingSpringrootWebApplicationContext

2009-3-2023:22:51org.apache.catalina.startup.HostConfigcheckResources

信息:Reloadingcontext[/MySSH]

2009-3-2023:22:51org.apache.catalina.core.StandardContextstop

信息:Containerorg.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MySSH]hasnotbeenstarted

2009-3-2023:22:52org.apache.catalina.core.StandardContextaddApplicationListener

信息:Thelistener"org.springframework.web.context.ContextLoaderListener"isalreadyconfiguredforthiscontext.Theduplicatedefinitionhasbeenignored.

log4j:WARNNoappenderscouldbefoundforlogger(org.springframework.core.CollectionFactory).

log4j:WARNPleaseinitializethelog4jsystemproperly.

2009-3-2023:22:53org.apache.catalina.core.ApplicationContextlog

信息:InitializingSpringrootWebApplicationContext

2009-3-2023:23:04org.apache.catalina.loader.WebappClassLoaderloadClass

信息:Illegalaccess:thiswebapplicationinstancehasbeenstoppedalready.Couldnotloadcom.mysql.jdbc.SQLError.Theeventualfollowingstacktraceiscausedbyanerrorthrownfordebuggingpurposesaswellastoattempttoterminatethethreadwhichcausedtheillegalaccess,andhasnofunctionalimpact.

java.lang.IllegalStateException

atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1246)

atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)

atjava.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

atcom.mysql.jdbc.MysqlIO.send(MysqlIO.java:3246)

atcom.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1656)

atcom.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4261)

atcom.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1248)

atcom.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2655)

atjava.lang.ref.Finalizer.invokeFinalizeMethod(NativeMethod)

atjava.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)

atjava.lang.ref.Finalizer.access$100(Finalizer.java:14)

atjava.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

相关推荐