Showing results for 
Search instead for 
Did you mean: 

UWLException:Logged in users context or session doesn't exist.

Former Member
0 Kudos


I'm working with UWL.

I am getting the following exception: Sep 14 10:17:09 CEST 2006(Default) Logged in users context or session doesn't exist.

I'm using EJB to attain data through IUWLService. Here is my code:

// obtain user

String callerPrincipalName = myContext.getCallerPrincipal().getName();

IUserFactory userFactory = UMFactory.getUserFactory();

IUser sapUser = userFactory.getUserByUniqueName( callerPrincipalName );

// obtain IUWLService, it works fine

IUWLService uwlService = (IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);

UWLContext uwlContext = new UWLContext();


IUWLSession uwlSession = uwlService1.beginSession(uwlContext, 6000);



IUWLViewManager viewMngr = uwlService.getViewManager(uwlContext);

IUWLItemManager itemMngr = uwlService.getItemManager(uwlContext);

UWLView currentView = viewMngr.getViewForItemType(arg1, uwlContext);

// the following throws exception

QueryResult res = itemMngr.getItemsForItemType(uwlContext,arg1,null, null);

I've implemented this functionality using HttpServlet and i have not got any problems, but I've obtained user another way :

IAuthentication authentication = UMFactory.getAuthenticator();

IUser user = authentication.forceLoggedInUser(request, response);

In this way "QueryResult res = itemMngr.getItemsForItemType(uwlContext,arg1,null, null);" works fine.

Can anybody help me to solve this problem in EJB SessionBean?

Help in this regard is highly rewarded.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Andrey,

did u solve this problem?



Former Member
0 Kudos

Hello Guys,

That problem arises, when there is a problem in getting the userid from the Portal. Try this:

IPortalComponentRequest request =

(IPortalComponentRequest) this.getRequest();

IUser user = request.GetUser();

This one will work and solve the problem.

/Raj Peddisetty.

Former Member
0 Kudos

The issue is with the user when you created it in the portal. Put Locale/language to the user in the User Administration.

and then set it to the UWL Context:


this should solve the problem