struts+spring No WebApplicationContext found: no ContextLoaderListener registe
web.xml 中<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/spring/applicationContext*.xml</param-value>
</context-param>
<listener>
<listener-class>com.huaye.ehy.framework.jsp.UserSessionListener</listener-class>
</listener>
都都已经配置为什么还出现上述异常,望高手指教,谢谢!!!!!!!!!!!!!!!111
搜索更多相关主题的帖子:
spring found registered struts
----------------解决方案--------------------------------------------------------
跪求那位高手帮帮忙啊,急!!!!!!!!!!!!!!!!!
跪求那位高手帮帮忙啊,急!!!!!!!!!!!!!!!!! ----------------解决方案--------------------------------------------------------
<listener>
<listener-class>com.huaye.ehy.framework.jsp.UserSessionListener</listener-class>
</listener>
你这写的什么listener阿?
这个listener在spring.jar里面。
org.springframework.web.context.ContextLoaderListener
----------------解决方案--------------------------------------------------------
谢谢上面的兄弟答复,但是我就是把
<listener>
<listener-class>com.huaye.ehy.framework.jsp.UserSessionListener</listener-class>
</listener>
改为
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
时候,weblogic
----------------解决方案--------------------------------------------------------
谢谢上面的兄弟答复,但是我就是把
<listener>
<listener-class>com.huaye.ehy.framework.jsp.UserSessionListener</listener-class>
</listener>
改为
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
时候,weblogic还是报出上面的异常
但是不影响我网站的,就是可以打开网站,但是有个错误总是不舒服,肯定有原因的啊,忘多多指教!!!!!
----------------解决方案--------------------------------------------------------
把异常贴上来。
----------------解决方案--------------------------------------------------------
.
CLASSPATH=D:\jdk\J2SDK1~1.2_0\lib\tools.jar;D:\bea\WEBLOG~1\server\lib\weblogic_
sp.jar;D:\bea\WEBLOG~1\server\lib\weblogic.jar;D:\bea\WEBLOG~1\server\lib\ojdbc1
4.jar;D:\bea\WEBLOG~1\common\eval\pointbase\lib\pbserver44.jar;D:\bea\WEBLOG~1\c
ommon\eval\pointbase\lib\pbclient44.jar;D:\jdk\J2SDK1~1.2_0\jre\lib\rt.jar;D:\be
a\WEBLOG~1\server\lib\webservices.jar;.;D:\jdk\j2sdk1.4.2_07\lib\dt.jar;D:\jdk\j
2sdk1.4.2_07\lib\tools.jar
.
PATH=D:\bea\WEBLOG~1\server\bin;D:\jdk\J2SDK1~1.2_0\jre\bin;D:\jdk\J2SDK1~1.2_0\
bin;D:\jdk\j2sdk1.4.2_07\bin;C:\Program Files\PC Connectivity Solution\;E:\oracl
e\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.
1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\StormII\Codec
;D:\StormII;D:\bea\WEBLOG~1\server\bin\oci920_8
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\[hostname]:[port]\console *
***************************************************
<2008-11-1 下午05时21分37秒 CST> <Info> <WebLogicServer> <BEA-000377> <Starting
WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2_07-b05 from Sun Mi
crosystems Inc.>
<2008-11-1 下午05时21分37秒 CST> <Info> <Configuration Management> <BEA-150016>
<This server is being started as the administration server.>
<2008-11-1 下午05时21分37秒 CST> <Info> <Management> <BEA-141107> <Version: WebL
ogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284
WebLogic XMLX Module 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284 >
<2008-11-1 下午05时21分37秒 CST> <Notice> <Management> <BEA-140005> <Loading dom
ain configuration from configuration repository at D:\bea\user_projects\domains\
mydomain\.\config.xml.>
<2008-11-1 下午05时21分39秒 CST> <Notice> <Log Management> <BEA-170019> <The ser
ver log file D:\bea\user_projects\domains\mydomain\myserver\myserver.log is open
ed. All server side log events will be written to this file.>
<2008-11-1 下午05时21分40秒 CST> <Notice> <Security> <BEA-090082> <Security init
ializing using security realm myrealm.>
<2008-11-1 下午05时21分41秒 CST> <Notice> <WebLogicServer> <BEA-000327> <Startin
g WebLogic Admin Server "myserver" for domain "mydomain">
<2008-11-1 下午05时22分06秒 CST> <Warning> <JDBC> <BEA-001129> <Received excepti
on while creating connection for pool "oraclePool": Io 异常: The Network Adapter
could not establish the connection>
<2008-11-1 下午05时22分07秒 CST> <Error> <JDBC> <BEA-001150> <Connection Pool "o
raclePool" deployment failed with the following error: 0:Could not create pool c
onnection. The DBMS driver exception was: Io 异常: The Network Adapter could not
establish the connection.>
<2008-11-1 下午05时22分08秒 CST> <Error> <JDBC> <BEA-001151> <Data Source "oracl
eDatasources" deployment failed with the following error: DataSource(jdbc/dep-er
p) can't be created with non-existent Pool (connection or multi) (oraclePool).>
2008-11-01 17:22:11.203 [INFO]-[org.apache.struts.validator.ValidatorPlugIn] Loa
ding validation rules file from '/WEB-INF/validator-rules.xml'
2008-11-01 17:22:11.218 [INFO]-[org.apache.struts.validator.ValidatorPlugIn] Loa
ding validation rules file from '/WEB-INF/validation.xml'
<2008-11-1 下午05时22分11秒 CST> <Error> <HTTP> <BEA-101216> <Servlet: "action"
failed to preload on startup in Web application: "WebRoot".
javax.servlet.ServletException: No WebApplicationContext found: no ContextLoader
Listener registered?
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:884)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java:848)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:787)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
ervletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
ServletContext.java:3209)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
ServletContext.java:3195)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
pServletContext.java:3174)
at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java
:688)
at weblogic.servlet.internal.WebService.preloadResources(WebService.java
:483)
at weblogic.servlet.internal.ServletInitService.resume(ServletInitServic
e.java:30)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
at weblogic.Server.main(Server.java:32)
>
2008-11-01 17:22:11.515 [INFO]-[org.springframework.web.context.ContextLoader] R
oot WebApplicationContext: initialization started
2008-11-01 17:22:11.578 [INFO]-[org.springframework.core.CollectionFactory] JDK
1.4+ collections available
2008-11-01 17:22:11.953 [INFO]-[org.springframework.beans.factory.xml.XmlBeanDef
initionReader] Loading XML bean definitions from ServletContext resource [/WEB-I
NF/classes/spring/applicationContext-service.xml]
2008-11-01 17:22:12.046 [INFO]-[org.springframework.beans.factory.xml.XmlBeanDef
initionReader] Loading XML bean definitions from ServletContext resource [/WEB-I
NF/classes/spring/applicationContext-dao.xml]
2008-11-01 17:22:12.171 [INFO]-[org.springframework.beans.factory.xml.XmlBeanDef
initionReader] Loading XML bean definitions from ServletContext resource [/WEB-I
NF/classes/spring/applicationContext-datasource.xml]
2008-11-01 17:22:12.203 [INFO]-[org.springframework.web.context.support.XmlWebAp
plicationContext] Bean factory for application context [Root WebApplicationConte
xt]: org.springframework.beans.factory.support.DefaultListableBeanFactory defini
ng beans [dataDictService,resourceService,nativeJdbcExtractor,jdbcTemplate,trans
actionManager,transactionInterceptor,org.springframework.aop.framework.autoproxy
.BeanNameAutoProxyCreator,org.springframework.transaction.interceptor.Transactio
nAttributeSourceAdvisor,dataDictDAO,resourceDAO,dataSource]; root of BeanFactory
hierarchy
2008-11-01 17:22:12.234 [INFO]-[org.springframework.web.context.support.XmlWebAp
plicationContext] 11 beans defined in application context [Root WebApplicationCo
ntext]
2008-11-01 17:22:12.265 [INFO]-[org.springframework.aop.framework.DefaultAopProx
yFactory] CGLIB2 not available: proxyTargetClass feature disabled
2008-11-01 17:22:12.359 [INFO]-[org.springframework.web.context.support.XmlWebAp
plicationContext] Bean 'org.springframework.aop.framework.autoproxy.BeanNameAuto
ProxyCreator' is not eligible for getting processed by all BeanPostProcessors (f
or example: not eligible for auto-proxying)
2008-11-01 17:22:12.375 [INFO]-[org.springframework.web.context.support.XmlWebAp
plicationContext] Unable to locate MessageSource with name 'messageSource': usin
g default [org.springframework.context.support.DelegatingMessageSource@1fc6eed]
2008-11-01 17:22:12.375 [INFO]-[org.springframework.web.context.support.XmlWebAp
plicationContext] Unable to locate ApplicationEventMulticaster with name 'applic
ationEventMulticaster': using default [org.springframework.context.event.SimpleA
pplicationEventMulticaster@ca9a2d]
2008-11-01 17:22:12.390 [INFO]-[org.springframework.ui.context.support.UiApplica
tionContextUtils] Unable to locate ThemeSource with name 'themeSource': using de
fault [org.springframework.ui.context.support.ResourceBundleThemeSource@50a492]
2008-11-01 17:22:12.406 [INFO]-[org.springframework.beans.factory.support.Defaul
tListableBeanFactory] Pre-instantiating singletons in factory [org.springframewo
rk.beans.factory.support.DefaultListableBeanFactory defining beans [dataDictServ
ice,resourceService,nativeJdbcExtractor,jdbcTemplate,transactionManager,transact
ionInterceptor,org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCrea
tor,org.springframework.transaction.interceptor.TransactionAttributeSourceAdviso
r,dataDictDAO,resourceDAO,dataSource]; root of BeanFactory hierarchy]
2008-11-01 17:22:12.687 [INFO]-[org.springframework.web.context.ContextLoader] U
sing context class [org.springframework.web.context.support.XmlWebApplicationCon
text] for root WebApplicationContext
2008-11-01 17:22:12.703 [INFO]-[org.springframework.web.context.ContextLoader] R
oot WebApplicationContext: initialization completed in 1188 ms
2008-11-01 17:22:12.703 [INFO]-[org.springframework.web.filter.CharacterEncoding
Filter] Initializing filter 'setCharacterEncodingFilter'
2008-11-01 17:22:12.718 [INFO]-[org.springframework.web.filter.CharacterEncoding
Filter] Filter 'setCharacterEncodingFilter' configured successfully
<2008-11-1 下午05时22分12秒 CST> <Notice> <WebLogicServer> <BEA-000331> <Started
WebLogic Admin Server "myserver" for domain "mydomain" running in Development M
ode>
<2008-11-1 下午05时22分12秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server
started in RUNNING mode>
<2008-11-1 下午05时22分13秒 CST> <Notice> <WebLogicServer> <BEA-000355> <Thread
"ListenThread.Default" listening on port 7001, ip address *.*>
----------------解决方案--------------------------------------------------------
你看看你的struts-config.xml配置对不对。。
----------------解决方案--------------------------------------------------------
自己改下吧
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/applicationContext*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
----------------解决方案--------------------------------------------------------
实过了,还是报上面的那个异常。。。还有人懂吗???
----------------解决方案--------------------------------------------------------