This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes Exception while executing home.create() method. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Exception while executing home.create() method." Watch "Exception while executing home.create() method." New topic
Author

Exception while executing home.create() method.

rahul.v. Joshi
Greenhorn

Joined: Feb 18, 2007
Posts: 1
Hi,
I've created a 2.0 HelloWorld EJB, Deployed on Jboss 4.2.2
My client code is like,
InitialContext ic = new InitialContext();

Object o = ic.lookup("HelloWorld");
HelloWorldHome hello=null;
try{
hello = (HelloWorldHome)PortableRemoteObject.narrow(o, HelloWorldHome.class);
HelloWorld helloWorld = hello.create();
// System.out.println(helloWorld.getClass());
// helloWorld.sayHello("Rahul");
}catch(Exception e){
e.printStackTrace();
}


Here I am getting home interface but call on create() methid throws following exception.

java.lang.reflect.UndeclaredThrowableException
at $Proxy0.create(Unknown Source)
at mypackage1.Client.main(Client.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:1639)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:183)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
... 2 more

Thanks in Advance,
-Rahul.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30361
    
150

Rahul,
Welcome to JavaRanch!

Can not make remoting client invocation due to not being connected to server.

This seems to be clearly stating the error. Now the question is 'why'. Where are you running the client from? A servlet, your desktop, on the server, etc?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception while executing home.create() method.