日期:2014-05-19  浏览次数:20911 次

Struts+Hibernate+Spring项目整合Jforum论坛问题!
我的项目是用Struts+Hibernate+Spring做的要求加个论坛进去,自己开发时间比较长也不完善,于是想整个jforum论坛进去,研究了半天的jforum实现了不自动加载安装程序,并且可以进入论坛发帖,但是自己的项目却出现了问题!只要是连接数据库的都抛了空指针,个人感觉是applicationContext.xml没有初始化!也不知道是不是lib包有冲突造成~
希望有人能够指点下,先谢谢了!
XML code
<?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/classes/net/market/conf/applicationContext.xml</param-value>
    </context-param>
    
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/classes/net/market/conf/log4j.properties</param-value>
    </context-param>
    
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    
    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
    
   <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml,/WEB-INF/bbs-config.xml,/WEB-INF/users-config.xml,/WEB-INF/message-config.xml,/WEB-INF/active-config.xml,/WEB-INF/message-config.xml,/WEB-INF/favorite-config.xml,/WEB-INF/dictionary-config.xml,/WEB-INF/goods-config.xml,/WEB-INF/shop-config.xml,/WEB-INF/query-config.xml,/WEB-INF/news-config.xml,/WEB-INF/leaveword-config.xml,/WEB-INF/advertisement-config.xml,/WEB-INF/templete-config.xml,/WEB-INF/links-config.xml,/WEB-INF/slip-config.xml</param-value>
   </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  
  <servlet>
      <servlet-name>OnLineChat</servlet-name>
    <servlet-class>net.market.util.OnLineChat</servlet-class>
  </servlet>
  <servlet-mapping>
      <servlet-name>OnLineChat</servlet-name>
      <url-pattern>/onLineChat</url-pattern>
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.php</url-pattern>
  </servlet-mapping>
  <filter>
     <filter-name>encodingFilter</filter-name>
     <filter-class>net.market.control.EncodingFilter</filter-class>
     <init-param>
        <param-name>encode</param-name>
        <param-value>UTF-8</param-value>
     </init-param>
  </filter>
  <filter-mapping>
      <filter-name>encodingFilter</filter-name>
      <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter>
     <filter-name>saftyFilter</filter-name>
     <filter-class>net.market.control.SaftyFilter</filter-class>
  </filter>
  <filter-mapping>
      <filt