aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes EJB injection nullpointer and jsf grammar not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "EJB injection nullpointer and jsf grammar not found" Watch "EJB injection nullpointer and jsf grammar not found" New topic
Author

EJB injection nullpointer and jsf grammar not found

Zdenek Obst
Greenhorn

Joined: Mar 19, 2009
Posts: 13
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

Joined: Mar 19, 2009
Posts: 13
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

Joined: Jul 20, 2005
Posts: 10263
    
168

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.


[My Blog] [JavaRanch Journal]
Zdenek Obst
Greenhorn

Joined: Mar 19, 2009
Posts: 13
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

Joined: Jul 20, 2005
Posts: 10263
    
168

Since this appears to be IDE specific, i'll move this to the IDE forum.
 
Consider Paul's rocket mass heater.
 
subject: EJB injection nullpointer and jsf grammar not found