VLF-ONE Failure while dispatching request to CheckUserCredentials

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

VLF-ONE Failure while dispatching request to CheckUserCredentials

Post by jyoung »

I am trying to get our VLF-ONE app deployed to production, finally got everything up there and now I am getting an error:
Dispatching error: Result(*NOT_PROCESSED) Reason( Failure while dispatching request to VLFLOGON.CheckUserCredentials- Faiilure( *NOT_PROCESSED ) ReportedBy( File:LpCrDisp Line:1856 ) Reason( Failure while mapping value varVarCharPtr(JRYOUNG) from featurre UserProfiletoCheck - Failure( *NOT_PROCESSED ) ReportedBy( File:LpCrDispatchRoutine Line:915 ) ) )
I am not understanding what this is telling me. My own trace logs look like
trace.PNG
trace.PNG (55.91 KiB) Viewed 7490 times
The x_err.log looks like

Code: Select all

Statement : 516       
Message : Dispatching error: Result(*NOT_PROCESSED) Reason( Failure while dispatching request to VLFLOGON.CheckUserCredentials- Faiilure( *NOT_PROCESSED ) ReportedBy( File:LpCrDisp Line:1856 ) Reason( Failure while mapping value varVarCharPtr(JRYOUNG) from featurre UserProfiletoCheck - Failure( *NOT_PROCESSED ) ReportedBy( File:LpCrDispatchRoutine Line:915 ) ) )
Routine : File LpCrDisp at line 1693.                                                                                 
Job Number: 208208 OS User : DCXPGMLIB                                                                                
PROC=*WAM WAML=LANSA:XHTML WVAR=2 W3ST=1 LANG=ENG PART=SYS USER=DCXPGMLIB CMTH=T CDLL=LCOMGR32.DLL WSTY=IS-A ITHP=N   
ROOT=/LANSA_dcxpgmlib                                                                                                 
==============================================================================                                        
Thu Apr 13 10:04:51 2017                                                                                              
Release 14.1.0 Build 4138 iSeries                                                                                     
Message : X_COMP returned error code -1. Check X_ERR.LOG for more information.                                        
Routine : X_Execute_WAM                                                                                               
Job Number: 208208 OS User : DCXPGMLIB                                                                                
==============================================================================                                        
Thu Apr 13 10:04:51 2017                                                                                              
Release 14.1.0 Build 4138 iSeries                                                                                     
Message : (0586) - Component Manager request of type 3 (decimal value) failed with return code -1 (decimal value).    
Routine : X_Execute_WAM                                                                                               
Job Number: 208208 OS User : DCXPGMLIB                                                                                
 ************End of Data******************** 
The CheckUserCredentials method

Code: Select all

mthroutine name(CheckUserCredentials) options(*REDEFINE *RETURNS_MESSAGES)

define_com class(#VF_ELRETC) name(#TemporaryReturnCode)

#uSystemCommon.TraceEvent from(#COM_OWNER) text('CheckUserCredentials started.') systemtrace(False)
#SYS_APPLN.TraceMessageData( "Checking User Credentials - UserProfileToCheck:&1" #UserProfiletoCheck )

* ================= DEFAULT BEHAVIOUR =================
* Successful execution
#MajorReturnCode := OK

* User to display is the same as the one typed in the logon dialog
* #UserProfiletoCheck contains the real or derived user profile.
#UserNametoDisplay := #UserProfiletoCheck

* disable security if we are running locally to ease the development and debug process
if (*ENVIRONMENT = LOCAL)
#UseFrameworkObjectAuthority := False
else
#UseFrameworkObjectAuthority := True
endif

* stash the userid in a persistent string, we will need to send this to the server for audit tracking
#Persistent_ApplicationString1 := #UserProfiletoCheck
#Persistent_ApplicationString2 := ""
#Persistent_ApplicationString3 := ""
#Persistent_ApplicationString4 := ""
#Persistent_ApplicationString5 := ""

* Validate the password

#TemporaryReturnCode := OK

#COM_OWNER.ValidatePassword userprofile(#UserProfiletoCheck) password(#PassWordtoCheck) validationreturncode(#TemporaryReturnCode)

if (#TemporaryReturnCode <> OK)
#MajorReturnCode := #TemporaryReturnCode
return
endif

* get the group profile if on the iSeries
if (*OSAPI = IBMI)

#IBMGroupProfile := #COM_OWNER.GetIBMGroupProfile( #UserProfiletoCheck )

if ((#IBMGroupProfile = QSECOFR) *Or (#IBMGroupProfile = QPGMR))
#SYS_APPLN.TraceMessageText( ("Group Profile Is &1, Disabling Framwework Security").Substitute( #IBMGroupProfile ) )
#UseFrameworkObjectAuthority := False
else

* What happens if a user is not in a GROUP?
if (#IBMGroupProfile = *BLANKS)
#SYS_APPLN.TraceMessageText( "Group Profile Is Empty, setting ReadOnly VLF Profile" )
#UserProfiletoCheck := READONLY_USR
return
endif

* map the group profile to a framework profile
if (#ProfileMap<#IBMGroupProfile> <> *BLANKS)
#SYS_APPLN.TraceMessageData( "Mapping Group Profile:&1 To VLF Profile: &2" #IBMGroupProfile #ProfileMap<#IBMGroupProfile> )
#UserProfiletoCheck := #ProfileMap<#IBMGroupProfile>
else
* default a "readonly" profile?
#SYS_APPLN.TraceMessageData( "VLF Profile for Group Profile: &1 not found" #IBMGroupProfile )
#SYS_APPLN.TraceMessageData( "Using ReadOnly Profile" )
#UserProfiletoCheck := READONLY_USR
endif

endif

endif

* =================== ================= ======================
* ================== END PASSWORD VALIDATION =================
* =================== ================= ======================

* Please refer to notes about return codes at the beginning of this source
* Assuming you set #TemporaryReturnCode to the value to be returned (OK, VE or ER) map it back to the one to send back to the caller
#MajorReturnCode := #TemporaryReturnCode

#SYS_APPLN.TraceMessageData( "CheckUserCredentials Complete - Return Code:&1 UserProfileToCheck:&2" #MajorReturnCode #UserProfiletoCheck )

endroutine
Any ideas on what this error means? I take it that something is wrong the in the method, but the trace output shows that it executes fine.

Edit
I commented everything out, except setting #MajorReturnCode = OK, #Persistent_ApplicationString1 = #UserProfileToCheck, #UserNameToDisplay = #UserProfileToCheck and #UseFrameworkObjectAuthority = False and I still get the error.

Edit
Still trying to figure out what is going on here. I am able to log into the shipped "VLF-ONE" demo application fine. I swapped out the logon handler in the framewework from mine (VLFLOGON) to the shipped one (UF_OLOGON) and was able to log in (with out Framework Security). I then copied UF_OLOGON to VLFLOGON2 (an exact copy, no modifications), updated the logon handler with the framework and deployed it and the new logon handler. Try to logon and it errored out again. This time however, with a different error.
Fri Apr 14 09:36:46 2017
Release 14.1.0 Build 4138 iSeries
Component : VF_SW100O
\OS=VLF-ONE Session Services
Statement : 510
Message : Failed to locate method avCheckAuth in the ancestor(s) class VLFLOGON2.
Routine : File LpType at line 11227.
Job Number: 252940 OS User : DCXPGMLIB
PROC=*WAM WAML=LANSA:XHTML WVAR=2 W3ST=1 LANG=ENG PART=SYS USER=DCXPGMLIB CMTH=T CDLL=LCOMGR32.DLL WSTY=IS-A ITHP=N
ROOT=/LANSA_dcxpgmlib
That method clearly is defined in VLFLOGON2 as it is defined in UF_OLOGON

Code: Select all

mthroutine name(avCheckAuth) options(*REDEFINE)

#FrameworkObject.AllowAccess := True

endroutine
It works with UF_OLOGON, but does not work with an exact copy of it.
Edit
If I remove the avCheckAuth method then I get the SAME error as before. "Failure dispatching request ...".

I thought it may be an issue with my Framework setup, but then why does it work with UF_OLOGON and nothing else? Perhaps its the server setup? I feel like the avCheckAuth missing method error may be a clue that something may not be setup right on the server. However it works fine with UF_OLOGON and it has the avCheckAuth method redefined and it works fine on Dev and it has the same info version and EPC info as PROD.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE Failure while dispatching request to CheckUserCredentials

Post by MarkD »

Is it possible that your development environment is at EPC141017 level but your production environment not?
It would also need to be at the same (or a later) VL/LANSA version.
Generally you cab deploy from earlier to later versions, but not (reliably) from later to earlier.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VLF-ONE Failure while dispatching request to CheckUserCredentials

Post by jyoung »

No, they are both the same.

Here is the EPC log for dev. (we had some trouble getting the epcs installed, Frank from support had to help us out.)
dev epc log.PNG
dev epc log.PNG (38.59 KiB) Viewed 7470 times
Production
prod epc log.PNG
prod epc log.PNG (24.6 KiB) Viewed 7470 times
I just noticed something in the EPC logs as I am looking at them on this post.

Edit
Dev shows 141017 VLF START (end is on the next page)
Prod shows 141017 BAS START / END no VLF START END.

Edit
Discussed with the boss and I don't think the framework got initialized after the install of 141017 update. Thinking that may be the problem we re-initialized the partition, installed VLFBASE and the VLF START/END entries showed up in the logs.

An initial test shows this was the problem. Will re-deploy the Logon Handler to ensure everything is working.

Edit
Confirmed that was the problem. The LogonHandler is hooking as expected.
Post Reply