Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8709027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:16:01+00:00 2026-06-13T04:16:01+00:00

I have fallen victim to the following Java RMI bug, as noted in the

  • 0

I have fallen victim to the following Java RMI bug, as noted in the JDK 7 release notes:

A bug in the rmiregistry command included in this release may cause unintended exceptions to be thrown when an RMI server attempts to bind an exported object which includes codebase annotations using the "file:" URL scheme. The RMI servers most likely to be effected are those which are invoked only by RMI clients executing on the same host as the server.

RMI annotates codebase information as part of the serialized state of a remote object reference to assist RMI clients in loading the required classes and interfaces associated with the object at runtime. Exported objects which are looked up in the RMI registry and invoked by RMI clients running on hosts other than the server are usually annotated with codebase URL schemes, such as "http:" or "ftp:" and these should continue to work correctly.

As a workaround, RMI servers can set the java.rmi.server.codebase property to use codebase URLs other than the "file:" scheme for the objects they export.

(emphasis mine)

I am developing a RMI application on my local machine and I need to set the codebase to include some libraries.

StringBuilder codebase = new StringBuilder();
codebase.append(" file:/").append(projectPath).append("/bin/lib/rmiio-2.0.0.jar")
        .append(" file:/").append(projectPath).append("/bin/lib/log4j-1.2.9.jar")
        .append(" file:/").append(projectPath).append("/bin/lib/commons-logging.jar")
        .append(" file:/").append(projectPath).append("/bin/lib/commons-logging-api.jar");
System.setProperty("java.rmi.server.codebase", codebase.toString());

How can I achieve the same without the ‘file:/’ syntax? What is a valid workaround for the bug in my situation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:16:03+00:00Added an answer on June 13, 2026 at 4:16 am

    If there is a bug with the file URL scheme
    (and I guess you validated that the syntax is for example – file:///home/user/myprojects/myjar.jar)
    I guess you have no other option than either to fix the issue in open JDK, or to put the files in an apache webserver (or tomcat for this matter) and use URIs with the “http://” prefix.
    A deployment of such tomcat or apache is quite simple, as you’re dealing here with static resources.
    From what I remember, and after I looked here I see no other option but to provide a chain of URIs to codebase, as you did.
    Another option is to simply provide this jars with the RMI client code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have unfortunately fallen victim to this recent attack: http://www.theregister.co.uk/2011/10/14/mass_website_inection_grows/ . I have found
I have the following scriptlet inside a JSP page. File f = new File(//WEB-INF//music//rock//Evanascence//Fallen//text.txt);
I have transactional replication running between two databases. I fear they have fallen slightly
have written this little class, which generates a UUID every time an object of
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have created a subkey in the registry, HKEY_LOCAL_MACHINE\SOFTWARE\MyApp\APIConnector . When I load this
I have fallen into a doubt and I don't know how to solve it,
I am starting out on a new project and have fallen in love with
We have slony replication set up, and the replication on the slave has fallen
I just found (and have fallen hard for) PowerShell with the posh-git module installed.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.