Announcement Announcement Module
Collapse
No announcement yet.
Spring not wiring, InteilliJ says mappings correct. No errors. Help? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring not wiring, InteilliJ says mappings correct. No errors. Help?

    So what I am looking for is a troubleshooting methodology.

    The problem I have is as follows:

    1. I have a simple unit test that checks to see if spring is wiring the entity manager into my DAO. It also checks to see if spring is wiring the target test object. Why test a DAO with a live entity manager in it instead of a mock. Simple, I do it this way before creating the mock in order to have the tests written first. Then I go back and remove the live entity manager and replace it with a mock. This way I know exactly how it is supposed to behave.

  • #2
    Whoops. That was a mis-fire. Here is the complete message:

    So what I am looking for is a troubleshooting methodology.

    The problem I have is as follows:

    I have a simple unit test that checks to see if spring is wiring the entity manager into my DAO. It also checks to see if spring is wiring the target test object. Why test a DAO with a live entity manager in it instead of a mock, you might ask? Simple, I do it this way before creating the mock in order to have the tests written first. Then I go back and remove the live entity manager and replace it with a mock. This way I know exactly how it is supposed to behave. Helps when working with a DB, who's behaviour you are not quite sure of. But I digress... Point is that Spring isn't wiring anything and the question is, how do I troubleshoot this? No errors are produced other than the fact that the entity manager is null. For the record, the object under test is also not being wired.

    Someone here said that the Spring container isn't firing up. This seems reasonable, doesn't it? How can I find out?

    Jim C.

    Comment

    Working...
    X