<!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;">
    JBoss 4 to JBoss 6 - remoting client invocation - Exception due to not being connected to server
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/katerchen0815">Volker Biermann</a> in <i>JBoss Remoting</i> - <a href="https://community.jboss.org/message/772371#772371">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello,</p><p>we have an Web Start application using JBoss. The client application works fine with JBoss 4.2.3.GA but throws Exception using JBoss 6. We use a code sniplet to invoke a bean home interface:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>try</b></font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"connectionStr:"</font>, connectionStr);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"jndiName:"</font>, jndiName);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; EJBHome home = getHome(connectionStr, jndiName, homeClass);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"Home"</font>, <font color="red">"ok"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"Home"</font>, home.toString());
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Method createMethod = homeClass.getMethod(<font color="red">"create"</font>, (Class[])<font color="navy"><b>null</b></font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"createMethod"</font>, <font color="red">"ok"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"createdMethod "</font>, createMethod.toString());
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Object bean = createMethod.invoke(home, (Object[])<font color="navy"><b>null</b></font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"bean"</font>, <font color="red">"ok"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// sessionCache.put(jndiName, bean);</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>return</b></font> bean;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// }</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// return sessionCache.get(jndiName);</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>catch</b></font> (ILServiceLocatorException e)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"bean"</font>, e.getMessage());
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>throw</b></font> e;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>catch</b></font> (Exception ex)
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; writeLog(<font color="red">"Exception type"</font>, ex.toString());
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; PrintWriter pw = <font color="navy"><b>null</b></font>;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>try</b></font> 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pw = <font color="navy"><b>new</b></font> PrintWriter(<font color="navy"><b>new</b></font> FileWriter(<font color="red">"c:\\test\\properties.txt"</font>, <font color="navy"><b>true</b></font>));
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ex.printStackTrace(pw);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pw.flush();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pw.close();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font> 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>catch</b></font> (IOException e) 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// TODO Auto-generated catch block</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.printStackTrace();
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>throw</b></font> <font color="navy"><b>new</b></font> ILServiceLocatorException(
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; getMessageString(<font color="red">"ErrorCreateBusinessDelegate.001"</font>), ex);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As a result we will get:</p><p>--- JBoss 4.2.3.GA ---</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Okt 25,2012 15:26 - connectionStr:: jnp://192.168.16.220:10000 </p><p>Okt 25,2012 15:26 - jndiName:: ILUserAuthentication </p><p>Okt 25,2012 15:26 - Home: ok </p><p>Okt 25,2012 15:26 - Home: ILUserAuthenticationHome </p><p>Okt 25,2012 15:26 - createMethod: ok </p><p>Okt 25,2012 15:26 - createdMethod : public abstract com.identalink.bpauth.ILUserAuthentication com.identalink.bpauth.ILUserAuthenticationHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException </p><p>Okt 25,2012 15:26 - bean: ok </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>--- JBoss 6.1.Final ---</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Okt 25,2012 15:50 - connectionStr:: jnp://192.168.16.220:10000 </p><p>Okt 25,2012 15:50 - jndiName:: ILUserAuthentication </p><p>Okt 25,2012 15:51 - Home: ok </p><p>Okt 25,2012 15:51 - Home: ILUserAuthenticationHome </p><p>Okt 25,2012 15:51 - createMethod: ok </p><p>Okt 25,2012 15:51 - createdMethod : public abstract com.identalink.bpauth.ILUserAuthentication com.identalink.bpauth.ILUserAuthenticationHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException </p><p>Okt 25,2012 15:51 - Exception type: java.lang.reflect.InvocationTargetException </p><p>java.lang.reflect.InvocationTargetException</p><p>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)</p><p>&#160;&#160;&#160; at com.identalink.utils.ILServiceLocator.getSessionBean(ILServiceLocator.java:283)</p><p>&#160;&#160;&#160; ... 43 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Caused by: java.lang.Exception: Can not make remoting client invocation due to not being connected to server.</p><p>&#160;&#160;&#160; at org.jboss.remoting.Client.invoke(Client.java:2075)</p><p>&#160;&#160;&#160; at org.jboss.remoting.Client.invoke(Client.java:879)</p><p>&#160;&#160;&#160; at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:184)</p><p>&#160;&#160;&#160; at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)</p><p>&#160;&#160;&#160; at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)</p><p>&#160;&#160;&#160; at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)</p><p>&#160;&#160;&#160; at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)</p><p>&#160;&#160;&#160; at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)</p><p>&#160;&#160;&#160; at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)</p><p>&#160;&#160;&#160; at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)</p><p>&#160;&#160;&#160; ... 44 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We think it has something to do of changes on jboss-remoting.jar. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>How can we solve the problem?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank you for your help</p><p>Volker</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/772371#772371">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Remoting at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2050">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


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

</div>

</body>
</html>