File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Unable to create new StubId Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Unable to create new StubId" Watch "Unable to create new StubId" New topic
Author

Unable to create new StubId

Miguel Angel Romero Ledesma
Greenhorn

Joined: Apr 28, 2003
Posts: 3
Hello everybody:
At first, sorry my horrible english.
I�m working with a sevlet that is running in WebSphere 3.52. I have an EJB too that is running in another machine with WebSphere 3.52.
The aplication is working correctly, but in the system log appear the message "Unable to create new StubId" when I invoke the methods of the remote interface. The home was looking up in the method init of the servlet.
It isn�t critical for me but I�d like to know what�s happening.
Any idea? Thank you.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
How exactly does your Servlet access the EJB on the other machine? Make sure when you create the initialContext for looking up the home, you are using the correct URL to identify the host running the EJB server....
Miguel Angel Romero Ledesma
Greenhorn

Joined: Apr 28, 2003
Posts: 3
Hello Ajith Kallambella:
In the method init of the servlet the code is:
Object homeObject = ctx.lookup(nameEJB);
EJBHome home = (EJBHome)PortableRemoteObject.narrow((org.omg.CORBA.Object)homeObject, EJBHome.class);
ejbMap.put(nameEJB, home);
Where ejbMap is an instance variable.
In the method service of the servlet the code is:
Iterator ejbHomes = ejbMap.values().iterator();
while(ejbHomes.hasNext()) {
EJBHome home = ((EJBHome)ejbHomes.next());
ejbRemote = home.create();
ejbRemote.doWork();
}
When I invoke the method create() and doWork(), the system print the trace "Unable to create new StubId", but the application works correctly. That trace seems an informative trace, not an error trace.
Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to create new StubId