Announcement Announcement Module
No announcement yet.
Is there a way of getting HibernateDaoSupport working in JBoss AS7/EAP6? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way of getting HibernateDaoSupport working in JBoss AS7/EAP6?

    This is related to

    I am porting a large application from EAP 4.3 to EAP 6.0 (JBoss AS7.1). The legacy app uses Hibernate 3.3.2.GA and Spring 3.0.6. I confirmed all our exceptions occur in Spring 3.1.1 as well. I'm looking to finding the shortest path to getting my Spring context started so I can then work on doing deeper fixes in a working app.

    I found out that HibernateDaoSupport is the class throwing my error.
    1. Did I wire something wrong?
    2. We have a huge investment in SpringHibernate integration. Is there a way to just inject the Hibernate 4 JPA Persistence context bundled with AS7/EAP6 into HibernateDaoSupport? I realize that JPA provides most of what HibernateDaoSupport already does, but right now, I'd like to get my app started before I do deep changes.
    3. Any other possible strategies I can take to getting my SpringContext started?
    4. Any idea why this would work in 4.3 and fail in 6?

    Caused by: java.lang.IllegalStateException: Cannot convert value of type [org.springframework.orm.hibernate3.LocalSessionFac toryBean] to required type [org.hibernate.SessionFactory] for property 'sessionFactory': no matching editors or conversion strategy found
    My code:
    public class HibernateTest extends HibernateDaoSupport {  /**/}
    My config:
      <jee:jndi-lookup id="dataSource" jndi-name="myJNDILookupKey" expected-type="javax.sql.DataSource" />
      <bean id="simpleSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="mappingLocations">
        <property name="hibernateProperties">
            <prop key="hibernate.dialect"></prop>
      <bean id="simplestTest" class="HibernateTest">
        <property name="sessionFactory">
          <ref bean="simpleSessionFactory" />
    Thanks in advance!