• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

RMI bind problems

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a class that extends UnicastRemoteObject in a package called
package suncertify.db;
the file is located in the dir
/sun/suncertify/db/
I generate the stubs with the command:
rmic -classpath /sun/ -keep -d /sun/ suncertify.db.DataServer
The stub files show up in the /sun/suncertify/db
inside the DataServer class the constructor does the following:

I then set my PATH
export PATH=$PATH:/sun/
and run the following:
java -classpath /sun/ -Djava.security.policy="//sun/suncertify/db/policy" suncertify.db.DataServer
which returns me a
DataServer exception: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: suncertify.db.DataServer_Stub

Any ideas?
 
Bryan Clauser
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
never mind, I think I was hitting my crack pipe to hard and forgot to set the codebase
running the following command worked:
D:\sun\suncertify\db>java -classpath d:\sun\ -Djava.rmi.server.codebase=file:///d:\sun\ -Djava.security.policy="d:\sun\suncertify\db\policy" suncertify.db.DataServer
don't pay attention to the OS changes, I bounce form NT at work to Linux at home, but the codebase was the problem.
 
Remember to always leap before you look. But always take the time to smell the tiny ads:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic