webtier@glassfish.java.net

Re: NullPointerException when using _at_ManagedBean or @PersistenceUnit in a Phase

From: <webtier_at_javadesktop.org>
Date: Wed, 02 Dec 2009 11:40:27 PST

Further Notes:

1. Yes my web.xml is versioned to 2.5. Here is my line:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

2. I did verify the PU name (as seen in my example code that I just submitted)

3. Could the issue (NullPointerException on the emf.createEntityManager();) be due to the fact that the AuthenticationBean.isLoggedIn() is being called from the PhaseListener? (the PhaseListener is NOT a ManagedBean)
[Message sent by forum member 'jeffcampbell' ]

http://forums.java.net/jive/thread.jspa?messageID=374355