[jboss-user] [JBoss Web Services] - Re: @EJB Injection

Gustavo Walker do-not-reply at jboss.com
Thu Feb 10 08:40:40 EST 2011


Gustavo Walker [http://community.jboss.org/people/gustavolwalker] created the discussion

"Re: @EJB Injection"

To view the discussion, visit: http://community.jboss.org/message/586694#586694

--------------------------------------------------------------
Hi, 

I had the same problem, but I found problem and now work's fine.
My problem was in the web.xml and sun-web.xml, these files were configured to run on java 5 and java 6 does not.

Code wrong web.xml (Note version 2.5)
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">


Code correct web.xml (Note version 3.0)
<web-app version="3.0" 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_3_0.xsd">


Code wrong sun-web.xml (Note again version 2.5)
<!DOCTYPE sun-web-app PUBLIC -//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN 
http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd>


Code correct sun-web.xml
<!DOCTYPE sun-web-app PUBLIC -//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 3.0//EN 
http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd>


Eclipse with jboss 5 generate this files to servlet's 2.5 on deploy the server don't process @EJB annotation.
To use @EJB annotation your server compatibilit with servlet 3.0. On jboss 6 it's work's fine (I don't run in jboss 5). 


Sorry my english.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/586694#586694]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110210/c5a285d8/attachment-0001.html 


More information about the jboss-user mailing list