Results 1 to 4 of 4

Thread: Failed to EAGER fetch data fully

  1. #1
    Join Date
    May 2007
    Posts
    5

    Question Failed to EAGER fetch data fully

    I have deployed an spring+JPA+hibernate application on tomcat. Below is the relationship of objects in my application.

    Object A (1)-- (1) Object B (1) --- (N) Object C

    I have implemented using JPA annotation on object A,B and C with Fetch EAGER. So Whenever I query an object A, it should return a list of object C. With the unit testing it appears there is no problem returning a list of object C. However with the tomcat it returns only one object of C. I'm dumbfounded why it should not return a list.

    With the unit test, I use ClasspathXmlApplicationContext to retrieve the xml and create a handler to set DAO with entityManager object. As for the tomcat I let the container to set the DAO. Any idea why it's giving a different result??

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

    Default

    I would presume there must be something different between the two tests you run. It's always a good idea to up the logging and some the two outputs.
    Last edited by karldmoore; Aug 27th, 2007 at 03:55 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.

  3. #3
    Join Date
    May 2007
    Posts
    5

    Default

    thanks for your feedback..It's my bad. The jar files used in the web application are incorrect. Apparently I have two different set of release of hibernate package. I mixed some jar files from the older release.

    Thx

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

    Default

    Quote Originally Posted by andre999 View Post
    thanks for your feedback..It's my bad. The jar files used in the web application are incorrect. Apparently I have two different set of release of hibernate package. I mixed some jar files from the older release.
    ahhhhh ok that makes more sense. Glad you fixed it.
    Last edited by karldmoore; Aug 27th, 2007 at 03:55 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.

Posting Permissions

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