You have to code to an interface, and not to the concrete class/implementation. Spring doesn't inject an object of your class, but in place injects a proxy to your class. This is needed for Aspect Oriented Programming (AOP). The proxy implements the interfaces that your class implements, but is not an instance of your class. Just code to the interface, and your problem should be solved (I guess). Another thing that might solve the problem is to add the following line to your bean definition
Of course you'll need to add the aop name-space to your XML file. As I have said that the second solution might solve the problem, but I do not guarantee this. We have used this to solve a similar problem with DWR, but that's another story.
It looks like you already have an interface for the ActorModelService (which probably extends IService<DefaultActorModel, Long>).
If so, you should make the ActorModelService class implement the IActorModelService (so it will have the same interace as your declared service bean).
And then use:
Alaa Nassef
Ranch Hand
Joined: Jan 28, 2008
Posts: 460
posted
0
Exactly. Thanks Costi
Trilochan Bharadwaj
Ranch Hand
Joined: Feb 02, 2009
Posts: 100
posted
0
Replaced Concrete Implementation with Interface and also replaced and it worked fine ... Cool thanks All!
One more thing I noted since I am deploying on JBOSS; JBOSS's JNDI binding for UserTransaction are as opposed to . Once those changes were made it all went well.