Q
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:
  
   HelloLocal
  
   Object refLocal = context.lookup("HelloLocal"); 
   .......

But it throws an exception:
javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException:
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

    Dig Deeper on Topics Archive

    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.

    Please create a username to comment.

    -ADS BY GOOGLE

    SearchSoftwareQuality

    SearchAWS

    SearchCloudComputing

    TheServerSide.com

    Close