• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI: Stub Not Found Exception

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have prepared two Java Classes

1)Registry.java
2)RegistryIntf.java

RegistryIntf extends the java.rmi.remote Interface.

And Registry class Inplements the RegistryIntf and extends PortableRemoteInterface. I am using RMI-IIOP.

I am using Visibroker Naming Service , and also using the Borland Appcenter to manage my Components.

First I compiled my Registry.java .

Next I do java2iiop on the RegistryIntf class. It generates al the POA's Stubs and Ties for the RegistryIntf.


In the RegistryIntf I am using the customized API classes provided to us to register to Naming Service. (I am not using the API's provided by the Visibroker).

Now i prepare a JAR of all the files , and run the Registry class from console , it gave me the exception Registry_Stub not found.

Next I took the same jar and put it into my Borland Appcenter Configuration and make that as a separate component , and then started this from Appcenter . The Component Started correctly and registers itself to the Naming Service.

So can any one tell me why StubNotFound Exception is thrown when i run the Registry class from the console, and the same class runs fine in the Appcenter.

Please let me know if you have any doubts in my above explanation.

TIA
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like it's either a classpath problem, or a problem with not setting some needed system property... What's the full command you are using to run from the console? What do you have your classpath set to in the console?
 
Ankit Singhal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

The thing is that I have not generated the Regisrty_Stub class. When i run java2iiop on the RegistryIntf, the Stubs and the Tie classes of the RegistryIntf are generated .

So my question is that why the program is giving exception in console while it is running fine as a component in Appcenter

TIA
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't used AppCenter before, but the only thing I can think of is what I said before - that AppCenter is setting some kind of system property, or knows how to set up the classpath based on what you provide it - and that this isn't getting done when you run from the command line.
 
reply
    Bookmark Topic Watch Topic
  • New Topic