Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

rmic and J2SE 6

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everybody!!

Im currently in the process of the SCJD project and began working on the RMI network server portion of the project. I'm new to RMI, so began with a simple tutorial, found here I just spent the past 2 hours try to start the RMI server, but continually got the following error.

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

The solution in the end was to create a server_stub using RMIC. However in the documentation (URL above) the following statement can be found

"Note: As of the J2SE 5.0 release, stub classes for
remote objects no longer need to be pregenerated using the
rmic stub compiler, unless the remote object needs
to support clients running in pre-5.0 VMs. If your application
needs to support such clients, you will need to generate stub
classes for the remote objects used in the application and deploy
those stub classes for clients to download."

Yet i had to create the stub using rmic. Am i missing something? Should i call it a night.

My java version is

java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

Many thanks in advance
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

The link you have specified is broken, so i could not see the code.
From the stack trace, it looks like the exception is not in starting the server but during an RMI method call. (The exception is an Unmarshal exception which occurs when the arguments/return value is unmarshalled or deserialized)

Will appreciate if you can post the server code.
Paul Murphy
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sorry the bad link was my fault. Put a full stop at the end of the URL.

The code here works, but i needed to create a stub using the rmic tool. Yet the documentation clearly states that this should only be necessary for pre-5.0 VMs. My current build is 1.6.0

Thanks again
machines help you to do more, but experience less. Experience this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic