cancel
Showing results for 
Search instead for 
Did you mean: 

custom logon - ErrorBean - error.getMessage() is null??

Former Member
0 Kudos

Hi All,

I am working on a custom login page.

I have imported com.sap.portal.runtime.logon.par >> created a new JSPDynpage component with jsp file: 'showlogon.jsp' (copied umlogonpage.jsp and made changes according to our requirements)

The login works fine!!

But, there is no message being displayed when user authentication fails.


<div class="urMessageArea">
    <% if ( error.getMessage() != null ) { %>
    <!-- display error message if there is one -->
        <div class="urMsgBarErr">						
            <span class="urMsgBarImgError"><img height="12" width="12" src="<%=webpath%>css/common/1x1.gif"></span>
            <span class="urTxtStd" tabindex="0">
                    <%=EncodeHtmlTag.encode(logonMessage.print(error.getMessage()))%>
            </span>
        </div>
    <% }else{%>
            error.getMessage()::<%=error.getMessage()%>
    <% }%>
</div>

The out come of above code is always=

error.getMessage()::null

I have jsp:useBean to access ErrorBean:

<jsp:useBean id="error" class="com.sap.security.core.util.ErrorBean" scope='request'/>

I don't know why the value of error.getMessage() is null...

In the folder -> dist\PORTAL-INF\lib --> In addition to the jars com.sap.portal.runtime.logon_api.jar and umelogonbase.jar, I also added com.sap.security.core.jar --> which has ErrorBean class

Has anyone encountered such a scenario? I'd really appreciate any inputs.. Thanks,

Regards,

SK.

Edited by: SK on Jul 22, 2009 6:38 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I am interested in this as well.

I notice on a similar project that it is always null when using IE, but displays messages when using Firefox.

Former Member
0 Kudos

Its a null pointer exception and hence the value for error.getMessage is null, its string "null". Try printing the entire stacktrace and you will know what the exact problem is.