Thank you very much for this information, it was very helpful.
I investigated this issue a bit, here're the results.
In fact, the only property that must be specified is
java.naming.security.principal, and it can have arbitrary value, it can
even be empty - it works anyway.
If this property is absent, the following exception occurs:
javax.naming.AuthenticationException: Cannot read the response from the
server (OEJP/2.0) : null;
nested exception is: java.io.EOFException
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at <your application>
Important is this property should be specified through the
InitialContext environment or through the jndi.properties file in the
classpath, it can't be set through the -D command line option.
java.naming.security.credentials property can be omitted.
From: eljotpl@gmai... [mailto:eljotpl@gmai...] On Behalf Of Jacek
Sent: Thursday, May 11, 2006 10:06 AM
To: dev@open... Subject: Re: [openejb-dev] EJB external lookup question
> props.put("java.naming.security.principal", "testuser");
> I'm not quite sure where the testuser and testpassword comes from,
> but I'm pretty sure you need these properties as well.
These values are unimportant, but the properties themselves are not.
Although their values don't have any value (an oxymoron?) to OpenEJB,
they must be specified or you'll get the CredentialsIncorrectException
I'll be glad if you could test it out with some random credentials to
verify it. Would you?