On Jun 17, 2009, at 12:28 PM, recursion wrote:
Hi, guys,
Steps to reproduce:
1. Download the latest OpenEJB 3.1.1 and unzip the archive
2. Set the OPENEJB_HOME system environment variable to the folder
where
OpenEJB is unzipped
3. Start the engine
4. Deploy the attached jar (it contains some GlassFish descriptors for
security mapping)
5. Execute the pasted below client code
6. Get the attached trace
http://www.nabble.com/file/p24080389/TestOpenEJB.jar TestOpenEJB.jar
http://www.nabble.com/file/p24080389/exception%2Btrace.txt
exception+trace.txt
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.RemoteInitialContextFactory");
props.put(Context.PROVIDER_URL,"ejbd://127.0.0.1:4201");
props.put("java.naming.security.principal", "recursion");
props.put("java.naming.security.credentials", "recursion");
InitialContext ctx = new InitialContext(props);
Object ref = ctx.lookup("OuterBeanRemote");
OuterBeanRemote reference =
(OuterBeanRemote)PortableRemoteObject.narrow(ref,
OuterBeanRemote.class);
System.out.println(reference.getGreeting());
Looks like the security roles in the sun-ejb-jar.xml aren't getting
applied correctly. Will take a bit but should be easy to fix.
-David