Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 75136 invoked from network); 6 Feb 2007 09:26:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2007 09:26:58 -0000 Received: (qmail 51969 invoked by uid 500); 6 Feb 2007 09:27:01 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 51949 invoked by uid 500); 6 Feb 2007 09:27:01 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 51938 invoked by uid 99); 6 Feb 2007 09:27:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Feb 2007 01:27:01 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=HTML_FONT_BIG,HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [85.118.136.130] (HELO docgroup.ru) (85.118.136.130) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Feb 2007 01:26:51 -0800 In-Reply-To: <001b01c749c3$b5c40000$9001a8c0@pss.ro> Subject: Re: Problem to acess protected EJB from a java client application To: user@geronimo.apache.org X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: vl_avan@mobido.ru Date: Tue, 6 Feb 2007 12:26:46 +0300 X-MIMETrack: Serialize by Router on krasnodar/DocGroup/ru(Release 7.0|August 18, 2005) at 06.02.2007 12:23:35 MIME-Version: 1.0 Content-type: multipart/related; Boundary="0__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956" X-Virus-Checked: Checked by ClamAV on apache.org --0__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956 Content-type: multipart/alternative; Boundary="1__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956" --1__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable There are geronimo-security-1.1.1 jar and openejb-core-2.1.1 jar in the= application class path/ One more fact. Application works OK when default securety principal nam= e attribute is changed from "guest" to "supervisor", but it is not the solution. Vladimir = "Radu Dumitrescu" = = = To 06.02.2007 10:52 = = cc = Please respond to Subj= ect user@geronimo.apa Re: Problem to acess protected E= JB che.org from a java client application = = = = = = = You should add the geronimo-security jar and openejb-core jar to the application classpath. The two jars are in geronimo repository folder. Regards, Radu Dumitrescu ----- Original Message ----- From: vl_avan@mobido.ru To: user@geronimo.apache.org 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 =3D new Hashtable(); env.put("java.naming.factory.initial","org.openejb.client.RemoteInitial= ContextFactory"); env.put("java.naming.provider.url","localhost:4201"); env.put("java.naming.security.principal","system"); env.put("java.naming.security.credentials","manager"); javax.naming.InitialContext initialContext =3D new javax.naming.InitialContext(env); Object objRef =3D initialContext.lookup("org.apache.geronimo.samples.bank.ejb.BankManager= FacadeBean"); BankManagerFacadeHome bankManagerHome =3D (BankManagerFacadeHome)objRef= ; //the next line throws java.rmi.AccessException bankManager =3D bankManagerHome.create(); The URL's of the application's deployment descriptors are: http://212.176.60.113/jtest/application.xml http://212.176.60.113/jtest/geronimo-application.xml http://212.176.60.113/jtest/ejb-jar.xml http://212.176.60.113/jtest/openejb-jar.xml Could somebody suggest where is the problem ? Thenks in advance Vladimir -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ = --1__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable

There are geronimo-security-1.1.1 jar and openejb-core-2.1.1 jar in = the application class path/

One more fact. Application works OK when default securety principal nam= e attribute is changed from "guest" to "supervisor"= , but it is not the solution.

<security:security>
<security:default-principal>
<security:principal class=3D"o= rg.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"= ;
name=3D"guest"/>=
</security:default-principal>
<security:role-mappings> <security:role role-name=3D"cl= erk">
<security:principal class=3D&qu= ot;org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal&= quot;
name=3D"employee"/&g= t;
</security:role>
<security:role role-name=3D"su= pervisor">
<security:principal class=3D&qu= ot;org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal&= quot;
name=3D"admin"/><= /font>
</security:role>
</security:role-mappings> </security:security>


Vladimir
3D"Inactive"Radu Dumitrescu" = <rdu@pss.ro>


=
          "Radu Dumitrescu" <rdu@pss.ro><= /font>

          06.02.2007 10:52
          Please respond to
          user@geronimo.apache.org

=
3D=
To
3D""
<user@geronimo.apache.org>
3D=
cc
3D""
3D=
Subject
3D""
Re: Problem to acess protected EJB from a java client = application
3D=3D""

You should add the geronimo-security jar and opene= jb-core jar to the application classpath. The two jars are in geronimo = repository folder.

Regards,
Radu Dumitrescu
----- Original Message -----
From: vl_ava= n@mobido.ru
To: u= ser@geronimo.apache.org
Sent: Monday, February = 05, 2007 7:37 PM
Subject: Problem to ace= ss protected EJB from a java client application

Hi all=

I'm having a problem accessing protected EJB from a java client applica= tion. When trying to create remote object the application throws java.r= mi.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 =3D new Hashtable();
env.put("java.naming.factory.initial","org.openejb.clien= t.RemoteInitialContextFactory");
env.put("java.naming.provider.url","localhost:4201"= );
env.put("java.naming.security.principal","system");=
env.put("java.naming.security.credentials","manager"= ;);


javax.naming.InitialContext initialContext =3D new javax.naming.Initial= Context(env);


Object objRef =3D initialContext.lookup("org.apache.geronimo.sampl= es.bank.ejb.BankManagerFacadeBean");
BankManagerFacadeHome bankManagerHome =3D (BankManagerFacadeHome)objRef= ;


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


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

<= font size=3D"4" color=3D"#0000FF" face=3D"Courier New">http://212.176.6= 0.113/jtest/application.xml

http://= 212.176.60.113/jtest/geronimo-application.xml
http://212.176.60.11= 3/jtest/ejb-jar.xml
<= font size=3D"4" color=3D"#0000FF" face=3D"Courier New">http://212.176.6= 0.113/jtest/openejb-jar.xml

Could somebody suggest where is the problem ?

Thenks in advance


Vladimir



--
This message was scanned for spam and viruses by BitDefender.
For more information please visit
http://linux.bitdefender.com/
--
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://linux.bitdefender.com/

= --1__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956-- --0__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <1__=4CBBF8E9DFA1C9568f9e8a93df93@docgroup.ru> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956 Content-type: image/gif; name="pic42506.gif" Content-Disposition: inline; filename="pic42506.gif" Content-ID: <2__=4CBBF8E9DFA1C9568f9e8a93df93@docgroup.ru> Content-transfer-encoding: base64 R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA AAAAACH5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QES6zhbn1iImTHEQyqJ4eIxJJoUBc+3CbBuwZE V5cJPPkIjFDdeEabQbd6WgICTxiiz0f5dBKquXF6k4senwEhYGnKEFJeGrxUZy8dB8gmAXI/sPvH ESfCwVt5hTgYiqQqtdRNHQIU1PJ33ZqmzgE90OwLaoJcnMop1WiMmgkPHQRIrwgFuNV90A3doNKT mrKIN07AnGcI9BQjhCBN4RfA1qIZnMqorJCogKfGQnxSCDilTVIA0yl5ciTovgLuBDKFUDE9aQcw 9SA+rjSNf9/M1gxrj6VwDTS0IUSElMzBfsj0NFXR2kwsV1A5IF1grLgLL/r1R40BZEnuBWgmQEyb jqRwSAt6bqMCOFkvKFN2GPPkUzIm/SCF8z8pVzpbjVnMsy0vOr1hw3SaSRUhpY09v0z0J1FnwzPl fmh+xl4WtR0zGu24I4KbMQm3lnVu2oNWxI9W/lcyzA+mCKF4DBikxb/+UWtOGRiFP8qEwAayIgIA Ow== --0__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956 Content-type: image/gif; name="ecblank.gif" Content-Disposition: inline; filename="ecblank.gif" Content-ID: <3__=4CBBF8E9DFA1C9568f9e8a93df93@docgroup.ru> Content-transfer-encoding: base64 R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7 --0__=4CBBF8E9DFA1C9568f9e8a93df938690918c4CBBF8E9DFA1C956--