geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbolk <>
Subject JNDI lookup in GEronimo 2
Date Fri, 13 Jul 2007 20:18:28 GMT

Hi all, 
I am very new to the EJB 3 world, and trying to make my way with one of the
example. I successfully created number of EJB 3 Session beans. I was able to
use those session beans from WEB(Local Interface)  application deployed in
the same EAR together with my session beans. 
Now I am trying to go one step forward and trying to access my session beans
from plain Java class that have not been deployed into Geronimo. 
I tried to run following code:
javax.naming.Context ic;
	    Properties properties = new Properties();
	    properties.put("java.naming.provider.url", "");
	    properties.put("", "myuser");
	    properties.put("", "mypass");

	    ic = new InitialContext(properties);
	    Object session = ic.lookup("/DAOSession");

at this point I am getting 
javax.naming.AuthenticationException: This principle is not authorized.

If I am removing principal and credentials properties -  I am getting Object
can not be found Exception. 

class name of my session bean is DAOSession. 

PLease let me know, what I am doing wrong. 

THank you.

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message