Announcement Announcement Module
Collapse
No announcement yet.
Problem to integrate hibernate in spring's web application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem to integrate hibernate in spring's web application

    Hi,

    I am a spring beginner and I have a problem about hibernate integration.
    I am building a little web application using the spring framework.
    I put hibernate configuration property in applicationContext.xml.

    This is the code:

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="driverClassName" value="org.postgresql.Driver"/>
    <property name="url" value="jdbcostgresql://127.0.0.1:5444/Ospedale"/>
    <property name="username" value="enterprisedb"/>
    <property name="password" value="admin"/>
    </bean>

    With only these property configured the web application work fine [I am using JBoss 5.1.0 GA Application Server].

    If I will add the following code[into same applicationContext.xml file ]:

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    </bean>

    the AS doesn't deploy the .war file, blocking itself on the message on the console of JBoss:

    15:29:22,750 INFO [DriverManagerDataSource] Loaded JDBC driver: org.postgresql.Driver

    Can you help me fixing this bug?

    Thanks in advance
Working...
X