Announcement Announcement Module
Collapse
No announcement yet.
Spring 1.2.6 supports Hibernate 3.1.2? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 1.2.6 supports Hibernate 3.1.2?

    Wanted to ask a quick question to see if anybody had the same problem.

    I am using Spring 1.2.6 and Hibernate 3.0.5. Everything is working.
    However, if I replace it with Hibernate 3.1.2 jar (without changing anything else),
    I always get an error message:

    21:45:18,359 ERROR ContextLoader:205 --> Context initialization failed org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/appCtx-data.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: Could not read mapping document from file: C:\example\web\WEB-INF\classes\example\User.hbm.xml

    The User.hbm.xml is absolute there. Cannot figure out why. I need to use Hibernate 3.1.2 for its new features.

    Any clue?

    Does Spring 2.0 M2 supports Hibernate 3.1.2?

    Thanks!!!
    Last edited by pjydc; Feb 15th, 2006, 09:26 PM.

  • #2
    Probably HB 3.1.2 changed the way it loaded the mappings - try using other mapping* properties to see if you find a workaround.
    I have used spring 2.0m2 myself in this scenario but you can give it a try and see how it works. If it doesn't please report the issue on jira.

    Comment


    • #3
      Resovled.

      I directly went to Spring 2.0 M2 and Hibernate 3.1.2.

      In my case, HB 3.1.2 has some mapping changes. It was my mapping
      files that caused the Tomcat startup failure. However, the Hibernate parse
      routines generated a really off-mark message shown in my originial post.

      I did not test whether Spring 1.2.6 works with HB 3.1.2. However,
      based on my experience in this case, I think the answer is YES, because I have
      not done anything else except correcting my Hibernate mapping files when
      going to Spring 2.0 M2.

      Hope this help other folks wishing to upgrade to Spring 2.0.

      Hibernate is great! Spring is GREATER!
      Last edited by pjydc; Feb 16th, 2006, 11:04 PM.

      Comment


      • #4
        Spring 2.0M2 does NOT supports Hibernate 3.1.2

        I need to correct what I said before. After I ran my Hibernate 3.0.5-based application on the platform of Spring 2.0 M2 + Hibernate 3.1.2, I discovered some problems. Precisely speaking, Spring 2.0M2 does NOT supports Hibernate 3.1.2.

        Comment


        • #5
          We have a problem with LIE with Hibernate 3.1.2 and Spring 1.2.6.

          An entity named Element has a lazy ManyToOne relation to a Customer. In our application we utilizing the OSIV to ensure an open session in the view layer. Using Spring MVC we get a list of Element and iterate using the jstl forEach tag and print out the customer name. It works fine with Hibernate 3.1 Beta 3 and Spring 1.2.6 but after upgrading to Hibernate 3.1.2 it breaks with a LIE when the Customer relation is accessed. I've found similar issues described in the forum and the JIRA but none that describes the problem exactly.
          Anyone have any ideas what might be wrong?

          Comment


          • #6
            Aaahhh, solved the problem.
            My mistake, it was new features in SWF that caused the problem.

            Comment

            Working...
            X