******** All compile great, but injection failes every time. I have read, that deployment descriptors are COMPLETELY OPTIONAL. Can anyone help me with this problem? Thanks for any reply. [ March 28, 2008: Message edited by: Max Vaha ]
unfortunately I'm not an expert in EJB but I'd recommend you not starting with a web application to experiment with EJB. You could use a simple Java client application to not make things more complicated than necessary by introducing the web tier in your application.
But there is one thing I know of which could be a problem in your application: You should annotate your local bean interface with @Local. Perhaps this already can solve your problem.
And it's true: You don't have to configure your interfaces and beans with a XML descriptor like you had to in EJB 2.x!
Marco [ March 28, 2008: Message edited by: Marco Ehrentreich ]
Thanks for your answer. Interface is with @Local annotation - error while copy-pasting to site. Now I've edited my first message. I prefer to use EE clients - it's "native" for me, because I develop web applications. So even with @Local annotation there is an error in dependency injection ((
I am trying to run it on Weblogic 10 now (on my job). But I have tried to run it on Glassfish at home with same result - NullPointerException. Project compiles and deploys well. Exception is on runtime. This is console output:
****** I catch NullPointer in my code and set "Injection failed" value to the message field (in MainPageBean).