<!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/793718#793718">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 got exactly same issue when running same kind of remote EJB lookup from a unit test or from a simple java client with classpath corretcly setup to include JBOSS_HOME/client/jbossall-client.jar.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left" style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p align="left"><a class="jive-link-anchor-small" rel="nofollow">#</a><a class="jive-link-anchor-small" rel="nofollow">#</a></p><p>&#160; <span style="font-size: 10pt;"><p align="left">10:24:11,528 INFO [ServerImpl] Starting JBoss (Microcontainer)...</p><p>10:24:11,528 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)</p></span></p><p><span style="font-family: courier new,courier;"><span style="font-size: 10pt;"><span style="font-size: 2;"><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p></span></span><p><strong style="color: #7f0055; font-size: 10pt;"><strong style="color: #7f0055; font-size: 10pt;">public</strong></strong><span style="font-size: 10pt;"> </span><strong style="color: #7f0055; font-size: 10pt;"><strong style="color: #7f0055; font-size: 10pt;">static</strong></strong><span style="font-size: 10pt;"> </span><strong style="color: #7f0055; font-size: 10pt;"><strong style="color: #7f0055; font-size: 10pt;">void</strong></strong><span style="font-size: 10pt;"> main(String[] args) </span><strong style="color: #7f0055; font-size: 10pt;"><strong style="color: #7f0055; font-size: 10pt;">throws</strong></strong><span style="font-size: 10pt;"> NamingException {</span></p></span></p><p><span style="font-family: courier new,courier;">Properties properties = new Properties();<br/>properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");<br/>properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");<br/>properties.put(Context.PROVIDER_URL, "localhost:1099");<br/>context = new InitialContext(properties);<br/>Object bean = context.lookup("my-app-ear-name/myBean/remote");</span></p><div class="mcePaste" id="_mcePaste" style="position: absolute; top: 38px; left: 0px;"></div><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Exception in thread "main" javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: ...</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.naming.InitialContext.lookup(InitialContext.java:392)</p><p>....</p><p>Caused by: java.lang.RuntimeException: Exception while trying to locate proxy factory in JNDI, at key ProxyFactory/....<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getProxyFactoryFromJNDI(ProxyObjectFactory.java:<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:157)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ... 4 more</p><p>Caused by: javax.naming.NameNotFoundException: ProxyFactory not bound<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.server.NamingServer.getObject(NamingServer.java:785)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at org.jnp.server.NamingServer.lookup(NamingServer.java:396)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p></p><p>A wrong classpath setup would give</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Exception in thread "main" javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [<br/>aces.NamingContextFactory]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.naming.InitialContext.init(InitialContext.java:223)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at javax.naming.InitialContext.&lt;init&gt;(InitialContext.java:197)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at com.temenos.tafj.tools.jmsinjector.EJBRemoteInvoker.main(EJBRemoteInvoker.java:23)<br/>Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory</p><p></p><p>Do you have any suggestion ?</p><p></p><p>Thanks and regards.</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/793718#793718">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>