Results 1 to 7 of 7

Thread: Problems regarding Hibernate after updating Spring 1.2.x to 2.0.x

  1. #1
    Join Date
    Jul 2006
    Location
    Rome, Italy
    Posts
    347

    Default Problems regarding Hibernate after updating Spring 1.2.x to 2.0.x

    Hi guys,

    I have to update Spring 1.2.x to Spring 2.0.x in an old application which also uses Hibernate 3.0.x.

    After updating, I get a NoClassDefFound: org.hibernate.exception.DataException
    So, is Spring 2.0.x compatible with Hibernate 3.0.x?
    Is it just a matter of this NoClassDefFound problem, or is there any other problem?

    Thanks in advance,
    Cheers,

    Sergio B.
    Sergio Bossa
    Spring Modules Team

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,630

    Default

    No problems here with Spring 2.0 and Hibernate 3.0, 3.1 and 3.2. Also make sure that you use the correct Hibernate support classes (if you use those that is). Also make sure that you don't have some other hibernate/spring jar in your classpath, make sure that there is only 1.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jul 2006
    Location
    Rome, Italy
    Posts
    347

    Default

    Quote Originally Posted by mdeinum View Post
    No problems here with Spring 2.0 and Hibernate 3.0, 3.1 and 3.2. Also make sure that you use the correct Hibernate support classes (if you use those that is). Also make sure that you don't have some other hibernate/spring jar in your classpath, make sure that there is only 1.
    Mmmmhhhhh ....
    The problem is that Hibernate 3.0.x doesn't *actually* have that exception class, and you'll never get the NoClassDefFound error until you don't get that exception.
    However, I hope that the problem is just that one.

    Thanks,
    Cheers,

    Sergio B.
    Sergio Bossa
    Spring Modules Team

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,630

    Default

    I think that it is a little worse I think that you will get it each time you get an Exception from Hibernate. It is one that is checked in the begining of the SessionFactoryUtils#convertHibernateAccessExceptio n method.

    You might try a version before Spring 2.0.6 to check if it is also in there (maybe the original 2.0 release?).

    Edit:

    According to the changelog it was added in 2.0.3 so changing to 2.0.2 would probably fix it. Next to that I would suggest a reording in the SessionFactoryUtils convert method, maybe raise a JIRA issue for that?
    Last edited by Marten Deinum; Jul 16th, 2007 at 06:12 AM.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    Jul 2006
    Location
    Rome, Italy
    Posts
    347

    Default

    Quote Originally Posted by mdeinum View Post
    I think that it is a little worse I think that you will get it each time you get an Exception from Hibernate. It is one that is checked in the begining of the SessionFactoryUtils#convertHibernateAccessExceptio n method.
    Yes, I know.
    At the moment I've solved by including in my libraries a jar with the missing exception.

    Quote Originally Posted by mdeinum View Post
    According to the changelog it was added in 2.0.3 so changing to 2.0.2 would probably fix it. Next to that I would suggest a reording in the SessionFactoryUtils convert method, maybe raise a JIRA issue for that?
    Thanks for the info.
    I'm going to raise a Jira issue.

    Cheers,

    Sergio B.
    Sergio Bossa
    Spring Modules Team

  6. #6
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Is there a reference to the JIRA issue?
    Last edited by karldmoore; Aug 27th, 2007 at 04:32 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  7. #7
    Join Date
    Jul 2006
    Location
    Rome, Italy
    Posts
    347

    Default

    Quote Originally Posted by karldmoore View Post
    Is there a reference to the JIRA issue?
    http://opensource.atlassian.com/proj...rowse/SPR-3687
    Sergio Bossa
    Spring Modules Team

Posting Permissions

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