Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use a RunAs user to perform a workflow

Former Member
0 Kudos

Our requirement is to use a RunAs user to perform certain workflow in our application. It might not be the session user. Each user is authenticated using JAAS Custom login module. When the user is session accesess the application, he has no issues, but as soon as a second user is authenticated to perform the RunAs workflow I get an exception

Caused by: com.sap.engine.services.security.exceptions.BaseLoginException: Call logout before login.

at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:208)

at com.sap.engine.system.SystemLoginModule.login(SystemLoginModule.java:90)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)

at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)

at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)

at javax.security.auth.login.LoginContext.login(LoginContext.java:534)

Could anyone help me with this issue? Any help is highly appreciated.

Edited by: Viji Vidyadharan on Feb 19, 2008 9:22 PM

Edited by: Viji Vidyadharan on Feb 19, 2008 9:24 PM

3 REPLIES 3

Former Member
0 Kudos

>

> When the user is session accesess the application, he has no issues, but as soon as a second user is authenticated to perform the RunAs workflow I get an exception

>

> Caused by: com.sap.engine.services.security.exceptions.BaseLoginException: Call logout before login.

There will be a user ID entered in the workflow engine. Check the user type of that user in transaction SU01. It might not be set as a "SYSTEM" type user.

Cheers,

Julius

WolfgangJanzen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Sorry, Julius - but this is not about an ABAP system ...

But actually the error message is quite clear:

at one point of time you can only have one single user identity. Since the session is already personalized (after the user has authenticated) you cannot simply overrule this by using the RunAs method.

This is not a bug but "works as designed".

Maybe it makes sense that you elaborate what you actually intend to achieve.

I'm sure we'll find a solution for your problem - SDN can help you.

0 Kudos

>

> Sorry, Julius - but this is not about an ABAP system ...

Yes, that did occur to me (as a thought), but the ancient reservations from R/2 (were I started) were stronger

> I'm sure we'll find a solution for your problem - SDN can help you.

That, and a very special thanks to Wolfgang for all the "sorry to disagree with you" contributions from which we all learn so much!!!!

Julius