NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Kenan Unal Posted via mailing list.
|
Posted: Thu Feb 12, 2009 7:33 pm Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
When I try to deploy a servlet that calls an EJB, I get the following error:
Deploying application in domain failed; Error loading deployment descriptors for module [EJBApp-war] -- Cannot resolve reference Unresolved Ejb-Ref test.TestServlet/fooBean@jndi: @null@test.FooLocal@Session@null.
EJB is a very simple stateless session bean:
*/
@Stateless
public class FooBean implements FooLocal {
public String sayHello(String name) {
return null;
}
}
Servlet is also very simple:
public class TestServlet extends HttpServlet {
@EJB
private FooLocal fooBean;
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
...
out.println("Hello "+fooBean.sayHello(request.getParameter("name")));
....
}
I am using Netbeans 6.5 to create the EJB and Servlet. Any idea about the error? Thanks - Kenan |
|
| Back to top |
|
 |
sergej
Joined: 18 Aug 2008 Posts: 99 Location: Cremona (ITALY)
|
Posted: Thu Feb 12, 2009 8:48 pm Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
Try to add an <ejb-local-ref> tag to web.xml with a reference to the
session bean.
Sergio
On Thu, 2009-02-12 at 14:32 -0500, Kenan Unal wrote:
| Quote: | When I try to deploy a servlet that calls an EJB, I get the following
error:
Deploying application in domain failed; Error loading deployment
descriptors for module [EJBApp-war] -- Cannot resolve reference
Unresolved Ejb-Ref test.TestServlet/fooBean@jndi:
@null@test.FooLocal@Session@null.
EJB is a very simple stateless session bean:
*/
@Stateless
public class FooBean implements FooLocal {
public String sayHello(String name) {
return null;
}
}
Servlet is also very simple:
public class TestServlet extends HttpServlet {
@EJB
private FooLocal fooBean;
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
...
out.println("Hello
"+fooBean.sayHello(request.getParameter("name")));
....
}
I am using Netbeans 6.5 to create the EJB and Servlet. Any idea about
the error? Thanks - Kenan
| --
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed
--
There are only 10 types of people in the world:
those who understand binary, and those who don't... |
|
| Back to top |
|
 |
Kenan Unal Posted via mailing list.
|
Posted: Thu Feb 12, 2009 9:19 pm Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
Ok. I did the following changes in web.xml.
<ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
</ejb-local-ref>
Now I am getting the error:
java.lang.RuntimeException: Cannot resolve reference Unresolved Ejb-Ref ejb/FooBean@jndi: @null@test.FooLocal@Session@null
On Thu, Feb 12, 2009 at 3:47 PM, Sergio Bello <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Try to add an <ejb-local-ref> tag to web.xml with a reference to the
session bean.
Sergio
On Thu, 2009-02-12 at 14:32 -0500, Kenan Unal wrote:
| Quote: | When I try to deploy a servlet that calls an EJB, I get the following
error:
Deploying application in domain failed; Error loading deployment
descriptors for module [EJBApp-war] -- Cannot resolve reference
Unresolved Ejb-Ref test.TestServlet/fooBean@jndi:
@null@test.FooLocal@Session@null.
EJB is a very simple stateless session bean:
*/
@Stateless
public class FooBean implements FooLocal {
public String sayHello(String name) {
return null;
}
}
Servlet is also very simple:
public class TestServlet extends HttpServlet {
@EJB
private FooLocal fooBean;
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
...
out.println("Hello
"+fooBean.sayHello(request.getParameter("name")));
....
}
I am using Netbeans 6.5 to create the EJB and Servlet. Any idea about
the error? Thanks - Kenan
|
--
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed ([email]address-removed[/email])
--
There are only 10 types of people in the world:
those who understand binary, and those who don't...
|
|
|
| Back to top |
|
 |
sergej
Joined: 18 Aug 2008 Posts: 99 Location: Cremona (ITALY)
|
Posted: Thu Feb 12, 2009 9:35 pm Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
Add an <ejb-link>, also:
<ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
<ejb-link>FooBean</ejb-link>
</ejb-local-ref>
And (just to be sure) check if your local interface is tagged with the
@Local annotation.
Sergio
On Thu, 2009-02-12 at 16:19 -0500, Kenan Unal wrote:
| Quote: | <ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
</ejb-local-ref>
| --
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed
--
There are only 10 types of people in the world:
those who understand binary, and those who don't... |
|
| Back to top |
|
 |
Kenan Unal Posted via mailing list.
|
Posted: Fri Feb 13, 2009 1:05 am Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
The local interface is tagged with @Local
@Local
public interface FooLocal {
String sayHello(String name);
}
But when I added <ejb-link> I get the following error;
Deploying application in domain failed; Error loading deployment descriptors for module [EJBApp-war] -- Error: Unresolved <ejb-link>: FooBean
On Thu, Feb 12, 2009 at 4:35 PM, Sergio Bello <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Add an <ejb-link>, also:
<ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
<ejb-link>FooBean</ejb-link>
</ejb-local-ref>
And (just to be sure) check if your local interface is tagged with the
@Local annotation.
Sergio
On Thu, 2009-02-12 at 16:19 -0500, Kenan Unal wrote:
| Quote: | <ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
</ejb-local-ref>
|
--
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed ([email]address-removed[/email])
--
There are only 10 types of people in the world:
those who understand binary, and those who don't...
|
|
|
| Back to top |
|
 |
sergej
Joined: 18 Aug 2008 Posts: 99 Location: Cremona (ITALY)
|
Posted: Fri Feb 13, 2009 2:12 pm Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
I've not a clue...
If it's just a test project, you can pack and send it to me *on my
private email* and I will look into it.
Sergio
On Thu, 2009-02-12 at 20:05 -0500, Kenan Unal wrote:
| Quote: | The local interface is tagged with @Local
@Local
public interface FooLocal {
String sayHello(String name);
}
But when I added <ejb-link> I get the following error;
Deploying application in domain failed; Error loading deployment
descriptors for module [EJBApp-war] -- Error: Unresolved <ejb-link>:
FooBean
On Thu, Feb 12, 2009 at 4:35 PM, Sergio Bello <address-removed>
wrote:
Add an <ejb-link>, also:
<ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
<ejb-link>FooBean</ejb-link>
</ejb-local-ref>
And (just to be sure) check if your local interface is tagged
with the
@Local annotation.
Sergio
On Thu, 2009-02-12 at 16:19 -0500, Kenan Unal wrote:
| Quote: | <ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
</ejb-local-ref>
|
--
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed
--
There are only 10 types of people in the world:
those who understand binary, and those who don't...
| --
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed
--
There are only 10 types of people in the world:
those who understand binary, and those who don't... |
|
| Back to top |
|
 |
Kenan Unal Posted via mailing list.
|
Posted: Fri Feb 13, 2009 5:18 pm Post subject: Problem to deploy war app - Unresolved Ejb-Ref |
|
|
Reinstalling NetBeans solved my problem Thanks
On Fri, Feb 13, 2009 at 9:12 AM, Sergio Bello <address-removed ([email]address-removed[/email])> wrote:
| Quote: | I've not a clue...
If it's just a test project, you can pack and send it to me *on my
private email* and I will look into it.
Sergio
On Thu, 2009-02-12 at 20:05 -0500, Kenan Unal wrote:
| Quote: | The local interface is tagged with @Local
@Local
public interface FooLocal {
String sayHello(String name);
}
But when I added <ejb-link> I get the following error;
Deploying application in domain failed; Error loading deployment
descriptors for module [EJBApp-war] -- Error: Unresolved <ejb-link>:
FooBean
On Thu, Feb 12, 2009 at 4:35 PM, Sergio Bello <address-removed ([email]address-removed[/email])>
wrote:
Add an <ejb-link>, also:
<ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
<ejb-link>FooBean</ejb-link>
</ejb-local-ref>
And (just to be sure) check if your local interface is tagged
with the
@Local annotation.
Sergio
On Thu, 2009-02-12 at 16:19 -0500, Kenan Unal wrote:
| Quote: | <ejb-local-ref>
<ejb-ref-name>ejb/FooBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooLocal</local>
</ejb-local-ref>
|
--
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed ([email]address-removed[/email])
--
There are only 10 types of people in the world:
those who understand binary, and those who don't...
|
--
Sergio Bello - Software Architect
Sintechno S.r.l. [www.sintechno.it]
Via Dante, 188
26100 - Cremona (ITALY)
Phone 0372 22942
Fax 0372 565287
Mobile 329 9499343
EMail address-removed ([email]address-removed[/email])
--
There are only 10 types of people in the world:
those who understand binary, and those who don't...
|
|
|
| Back to top |
|
 |
ngoclantim.lc
Joined: 12 Mar 2010 Posts: 3
|
Posted: Sat Apr 03, 2010 7:20 pm Post subject: Error: Unresolved <ejb-link> |
|
|
Hi, everybody
I have the same error.I have project .ear but:
Deploy.ear successful
Deploy .ejb successful
Deploy .war failded and error is:
Deploying application in domain failed; Error loading deployment descriptors for module [smart_ticket_temp] -- Error: Unresolved <ejb-link>: SmartTicketFacadeBean
C:\Users\DucPhuong\Documents\NetBeansProjects\temp\smart_ticket_temp\nbproject\build-impl.xml:574: The module has not been deployed.
BUILD FAILED (total time: 1 second)
I added .ejb in library of .war, web.xml and ejb-jar.xml have ejb-reference the same. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|