-
1. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
jaikiran Dec 17, 2009 10:00 AM (in response to lolmegafroi)But when trying to log in, the JBoss 5 tries not to connect to the given JBoss 4 but to itself!
How do you login? Post any relevant code and logs.
-
2. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
lolmegafroi Dec 18, 2009 10:37 AM (in response to jaikiran)Hello jaikiran,
basically I do the following:
login(String login, String password, String server, String domain) {
System.setProperty("java.security.auth.login.config", "<some_config_file>");
System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url", "<login-server-ip>:1099");
CallbackHandler handler = new AppCallbackHandler(login, password.toCharArray(), server, domain);
LoginContext lc = new LoginContext("myloginpolicy", handler);
lc.login();
}
For the following log I've copied the relevant application-policy section from the target's JBoss (4) conf/login-config.xml to the JBoss I want to login from (5) (had to strip it)
So, the error output from the source JBoss with which I try to connect is:
15:34:22,629 ERROR [<MyLoginClass>] Exception occurred
javax.security.auth.login.LoginException: The login module class could not be found: de.jexam.server.jboss.security.MyServerLoginModule
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:808)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at <MyLoginClass>.login(<MyLoginClass>.java)
...
post changed - log was hidden
-
3. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
jaikiran Dec 18, 2009 10:18 AM (in response to lolmegafroi)Did the forum mess up your post? I don't see any logs in your post. -
4. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
lolmegafroi Dec 18, 2009 10:44 AM (in response to jaikiran)*fixed* -
5. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
jaikiran Dec 18, 2009 11:08 AM (in response to lolmegafroi)In which jar does this class de.jexam.server.jboss.security.MyServerLoginModule reside on JBoss AS-5? And where is that jar placed?
-
6. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
lolmegafroi Dec 18, 2009 11:22 AM (in response to jaikiran)it is only located in security.jar under JBoss4.2.3.GA/server/config/default/lib -
7. Re: Problem connecting from JBoss 5.0.1 to 4.2.3
jaikiran Dec 18, 2009 11:28 AM (in response to lolmegafroi)lolmegafroi wrote:
You should have that on the AS-5 instance, since that's where this login code is running