• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB injection nullpointer and jsf grammar not found

 
Zdenek Obst
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got 2 problems in my project:

1) I know this topic was here before, but I couldnt find solution working for me. I have netbeans project using jsf+facelets in web application. And then ejb module.
My problem is when I call ejb from managed (backing) bean, I recieve NullPointerException. It seems that container cannot instantialize bean.

2) During reading config faces-config I got exception, that document is invalid and grammar is not found. Googled it and the problem could be using JSF1.1 grammar components in JSF1.2? Is it possible? Or where the problem could be? I have installed NB 6.7.1 with facelets plugin installed. (project works with this exception btw, but.. :-) )

Code and exceptions:



For invoking ejb method i use classic @EJB annotation.

InfoMB:


web.xml


faces-config.xml


Thanks for all answers

 
Zdenek Obst
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tried reinstalling GlassFish, Netbeans btw.

Still same problem. Mainly with EJB injection, still getting NullPointerException. Here is full stack trace after invoking simple method haha



rly dont know what to do:-(
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zdenek Obst wrote:Tried reinstalling GlassFish, Netbeans btw.

Still same problem. Mainly with EJB injection, still getting NullPointerException.


You will have to check the documentation of Glassfish, to see whether the version you are using support EJB injection in JSF managed beans.
 
Zdenek Obst
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out that, if I create now pure JSF project (with default ViewHandler) and so on, calling ejb is ok and injection works. But if I create project and also add Facelets as framework, I', getting NullPointerException. Im using netbeans 6.7.1 and its plugin for Facelets support.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this appears to be IDE specific, i'll move this to the IDE forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic