1

Hi guys i am facing a problem where when i try to read the message at my server i am getting this error.

java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[application_loginid, Administrators]

i am setting the context security principal value as "jndiuser" but in the receiver end i am getting the above error with principal value as application_loginid instead of "jndiuser".

I cant understand how that principal value is getting updated can anyone explain?

public static Hashtable<String, String> WLEnv = new Hashtable<String, String>();
WLEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
WLEnv.put(Context.PROVIDER_URL, "<value>");
WLEnv.put(Context.SECURITY_PRINCIPAL, "jndiuser");
WLEnv.put(Context.SECURITY_CREDENTIALS, "password");
InitialContext ctx = InitialContext(WLEnv);
connFactory = (ConnectionFactory) ctx.lookup("<CF lookup name>");
karthick
  • 11,998
  • 6
  • 56
  • 88

2 Answers2

0

I got one of these when I misconfigured my web application.

We have two deployments:

  • EJB Application
  • Web Application

I have to configure the t3 connection for the Web Application to connect to the EJB Application. I misconfigured this to point to the wrong server and so the error java.lang.SecurityException: [Security:090398]Invalid Subject was shown to me.

This was confusing at first as the message is usually shown when cross-domain security is not enabled on WebLogic. I hadn't realised at the time that I was authenticating across domains because I hadn't realised that I was making connections to remote servers. Once I rectified the configuration the security error went away.

I have a small question mark if the cross-domain security would need configuring for running in a cluster, but I will find this out later on!

For further information see: http://docs.oracle.com/cd/E15051_01/wls/docs103/secmanage/domain.html#wp1176048

mrswadge
  • 1,659
  • 1
  • 20
  • 43
0

@karthick: Above code you mentioned is just to access JNDI server not the JMS system...so you are using jndiuser to access JNDI server....to check what users you are using to access messages from JMS system, check your queue connection factory configuration in console.

ag112
  • 5,537
  • 2
  • 23
  • 42
  • Since this is on a remote WebLogic Server, he must first authenticate to look up the connection factory. If the credentials are wrong then he will not get access to the JNDI tree. – Jeff West Jul 13 '11 at 17:49