<!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: EJB3 jndi lookup failed on JBOSS EAP only due to ProxyFactory not bound
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/jnjnc">JN JNC</a> in <i>JNDI and Naming</i> - <a href="https://community.jboss.org/message/793549#793549">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>I have to deploy an application within various application server environments depending on customer environment. I successfully deploy the application in jBoss 4.2.3, 5.1 and 7.1 final. </p><p>I would like to have some "unit-integration" tests to valid my deployment&#160; as fast as I can and test remote EJB invocation and JMS deployment.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I got same issue when trying to invoke a remote EJB deployed within a ear file in JBoss 5.1 from a junit test.</p><p>It doesn't matter which&#160; 3-part pattern I use (app_name/bean_name/remote) or (app_name/remote-bean_name/qualified_bean_name).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please note this test is working fine when I deploy this EAR file in jBoss 4.2.3.</p><p>I didn't try with jBoss 7.1 yet.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>jvax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Exception while trying to locate proxy factory in JNDI, at key ProxyFactory/MY_EAR/MyBean/MY_EAR/MyBean/remote]</p><p>...</p><div class="mcePaste" id="_mcePaste" style="position: absolute; top: 0px; left: 0px;"></div><p>Caused by: java.lang.RuntimeException: Exception while trying to locate proxy factory in JNDI, at key ProxyFactory/MY_EAR/MyBean/MY_EAR/MyBean/remote</p><p>...</p><p> at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getProxyFactoryFromJNDI(ProxyObjectFactory.java:249)<br/> at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:157)<br/> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)<br/> at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)<br/> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)<br/> ... 28 more<br/>Caused by: javax.naming.NameNotFoundException: ProxyFactory not bound<br/> at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)<br/> at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)<br/> at org.jnp.server.NamingServer.getObject(NamingServer.java:785)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I thought about a classloading issue regarding jboss client jar but it doesn't seems to be the case as I got same issue when changing my test to follow Carlo's classloading tip.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a class="jive-link-external-small" href="http://wolf-71.blogspot.fr/2010/02/et-phone-home.html" rel="nofollow">http://wolf-71.blogspot.fr/2010/02/et-phone-home.html</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If I change my test to use this classloading mechanism I got an extra exception</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>java.lang.ClassCastException: org.jboss.jms.client.JBossConnectionFactory cannot be cast to javax.jms.ConnectionFactory<br/> at com.temenos.tafj.sb.JBossServerTest.testCALLATJMSCall(JBossServerTest.java:206)<br/> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/> at java.lang.reflect.Method.invoke(Method.java:597)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any suggestion would be appreciated.</p><p>Cheers<br/> </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/793549#793549">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JNDI and Naming at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>