Problem solve Get help with specific problems with your technologies, process and projects.

Implementing an EJB with a LocalHome using JBoss

I am trying to implement an EJB with a LocalHome using JBoss:
   Object refLocal = context.lookup("HelloLocal"); 

But it throws an exception:
javax.naming.CommunicationException [Root exception is
org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI
class loader disabled)]
How can I solve this problem?
If you are NOT dynamically downloading the EJB stub, you need to make sure that the generated stub for the EJB is available locally, i.e. in the classpath.

If you ARE downloading the EJB stub dynamically, you need:

  • A) An RMISecurity Manager configured, as follows:

  • if (System.getSecurityManager() == null)
          System.setSecurityManager(new RMISecurityManager());

  • B) Your client must also have sufficient access through the appropriate socket.

  • C) You need to add file download permission in your client policy file, as follows:

  • grant codebase someURL { permission java.io.FilePermission "/path/to/downloads", "read"; };
  • D) Then your client must be started as follows:

  • java -Djava.security.policy=java.policy com.yourpackage.yourclient
    This was last published in September 2004

    Dig Deeper on Microservices and DevOps



    Find more PRO+ content and other member only offers, here.

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    Start the conversation

    Send me notifications when other members comment.

    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

    Please create a username to comment.