users@glassfish.java.net

Re: Injection problems

From: Dies Koper <dies_at_jp.fujitsu.com>
Date: Fri, 01 Jun 2007 20:46:34 +0900

Hello Marius,

It looks like you are trying to use a Servlet 2.5 tag ("local") in a
Servlet 2.4 (J2EE1.4) based web.xml. At that time EJB was at 2.x. so it
doesn't support the new tags.
Just rewrite your web.xml to conform to the Servlet 2.5 schema.
(see your <web-app> tag and http://java.sun.com/xml/ns/javaee/index.html#2)

Regards,
Dies

glassfish_at_javadesktop.org wrote:
> I found the answer myself: POJO injection is not supported. The Glassfish EJB FAQ has info on this subject:
> <p>
> https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB
> <p>
> However, this only creates a new problem: deploying my EAR. I tried the example from the FAQ:
> <p>
> <ejb-local-ref>
> <ejb-ref-name>entityserviceref</ejb-ref-name>
> <ejb-ref-type>Session</ejb-ref-type>
> <local>com.bluebricks.net.sql.beans.EntityService</local>
> </ejb-local-ref>
> <p>
> However, Sun Java SAS 9 gives me the following error message when deploying:
> <p>
> Deploying application in domain failed; Error loading deployment descriptors for module [bbear] Line 66 Column 10 -- Deployment descriptor file WEB-INF/web.xml in archive [bb.war]. cvc-complex-type.2.4.a: Invalid content was found starting with element 'local'. One of '{"http://java.sun.com/xml/ns/j2ee":local-home}' is expected.
> <p>
> But, as I have understood it, the local-home was a EJB 2.x matter and no longer required in EJB3. Am I wrong? How can I avoid this except by using local-home?
> <p>
> Marius
> [Message sent by forum member 'mariusw' (mariusw)]
>
> http://forums.java.net/jive/thread.jspa?messageID=219944