Announcement Announcement Module
Collapse
No announcement yet.
Failed to EAGER fetch data fully Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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, 03:55 PM.

    Comment


    • #3
      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

      Comment


      • #4
        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, 03:55 PM.

        Comment

        Working...
        X