geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radu Dumitrescu" <>
Subject Re: Problem to acess protected EJB from a java client application
Date Tue, 06 Feb 2007 07:52:10 GMT
You should add the geronimo-security jar and openejb-core jar to the application classpath.
The two jars are in geronimo repository folder.

Radu Dumitrescu
  ----- Original Message ----- 
  Sent: Monday, February 05, 2007 7:37 PM
  Subject: Problem to acess protected EJB from a java client application

  Hi all

  I'm having a problem accessing protected EJB from a java client application. When trying
to create remote object the application throws java.rmi.AccessException. It works fine if
no application security is applied.

  The code and deployment files were downloaded from Geronimo EJB sample, but lots of changes
have been made.

  Here's the code snippet

  Hashtable env = new Hashtable();

  javax.naming.InitialContext initialContext = new javax.naming.InitialContext(env);

  Object objRef = initialContext.lookup("");
  BankManagerFacadeHome bankManagerHome = (BankManagerFacadeHome)objRef;

  //the next line throws java.rmi.AccessException
  bankManager = bankManagerHome.create(); 

  The URL's of the application's deployment descriptors are:

  Could somebody suggest where is the problem ?

  Thenks in advance



  This message was scanned for spam and viruses by BitDefender.
  For more information please visit

View raw message