Results 1 to 3 of 3

Thread: hibernate config

  1. #1

    Default hibernate config

    <?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="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
    <property name="location"><value>/WEB-INF/hibernate.properties</value></property>
    </bean>

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="url"><value>${hibernate.connection.url}</value></property>
    <property name="driverClassName"><value>${hibernate.connecti on.driver_class}</value></property>
    <property name="username"><value>${hibernate.connection.user name}</value></property>
    <property name="password"><value>${hibernate.connection.pass word}</value></property>
    </bean>

    <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSess ionFactoryBean">
    <property name="dataSource"><ref bean="dataSource"/></property>
    <property name="mappingResources">
    <list>
    <value>com/test/model/CatalogItem.hbm.xml</value>
    </list>
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">${hibernate.dialect}</prop>
    </props>
    </property>
    </bean>
    <!--
    -->

    <!--
    <bean id="catalogItemDao" class="com.test.dao.hibernate.CatalogItemDaoImp">
    <property name="sessionFactory"><ref bean="sessionFactory"/></property>
    </bean>
    -->
    </beans>



    I'm not sure how to go about debugging this stuff. I'm having a problems with the sessionFactory bean. If I comment it out, then the application will load on tomcat without any problems. As soon as I uncomment it...it won't load. I've looked at the tomcat logs and they don't really have very much information.

  2. #2
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default

    Does your application have its own log file separated from tomcat's (depending on how log4j is configured)? You need to tell us more than "it won't load" for us to be able to help you.
    --Jing Xue

  3. #3

    Default

    For some reason my log4j was not working correctly but after I reinstalled some things. The log messages showed that I needed to set org.springframework.orm.hibernate3.LocalSessionFac toryBean instead of what I had above. Looks like the packaging structure was changed dramatically since hibernate 2.0.

Similar Threads

  1. Replies: 2
    Last Post: Apr 12th, 2012, 09:34 AM
  2. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  3. Replies: 2
    Last Post: Apr 25th, 2005, 07:17 AM
  4. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM
  5. Replies: 7
    Last Post: Aug 21st, 2004, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •