Q

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
    This was first published in September 2004

    Dig deeper on SOA, XML and Web Services Development Tools

    Pro+

    Features

    Enjoy the benefits of Pro+ membership, learn more and join.

    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.

    0 comments

    Oldest 

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    -ADS BY GOOGLE

    SearchSoftwareQuality

    SearchCloudApplications

    SearchAWS

    TheServerSide

    SearchWinDevelopment

    Close