论坛首页 入门技术论坛

关于webwork 的Error listenerStart错误!!

浏览 4937 次
该帖已经被评为新手帖
作者 正文
   发表时间:2007-07-06  
初学webwork,在网上找到了一个WebWork.Spring.Hibernate整合开发网络书城的视频教程,相信有很多人看过了这个视频,在第一节作者也出现在此Error listenerStart的异常,解决办法只提到是删掉了一个hibernate的jar包,试过,无用。改过web.xml中的org.springframework.web.context.ContextLoaderListener为org.springframework.web.context.ContextLoaderServlet(有页面跳转功能失效)又在网上查找了许多解决办法,无功而返!请大家,晕三天了。解决不了。
我用的是Myeclipse5.1+Eclipse3.2 +TomCat5.5.23+JDK1.5.0-09+webwork2.2.4请!!谢谢了!!!!!!!!!!!!!!!!!!!!!!

我的配置如下:
-------------------------------------------------------------------------------
web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<filter>
<filter-name>webwork</filter-name>
<filter-class>
com.opensymphony.webwork.dispatcher.FilterDispatcher
</filter-class>
</filter>

<filter-mapping>
<filter-name>webwork</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
-----------------------------------------------------------------------------------

webwork.properties内容为:
webwork.objectFactory=spring

-----------------------------------------------------------------------------------

xwork.xml

<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWok1.0//EN"
"http://www.opensymphony.com/xwork/xwork-1.0.dtd">

<xwork>
<include file="webwork-default.xml"></include>
<package name="default" extends="webwork-default">
<action name="register" class="userAction" method="register">
<result name="success">register_success.jsp</result>
</action>
</package>
</xwork>
-----------------------------------------------------------------------------------
spring的配置文件applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>



<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">

<property name="driverClassName">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</property>
<property name="url">
<value>jdbc:microsoft:sqlserver://localhost:1433</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value>sa</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/thj/bookstore/vo/Orders.hbm.xml</value>
<value>org/thj/bookstore/vo/Orderitem.hbm.xml</value>
<value>org/thj/bookstore/vo/Catalog.hbm.xml</value>
<value>org/thj/bookstore/vo/User.hbm.xml</value>
<value>org/thj/bookstore/vo/Book.hbm.xml</value>
</list>
</property>
</bean>

<bean id="baseDAO" class="org.thj.bookstore.dao.BaseDAO"
abstract="true">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

<bean id="userDAO" class="org.thj.bookstore.dao.impl.UserDAO"
parent="baseDAO">

</bean>

<bean id="userService"
class="org.thj.bookstore.service.impl.UserService">
<property name="userDAO">
<ref bean="userDAO" />
</property>
</bean>

<bean id="userAction" class="org.thj.bookstore.action.UserAction">
<property name="userService">
<ref bean="userService" />
</property>
</bean>
</beans>

-----------------------------------------------------------------------------------
启动tomcat服务器提示信息:

2007-7-6 13:48:40 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_09\bin;D:\workFolder\tomcat-5.5.23\bin
2007-7-6 13:48:40 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2007-7-6 13:48:40 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2172 ms
2007-7-6 13:48:41 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-7-6 13:48:41 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.23
2007-7-6 13:48:41 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2007-7-6 13:48:43 org.apache.catalina.core.ApplicationContext log
信息: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
2007-7-6 13:49:03 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2007-7-6 13:49:03 org.apache.catalina.core.StandardContext start
严重: Context [/bookstort] startup failed due to previous errors
2007-7-6 13:49:05 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2007-7-6 13:49:05 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2007-7-6 13:49:05 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/281  config=null
2007-7-6 13:49:06 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2007-7-6 13:49:06 org.apache.catalina.startup.Catalina start
信息: Server startup in 25922 ms

   发表时间:2007-07-06  
哪个大哥指点下小弟吧,我憋这三天了。快疯掉了,真晕死了。资料查了一大堆,不知道改哪里呀!!!!!!!!!!
0 请登录后投票
   发表时间:2007-07-06  
看起来是log4j没有配置正确

尝试在web.xml中加入:
	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>/WEB-INF/classes/log4j.properties</param-value>
	</context-param>

	<listener>
		<listener-class>
			org.springframework.web.util.Log4jConfigListener</listener-class>
	</listener>


注意log4jConfigLocation要根据你自己的情况配置
0 请登录后投票
   发表时间:2007-07-09  
谢谢帮忙,还是出现同样问题!
0 请登录后投票
论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics