Announcement Announcement Module
No announcement yet.
spring2.5 Integration hibernate3.2 and struts2 problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring2.5 Integration hibernate3.2 and struts2 problem

    Hello,I have a problem about integrate Hibernate3.2,Spring2.5 and Struts2.0 .
    when i integrate them, my tomcat5.5 can not start my application.
    Can you help me ?Thanks a lot!

    This is my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_9" version="2.4" xmlns="" xmlns:xsi=""

    <filter-class>org.apache.struts2.dispatcher.FilterDispatch er</filter-class>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    and this is my applicationContext.xml .
    My User.hbm.xml is in the directory of web-inf/classes/com/cpic/xj/user/
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "">
    <beans default-autowire="byName">
    <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource"
    <property name="driverClassName">
    <property name="url">
    <property name="username" value="root" />
    <property name="password" value="nihao123" />

    <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">
    <property name="dataSource" ref="myDataSource" />
    <property name="mappingResources">
    <property name="hibernateProperties">
    <prop key="hibernate.connection.pool_size">0</prop>
    <prop key="hibernate.show_sql">true</prop>
    <prop key="hibernate.dialect">org.hibernate.dialect.MySQ LDialect</prop>
    this is my User.hbm.xml
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD//EN"
    "" >

    <hibernate-mapping package="com.cpic.xj.user" >
    <class name="User" table="oc_user">
    <id name="id" column="id" type="long">
    <generator class="native" />
    <property name="userId" column="userid" type="string" unique="true" />
    <property name="passWord" column="pwd" type="string" not-null="true" length="12" />
    <property name="userName" column="username" type="string" not-null="true" />
    <property name="email" column="email" type="string" />
    <property name="address" column="address" type="string" not-null="true" />
    <property name="phone" column="phone" type="string" not-null="true" />
    <property name="cell" column="cell" type="string" />
    <property name="zipcode" column="zipcode" type="string" />
    this is my lib list
    Last edited by ryman1981; Apr 1st, 2008, 03:44 AM.

  • #2
    When posting code please use [ code][/code ] tags.

    Next to that there is no real problem description/stacktrace. Without it is hard to pin point your problem.


    • #3
      Please note that this forum category is for the "Spring Integration" project. Please ask these question in the web or data-access categories.