• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic