ssh整合问题

在做ssh整合的时候, 启动tomcat会出现如下错误:

2008-11-20 16:23:35 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: E:\Program Files\Java\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;E:\Program Files\Java\jdk1.5.0_11\bin\..\jre\bin\client;E:\Program Files\Java\jdk1.5.0_11\bin\..\jre\bin;D:\OracleClient\bin;E:\Program Files\Java\jdk1.5.0_11\bin;D:\Program Files\jakarta-tomcat-5.0.28\bin;D:\Program Files\apache-ant-1.7.0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\StormII\Codec;C:\Program Files\StormII
2008-11-20 16:23:35 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2008-11-20 16:23:35 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 641 ms
2008-11-20 16:23:35 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-11-20 16:23:35 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.26
2008-11-20 16:23:35 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
2008-11-20 16:23:36 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2008-11-20 16:23:36 org.apache.catalina.core.StandardContext start
严重: Context [/ssh] startup failed due to previous errors
2008-11-20 16:23:37 org.apache.catalina.core.StandardContext processTlds
 

 

 

 

我的环境是: struts2+spring2.0.6+hibernate3.2+eclipse+jdk1.5

搞了很长时间了

 

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">
	
 <context-param>  
    <param-name>contextConfigLocation</param-name>  
    <param-value>/WEB-INF/applicationContext.xml</param-value>  
 </context-param> 

    <filter>
        <filter-name>ssh</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>ssh</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>

</web-app>

 

 

struts.xml

 

<struts>

	   <package name="com.action" extends="struts-default">
	     <action name="Login" class="LoginAction">
	          <result name="success">/jsp/success.jsp</result>
			  <result name="failure">/jsp/error.jsp</result>
		 </action>
   </package>
</struts>

 

 

applicationContext.xml

 

<?xml version="1.0" encoding="GBK"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">


   <bean id="LogAction" class="test.logAction">
	   </bean>
	
	<bean id="LoginAction" class="com.action.LoginAction">
	   </bean>
	
	
	<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="close">
		
		<property name="driverClass" value="com.mysql.jdbc.Driver"/>
	
		<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/CHAN"/>
	
		<property name="user" value="root"/>
	
		<property name="password" value="root"/>
		
		<property name="maxPoolSize" value="20"/>
	
		<property name="minPoolSize" value="1"/>
	
		<property name="initialPoolSize" value="1"/>
	
		<property name="maxIdleTime" value="20"/>
	</bean>

   
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mappingResources">
            <list>
				<value>com/dao/User.hbm.xml</value>
            </list>
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                <prop key="show_sql">true</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
                <prop key="hibernate.jdbc.batch_size">20</prop> 
            </props>
        </property>
    </bean>

    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        <property name="sessionFactory" ref="sessionFactory"/>
    </bean>


    <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
	
        <property name="transactionManager" ref="transactionManager"/>
    	<property name="transactionAttributes">
		
		    <props>
			    <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
		    	<prop key="*">PROPAGATION_REQUIRED</prop>
		    </props>
	    </property>
	</bean>

  
    <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
	    
	    <property name="beanNames">
       
            <list>
                <value>mgr</value>
            </list>
         
	    </property>
     
        <property name="interceptorNames">
            <list>
             
                <value>transactionInterceptor</value> 
            </list>
        </property>
    </bean>
	<bean id="userDao" class="com.dao.UserDaoHibernate">
	  <property name="sessionFactory" ref="sessionFactory"/>
	
	</bean>
    <bean id="mgr" class="com.service.UserManagerImpl">
        <property name="userDao" ref="userDao"/>
    </bean>

</beans>
 

这是一个非常简单的例子, 可是不知道哪里出错了。 弄了两个晚上了! 希望能给出指点

 

谢谢!

 

你可能感兴趣的:(apache,tomcat,Hibernate,bean,ssh)