<!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;">
    Re: lookup for remote bean - failure (only from eclipse)
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/jnjnc">JN JNC</a> in <i>EJB3</i> - <a href="https://community.jboss.org/message/827279#827279">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Sorry for the late, I did some more tests. I only have in my test classpath jbossall-client.jar coming from the server I used.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here is my server log regarding my EJB deployment:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2013-07-10 09:19:01,940 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main) Created KernelDeployment for: MY_JAR.jar</p><p>2013-07-10 09:19:01,941 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:ear=MY_EAR.ear,jar=MY_JAR.jar,name=CallAtProcessingBean,service=EJB3</p><p>2013-07-10 09:19:01,941 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160; with dependencies:</p><p>2013-07-10 09:19:01,941 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160; and demands:</p><p>2013-07-10 09:19:01,941 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jboss.ejb:service=EJBTimerService</p><p>2013-07-10 09:19:01,942 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160; and supplies:</p><p>2013-07-10 09:19:01,942 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:MY_EAR/CallAtProcessingBean/local-com.mycomp.myorg.sb.OFSProcessingBeanLocal</p><p>2013-07-10 09:19:01,942 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;Class:com.mycomp.myorg.sb.OFSProcessingBeanRemote</p><p>2013-07-10 09:19:01,942 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:MY_EAR/CallAtProcessingBean/local</p><p>2013-07-10 09:19:01,942 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;Class:com.mycomp.myorg.sb.OFSProcessingBeanLocal</p><p>2013-07-10 09:19:01,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:MY_EAR/CallAtProcessingBean/remote</p><p>2013-07-10 09:19:01,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main)&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:MY_EAR/CallAtProcessingBean/remote-com.mycomp.myorg.sb.OFSProcessingBeanRemote</p><p>2013-07-10 09:19:01,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] (main) Added bean(jboss.j2ee:ear=MY_EAR.ear,jar=MY_JAR.jar,name=CallAtProcessingBean,service=EJB3) to KernelDeployment of: MY_JAR.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I don't know whether the mapping is correct or not, I supposed it is as it works when invoked from the server, but I could see from that trace that the sequence between local JNDI name and class name is "weird".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As I said as this test is working like a charm in 4.2, thus given the stacktrace:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">Caused by: javax.naming.NameNotFoundException: ProxyFactory not bound</span></p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I tried to replace the jnpclient.jar with former version with no luck.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then given the stacktrace</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">Caused by: java.lang.RuntimeException: Exception while trying to locate proxy factory in JNDI, at key ProxyFactory/....</span></p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getProxyFactoryFromJNDI(ProxyObjectFactory.java:</span></p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:157)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">I get rid of<strong> jboss-ejb3-proxy-impl-client.jar </strong>in my client libraries.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">And my test is going a bit further, it's not failing anymore but second assert fails.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; Object object = initialContext.lookup("MY_EAR/CallAtProcessingBean/remote");</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; assertNotNull(object);</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; assertTrue(object instanceof OFSProcessingBeanRemote);</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">Here is a debug view of "object", thus it seems mapping is correct.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Reference Class Name: Proxy for: com.mycomp.myorg.sb.OFSProcessingBeanRemote</p><p>Type: ProxyFactoryKey</p><p>Content: ProxyFactory/MY_EAR/CallAtProcessingBean/MY_EAR/CallAtProcessingBean/remote</p><p>Type: EJB Container Name</p><p>Content: jboss.j2ee:ear=MY_EAR.ear,jar=MY_JAR.jar,name=CallAtProcessingBean,service=EJB3</p><p>Type: Proxy Factory is Local</p><p>Content: false</p><p>Type: Remote Business Interface</p><p>Content: com.mycomp.myorg.sb.OFSProcessingBeanRemote</p><p>Type: Remoting Host URL</p><p>Content: socket://127.0.0.1:3873/</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;">If I try to do the cast to my type I got, which I guess is expected without the proxy jar.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java.lang.ClassCastException: javax.naming.Reference cannot be cast to com.mycomp.myorg.sb.CallAtProcessingBeanRemote</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any thought about that ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Best regards,</p><p>Jean-Noel</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/827279#827279">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>