Thanks Jaikiran, I added remote interface and a client

HelloRemote.java
--------------------
package ejb.hello;

import javax.ejb.Remote;

@Remote
public interface HelloRemote {
        public String hello();
}

-------------------------
HelloTestRemote.java
-------------------------

package ejb.web;

import javax.naming.InitialContext;

import ejb.hello.HelloRemote;


public class HelloTestRemote {
        
        /**
         * @param args
         */
        public static void main(String[] args) {
                try {
                        InitialContext ctx = new InitialContext();
                        HelloRemote hellor = (HelloRemote) 
ctx.lookup("HelloBean/remote");
                        if (hellor == null) {
                                System.out.println("Hello is null");
                        }
                        System.out.println("Output = " + hellor.hello());
                }
                catch (Exception ex) {
                        System.out.println("Error in main");
                        ex.printStackTrace();
                }
        }
}


I actually already had remote interface, So didn't deploy the jar again...just 
added new client.
I still get errors,....
---------------------------------

java.lang.reflect.UndeclaredThrowableException
        at $Proxy0.hello(Unknown Source)
        at ejb.web.HelloTestRemote.main(HelloTestRemote.java:20)
Caused by: java.lang.Exception: Can not make remoting client invocation due to 
not being connected to server.
        at org.jboss.remoting.Client.invoke(Client.java:1555)
        at org.jboss.remoting.Client.invoke(Client.java:530)
        at 
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
        at 
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
        at 
org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
        at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
        at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
        at 
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
        ... 2 more
Error in main

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067629#4067629

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067629
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to