[jboss-dev-forums] [Design of JBoss Portal] - Re: Question on UserInterceptor

joe_the_quick do-not-reply at jboss.com
Mon Nov 27 11:54:20 EST 2006


Hi there,

We already replaced the JAAS-Loginmodule used by portal-server.war.
However, after the successful login I get the following exception:


org.jboss.portal.core.model.NoSuchUserException: No such user No such user TEST_USERNAME
org.jboss.portal.core.impl.user.UserModuleImpl.findUserByUserName(UserModuleImpl.java:123)


I found out that the UserModuleImpl looks up some user information in the JBP_USERS table (first name, last name, additional config info).

QUESTION:
What is the most clever way to replace the UserModuleImpl, as we have
this information already stored in the subject (request.getUserPrincipal()).
If I simply try to replace the "public User findUserById(String id) ..." method, I'm stuck because I don't have access to the principal (stored in the HttpServletRequest), where the required information would be stored.

Since we already did the authentication/authorization I'd like to reuse the data stored in the Principal, to avoid a second method-call for data I already have.

I also tried to comment out all User*-related Interceptors/Modules (includign dependencies in the MailModuleImpl) in jboss-service.xml, but then I get

java.lang.NullPointerException
org.jboss.portal.core.command.CoreComponentRequestContext$4.(CoreComponentRequestContext.java:161)
org.jboss.portal.core.command.CoreComponentRequestContext.(CoreComponentRequestContext.java:155)

and I'm totally stuck because I don't know what might cause this NullpointerException.

thanks a lot for any advice
Johannes

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988954#3988954

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988954



More information about the jboss-dev-forums mailing list