You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Danilo Luiz Rheinheimer <da...@floripa.com.br> on 2002/09/28 21:35:20 UTC
Re[2]: Implementing PortalAuthentication
Hello David,
Compiling and debugging Jetspeed I can see the error is happening on
the line :
Iterator roles = JetspeedSecurity.getRoles(user.getUserName());
This returns JetspeedRoleManagement.getRoles(username);
To get the service to obtain the user roles is called the
JetspeedRoleManagement getService method. This method call this line
to get the role management service :
(RoleManagement) TurbineServices.getInstance().getService(RoleManagement.SERVICE_NAME)
Here is the problem. This is returning a
org.apache.jetspeed.services.security.turbine.TurbineRoleManagement
class and not my class. The TurbineRoleManagement does not know
about my anonymous user so it throws the exception :
Horrible Exception: org.apache.jetspeed.om.profile.ProfileException: org.apache.jetspeed.services.security.RoleException: Failed to Retrieve User: : Unknown user 'anonymous'
In the SetspeedsSecurity.properties file I have the line :
services.RoleManagement.classname=com.sigea.jetspeed.security.SigeaRoleManagement
So the call
TurbineServices.getInstance().getService(RoleManagement.SERVICE_NAME) should not return a SigeaRoleManagement instance ?
Danilo.
Friday, September 27, 2002, 7:09:06 AM, you wrote:
>> org.apache.jetspeed.om.profile.ProfileException:
>> java.lang.ClassCastException:
>> com.sigea.jetspeed.security.SigeaRoleManagement
>> at
>> org.apache.jetspeed.services.profiler.JetspeedProfilerService.
>> getProfile(JetspeedProfilerService.java:311)
DST> Looking at line 311 in JetspeedProfilerService,
DST> JetspeedUser user = rundata.getJetspeedUser();
DST> If Im reading the exception correctly, it appears that getJetspeedUser() is
DST> returning a com.sigea.jetspeed.security.SigeaRoleManagement ?
>> BaseJetspeedUser user = new BaseJetspeedUser();
DST> use the factory to create users:
DST> JetspeedUser user = JetspeedUserFactory.getInstance();
DST> BBCi at http://www.bbc.co.uk/
DST> This e-mail (and any attachments) is confidential and may contain
DST> personal views which are not the views of the BBC unless specifically
DST> stated.
DST> If you have received it in error, please delete it from your system, do
DST> not use, copy or disclose the information in any way nor act in
DST> reliance on it and notify the sender immediately. Please note that the
DST> BBC monitors e-mails sent or received. Further communication will
DST> signify your consent to this.
DST> --
DST> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
DST> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Best regards,
Danilo mailto:danilo@floripa.com.br
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>