Hi,

From the JBoss forums:

"Well .. looks like JBoss 4.0.4GA still has javax.annotation.EJB instead of javax.ejb.EJB. The result was that JBoss silently ignored the (wrong) annotation and DI did not work. "

To which someone official-sounding replied:

"Crap, sorry guys!!! They kept switching package names around over the last few weeks in committee. I'll get out a new release ASAP."

This last post was made in June; can I assume that if I download JBoss 4.04GA (again) this problem will be fixed? With my relatively limited bandwidth I don't want to download the whole thing just to find that the problem wasn't fixed. The release notes don't give any indication.

Unfortunately, I tried including Sun's javaee.jar (1) in my project and then (2) in server/default/lib but that made JBoss very unhappy. Does anyone have a jar I could just put into JBoss's lib directory? That would be a much better option than downloading and installing JBoss again.

Regards,
Fritz

On 7/28/06, Lisa Retief <[EMAIL PROTECTED]> wrote:

Hi Fritz,

On 7/28/06, Fritz Meissner < [EMAIL PROTECTED]> wrote:
>     private @EJB ASessionLocal sessionBean;
>

This should work.

If you are in a different container (ie. VM) you will need to specify
JNDI name, eg.:
@EJB(name="ASessionLocal")
public ASessionLocal sessionBean;

A colleague of mine was have an issue earlier this week because the
EJB annotation had been repackaged - it used to be
javax.annotations.EJB (I think) and then became javax.ejb.EJB. He had
a different library in his compile classpath to his runtime classpath
and this caused him the exact same NullPointer in his Servlet
injection that you are describing. Check that out.

Lisa


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

Reply via email to