0

I am using Cactus to test a servlet which has an injected ejb (EJB 3.0) using @EJB annotation. The servlet is working fine when executed as part of the web application but while running the cactus test it is failing to inject the ejb. I am getting a null pointer exception. Please let me know if there is any limitation of ejb dependency injection in cactus.

kiransri
  • 25
  • 1
  • 4
  • It seems hard to say anything without more details. How are you using Cactus exactly? – Pascal Thivent Nov 08 '10 at 11:52
  • I was using new to instantiate the servlet and hence it was not being managed by the container. I have corrected this issue. thanks for your time and help – kiransri Nov 09 '10 at 11:26
  • You can place this as an answer and accept it yourself - would make it easier for other people to solve the same issue. – Michael K Dec 10 '10 at 21:09

1 Answers1

1

I was using new to instantiate the servlet and hence it was not being managed by the container. I have corrected this issue. thanks for your time and help

kiransri
  • 25
  • 1
  • 4