SSO Gateway error

19 views
Skip to first unread message

lauramc...@gmail.com

unread,
Dec 10, 2007, 2:31:37 PM12/10/07
to Toro Projects
I have installed the Toro SSO gateway portlet but I can't get it
working with ldap authenticated users. I saw that another person had
posted a similar problem but I didn't see the resolution.

The errors that I am receiving are the following:

WARN [org.jasig.portal.ChannelManager#244] pluto.PortletContainerImpl.
[] Dec/05 05:39:14 - org.apache.pluto.PortletContainerImpl#init():
Couldn't retrieve parameter "portletcontainer.supportsBuffering"
frompassed properties object. Falling back to default value "FALSE"
ERROR [org.jasig.portal.ChannelManager#244] portlet.CPortletAdapter.[]
Dec/05 05:39:15 - java.lang.NullPointerException
WARN [ErrorRendering#246] error.CError.[] Dec/05 05:39:15 -
ErrorDocument XML is
<error code="1">
<message>IChannelRenderer.completeRendering() threw</message>
<channel>
<id>n116</id>
<name>Toro Gateway Portlet</name>
</channel>
<throwable class="org.jasig.portal.PortalException"
renderedAs="java.lang.Throwable">
<message>org.jasig.portal.PortalException:
java.lang.NullPointerException</message>
<stack>org.jasig.portal.PortalException:
org.jasig.portal.PortalException: java.lang.NullPointerException
at
org.jasig.portal.channels.portlet.CPortletAdapter.renderCharacters(CPortletAdapter.java:
514)
at org.jasig.portal.ChannelRenderer
$Worker.execute(ChannelRenderer.java:540)
at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:
27)
at edu.emory.mathcs.backport.java.util.concurrent.Executors
$RunnableAdapter.call(Executors.java:431)
at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:
166)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:643)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jasig.portal.PortalException:
java.lang.NullPointerException
at
org.jasig.portal.channels.portlet.CPortletAdapter.getMarkup(CPortletAdapter.java:
613)
at
org.jasig.portal.channels.portlet.CPortletAdapter.renderCharacters(CPortletAdapter.java:
511)
... 7 more
Caused by: java.lang.NullPointerException
at java.lang.StringBuffer.&lt;init&gt;(StringBuffer.java:104)
at
net.unicon.academus.apps.gateway.GatewayPortlet.constructUserContextCacheKey(GatewayPortlet.java:
96)
at
net.unicon.academus.apps.gateway.GatewayPortlet.getUserContext(GatewayPortlet.java:
235)
at
net.unicon.warlock.portlet.AbstractWarlockPortlet.render(AbstractWarlockPortlet.java:
308)
at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218)
at
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
</stack>
</throwable>
</error>


Any help will be greatly appreciated.

Thanks
Message has been deleted

Andrew Wills

unread,
Dec 10, 2007, 3:16:43 PM12/10/07
to toro-p...@googlegroups.com
Laura,

The stack trace you provided *does* appear to be caused by the absence of a 'user.login.id' attribute.

I'm looking at the GatewayPortlet code here:  http://toro-portlets.googlecode.com/svn/trunk/academus-apps/source/net/unicon/academus/apps/gateway/GatewayPortlet.java

Here's line 96 (the one that's crashing):

*****
    private String constructUserContextCacheKey(PortletSession session,
        String username) {
        // put the username first, so we can be assured of parsing it out later
(96)  StringBuffer sb = new StringBuffer(username).append('/');
        sb.append(id).append('/');
        sb.append(session.getId());
        return sb.toString();
    }

*****

And here's line 235 (the lone that's calling the method that crashes):

*****
        // Look for existing, create if we don't find.
        GatewayUserContext rslt = (GatewayUserContext) s.getAttribute(key);
        if (rslt == null) {
            String username = (String)userInfo.get("user.login.id");
(235)     String cacheKey = constructUserContextCacheKey(s, username);
            [...]
*****

To verify that your LDAP user has a 'user.login.id' attribute, use the Groups Manager channel;  search for a Person and enter your username.  Click on the match to see the person's attributes.  If you don't see ' user.login.id' you need to open personDirectory.xml and configure a value for it.

drew wills

lauramc...@gmail.com

unread,
Dec 11, 2007, 2:40:08 PM12/11/07
to Toro Projects
Drew,

I have configured the ldap portion of my personDirectory.xml file to
include the following line of code and still I get nothing:
<entry key="uid"><value>user.login.id</value></entry>
When I log in as an authenticated user, inside the 'Person
Attributes' portlet that is included in uPortal 2.6, none of the
attributes are found and everyone is coming out to be 'demo'.

-Laura


On Dec 10, 2:16 pm, "Andrew Wills" <wills.d...@gmail.com> wrote:
> Laura,
>
> The stack trace you provided *does* appear to be caused by the absence of a
> 'user.login.id' attribute.
>
> I'm looking at the GatewayPortlet code here:http://toro-portlets.googlecode.com/svn/trunk/academus-apps/source/ne...

Andrew Wills

unread,
Dec 11, 2007, 3:20:22 PM12/11/07
to toro-p...@googlegroups.com
Laura,

This snippet is the problem if it's still in your configuration...

*****
<bean id="mergedPersonAttributeDao"
class="org.jasig.portal.services
.persondir.support.MergingPersonAttributeDaoImpl">
               <property name="personAttributeDaos">
                       <list>
                               <ref bean="uPortalJdbcAttributeSource"/>
                               <!--
                               <ref bean="uPortalLdapAttributeSource"/>
                               -->
                       </list>
               </property>
       </bean>

*****

uPortal only cares about the bean called 'personAttributeDao' -- all other beans do nothing at all unless they are _nested_ within 'personAttributeDao'.

You can see that 'mergedPersonAttributeDao' is nested within 'personAttributeDao'... and (furthermore) that 'uPortalJdbcAttributeSource' is nested within 'mergedPersonAttributeDao'.

But 'uPortalLdapAttributeSource' isn't nested in anything, it's orphaned and ignored.  If you uncomment the second entry in 'mergedPersonAttributeDao' you'll be on the right track.

drew wills

> >    <message>IChannelRenderer.completeRendering () threw</message>
> > org.apache.pluto.core.PortletServlet.doGet (PortletServlet.java:158)

lauramc...@gmail.com

unread,
Dec 11, 2007, 3:36:10 PM12/11/07
to Toro Projects
Yes, I tried that earlier this morning, uncommenting the
'uPortalLdapAttributeSource' reference and nothing happened. Do I need
to delete the user from the database to have them inserted into the
up_user database in hopes that the change will be activated?

Laura

On Dec 11, 2:20 pm, "Andrew Wills" <wills.d...@gmail.com> wrote:
> Laura,
>
> > > > <message>IChannelRenderer.completeRendering() threw</message>
> > > > org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
Message has been deleted

lauramc...@gmail.com

unread,
Dec 13, 2007, 12:07:26 PM12/13/07
to Toro Projects
This problem has been solved...

Here was the solution

I did away with the PersonDirs.xml file and copied all my ldap
attribute mappings to the personDirectory.xml file under the ldap
section with some slight adjustments in regards to the <tags>, making
them match the personDirectory syntax.

Also, my personDirectory.xml was looking for its users using a filter
like (cn={0}) and not uid={0}). So I did the switch and everything
started working. I remembered that in my ldap.properties file I
specified that ldap.uidAttribute=uid, which I am thinking may or may
not have had some connection.

For troubleshooting purposes I used the 'Person Attributes' portlet
that is included out-of-the-box with uPortal 2.6 to verify that my
attributes were being passed.

Hope this helps someone!

Laura
Reply all
Reply to author
Forward
0 new messages