• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

EJB injection nullpointer and jsf grammar not found

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:-(
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this appears to be IDE specific, i'll move this to the IDE forum.
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic