• 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 Help Needed

 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,
I have implemented the Server in RMI. I wanted to know why i keep getting am error message "No such Object in Table"

In my server cocstructor i create a serviceImpl instance which is bound to the registry. Later i get the instance of the server using RMI but when i call any method on that stub i get this error.

Also i return a POJO from one of the methods of the service interface. However, it is not bound to the registry. Please can you tell me if i need to bind all the objects that are returned by the methods of the service interface?
TIA,
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Folks,
I have implemented the Server in RMI. I wanted to know why i keep getting am error message "No such Object in Table"

In my server cocstructor i create a serviceImpl instance which is bound to the registry. Later i get the instance of the server using RMI but when i call any method on that stub i get this error.

Also i return a POJO from one of the methods of the service interface. However, it is not bound to the registry. Please can you tell me if i need to bind all the objects that are returned by the methods of the service interface?
TIA,


The implementation class of RMI interface (serviceImpl) is the only one to be bound. And that's what you did...
  • Do you use Java 5? If not, did you generate stub class using rmic? (Note the stub class is required even if you use Java 5.)
  • Does your value object implement Serializable?


  • Chulwoo
     
    Sam Codean
    Ranch Hand
    Posts: 194
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Chulwoo,
    Some more details. I created the interface and its implementation. Then generated the relevant stubs using rmic and packaged three jar files.
    Client - Having the code related to GUI
    Common - Service interface and some other interfaces alongwith the stubs. Please note that i send the server a Task (interface) and get back a Result (Interface). The implementation of Result and Task is kept on the server.
    Do i need to generate the stubs for these too? I think not. There are methods in my service interface itself that will allow me to get their handles createTask returns Task instance, performTask which returns Result instance

    Server - Where the data class and RMI implementations are kept. I place the Client and common on my laptop and server and common on my pc. I tried to run both client and server on my local machine and it worked fine but i still am not able to run that in my small network. I use java 5.0 and i have set the dynamic downloading off. As per my understanding that should not be the problem (sun itself wants that). I have all the rmic generated stubs in place so no downloading should occur

    Please help!!!
     
    Chulwoo Choi
    Ranch Hand
    Posts: 65
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    ....
    Then generated the relevant stubs using rmic and packaged three jar files.
    ...


    Did you have 3 jar files?
    Shouldn't we have one jar file (runme.jar) and execute it in three different ways (to run server, local client, or networked client)?

    (Your submission would be another jar that include runme.jar, source codes, docs, etc.)

    Chulwoo
     
    Sam Codean
    Ranch Hand
    Posts: 194
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I have not created the final jar as yet. This is for my testing purpose only.
    Meanwhile i wrote sample classes with similar intrefaces and found that the registry is releasing the object bound to it very soon. That is why i am getting that No object in table method.
    I set the lease period to 10 minutes but still i am not able to hold that object in there
    if you have any hints then it would be helpful
    reply
      Bookmark Topic Watch Topic
    • New Topic