<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Can't find stateless ejb from web project in Jboss AS 7.1
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/lord-zed">Ali Ben</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/783757#783757">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I am new to ejb and Jboss world and i am facing a problem when trying to execute a stateless bean by its remote interface,</p><p><span style="text-decoration: underline;"><strong>I am doing this:</strong></span></p><p>System.out.println("########### Inscrire Action #############");</p><p>        Candidat c = new Candidat(nom, prenom, mail, telephone, ecole);</p><p>        try {</p><p>            final Properties env = new Properties();</p><p>            env.put(Context.INITIAL_CONTEXT_FACTORY,</p><p>                    org.jboss.naming.remote.client.InitialContextFactory.class</p><p>                            .getName());</p><p>            env.put(Context.PROVIDER_URL, "remote://localhost:4447");</p><p>            env.put(Context.SECURITY_PRINCIPAL, "UserApp");</p><p>            env.put(Context.SECURITY_CREDENTIALS, "password");</p><p>            InitialContext remoteContext = new InitialContext(env);</p><p>            System.out.println("########## Initial Context OK ##########");</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>            servicecandidat = (CandidatSessionRemote) remoteContext</p><p>                    .lookup("java:global/EtestEAProject/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionRemote");</p><p>            System.out.println("########## LookUp OK ##########");</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>            if (servicecandidat.inscrireCandidat(c))</p><p>                return SUCCESS;</p><p>            else</p><p>                return ERROR;</p><p>        }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline; color: #333333;">The console gives the folowing naming exeption</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,474 INFO  [stdout] (http-localhost-127.0.0.1-8080-1) ########## Initial Context OK ##########</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,680 INFO  [stdout] (http-localhost-127.0.0.1-8080-1) ########## LookUp Exchec ##########</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,682 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) javax.naming.NameNotFoundException: global/EtestEAProject/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionRemote -- service jboss.naming.context.java.jboss.exported.global.EtestEAProject.EtestMetier."CandidatSession!sessions.candidat.CandidatSessionRemote"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,685 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,687 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,689 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,690 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,692 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,693 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>15:01:45,695 ERROR [stderr] (http-localhost-127.0.0.1-8080-1)     at java.lang.Thread.run(Unknown Source)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;"><strong>And the ejb jar deployments says:</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>java:global/EtestEAProject/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionRemote</p><p>    java:app/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionRemote</p><p>    java:module/CandidatSession!sessions.candidat.CandidatSessionRemote</p><p>    java:jboss/exported/EtestEAProject/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionRemote</p><p>    java:global/EtestEAProject/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionLocal</p><p>    java:app/EtestMetier/CandidatSession!sessions.candidat.CandidatSessionLocal</p><p>    java:module/CandidatSession!sessions.candidat.CandidatSessionLocal</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>PLEASE help I have been stucked for more than 2 days.....</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/783757#783757">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>