• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

jboss 4.3.2GA downgrade Hibernate to avoid "illegal attempt to dereference collection" ?

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I recently upgraded my application from Jboss 4.0.3 SP1 to 4.3.2GA and upon testing this exception surfaced up. Basically in my code i am references collections rather then using explicit joins.



Where I referencing the name property of the permission entity. Hibernate version 3.1 resolves this into an appropriate SQL join but hibernate 3.2.4sp1 doesn't. Also this is a knows issue as per my research.


hibernate version which the application works fine (on Jboss 4.0.3sp1):


  • hibernate3.jar -- 3.1.rc2
  • hibernate-annotations.jar -- 3.1beta5
  • hibernate-entitymanager.jar -- 3.1beta3


  • After up upgrade to jboss 4.3.2GA

  • hibernate3.jar -- 3.2.4.sp1
  • hibernate-annotations.jar -- 3.2.1.GA
  • hibernate-entitymanager.jar -- 3.2.1.GA



  • I understand a downgrade would be the answer but to which version as hibernate 3.1rc2 (and related components) which I was using were released in "2005-10-17" and the 3.2.4sp1 was released in "2007-05-18". So its a good 2 year of development and changes.



    Q:
    Now my concern is that how can I avoid this by not going through a code change ? Is their a workaround for this ?



    Thank you.


    Asad Imtiaz
     
    Bartender
    Posts: 10336
    Hibernate Eclipse IDE Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Basically, your attempt to implicitly join accross a collection has never been valid it just used to work by accident. See the Hibernate 3.2 migration guide.

    To avoid changing your bad HQL and not downgrading JBoss you could package the version of Hibernate you want to use with your application and make sure the classloaders know to try the application first. Personally, I would change the buggy code and package Hibernate with your application (IMHO its always iffy to rely on the contaner to supply anything more than JEE classes).
     
    Asad Imtiaz
    Greenhorn
    Posts: 21
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thank you for the quick response Paul. I will surely take a look into that as well.

    And is there a compatibility matrix available for each version of hibernate ? which can tell me which library/component version is compatible with version of hibernate core?
     
    Curse your sudden but inevitable betrayal! And this tiny ad too!
    New web page for Paul's Rocket Mass Heaters movies
    https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
    reply
      Bookmark Topic Watch Topic
    • New Topic