Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes EJB and other Java EE Technologies and the fly likes No valid security context for the caller identity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "No valid security context for the caller identity" Watch "No valid security context for the caller identity" New topic
Author

No valid security context for the caller identity

Nghiem Nguyen
Greenhorn

Joined: Jun 05, 2005
Posts: 25
Hi all,

I don't know why but I have some problems with calling getCallerPrincipal() method from a Session Bean. It appears this message 'No valid security context for the caller identity' when I invoke getCallerPrincipal() in a EJB method from my client application.

I send credentials and principals when I create the initial context in client application:

props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:jnp.interfaces");
props.put(Context.PROVIDER_URL,"localhost:1099");
props.put(Context.SECURITY_PRINCIPAL, username);
props.put(Context.SECURITY_CREDENTIALS, password);

I am working on EJB 3.0 and using Application Server JBoss-4.2.1.GA.

Does somebody know why I'm wrong?
Please tell me if I missed somethings!

Thank you very much!
Nghiem Nguyen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No valid security context for the caller identity
 
Similar Threads
Calling getCallerPrincipal method..
Question about SFSB & security (and jboss)
Doubt in EJB 3 Security
propogating security principals from web tier to EJB tier
run-as