cancel
Showing results for 
Search instead for 
Did you mean: 

Run a web dynpro application encounter WDUMException exception...

Former Member
0 Kudos

Dear guys,

We currently encounter a error when we run a web dynpro application.

That is, once a user click a url which will redirect to the enterprise portal,

the com.sap.tc.webdynpro.services.sal.um.api.WDUMException is thrown.

I have checked the cause of the exception is that "if there is no user (neither authenticated nor anonymous user) attached to the current session"

The following is our situation:

When linking to EP domain(ex. http://sapep.xxx.com), single signed on wil automatically process.

The url which I mentioned above is something like "http://sapep.xxx.com/portal?doc=xxx&ver=2010"

Our web dynpro program will invoke the IWDClientUser api initially for get the currently logon user's information.

And this is caused the WDUMException.

We think that the error is because that the session is not created while loading the web dynpro application,

so that, the system can't get the cuurent user with a non-user session.

The situation is not often happened. We think this is because of the system service issue.

So we try to prevent this problem with the following mechanism:

When the excpetion is thrown, we invoke a waiting program to let the system has time to generate the require session.

So when invoke the IWDClientUser, this exception can be prevented.

Any suggestion.please advise, thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Does the system has several (server) nodes?

Maybe the session isn't transferred between (server) nodes....

we have 1 dispatcher for 2 server A and B

the server A has 2 service nodes and the B has only one.

The exception is occur under the server B

thanks for replying

Former Member
0 Kudos

Try using WDPortalUtils.isRunningInPortal() method to see if the session (somehow) disconnects.

Former Member
0 Kudos

ok

I will try to use this method to control this problem.

Thanks for replying.

Former Member
0 Kudos

Try using WDPortalUtils.isRunningInPortal() method to see if the session (somehow) disconnects

Hi,

We check the method you proposing, but seems it's not the method to check the session of the current user.

The API of WDPortalUtils.isRunningInPortal() is as follows:


public static boolean isRunningInPortal()
        Checks whether or not the Web Dynpro application is running the the portal environment or not. 
        Returns: 
              true if the Web Dynpro application is running in the portal environment, false otherwise.

Is there any other API which can check the current session alive or not?

thanks.

Former Member
0 Kudos

Hi,

Can you share the solution with us, we have the same error

Rob

Former Member
0 Kudos

The exception is raised due to no portal session.

For this to happen, double click on the application and add authentication parameter.

We have set the value of authentication to be true.

Also, you can use the following lines of code to get the portal user id:

WDClientUser.getLoggedInClientUser().getSAPUser().getUniqueName();

UMFactory.getAuthenticator().getLoggedInUser().getUniqueName();

We get the user id by using WDClientUser as well.

Thanks for replying.

No one consider the problem is because of the system(J2EE service) issue?

Former Member
0 Kudos

Does the system has several (server) nodes?

Maybe the session isn't transferred between (server) nodes....

p330068
Active Contributor
0 Kudos

Hi

Please catch the WDUMException, where you are executing the IWDClientUser.

Hope it helps

Regards

Arun

Former Member
0 Kudos

Is the "Authentication" parameter of the WD application set to true?

Former Member
0 Kudos

sure

all of our web dynpro applcaitons will set the Authentication to be true

Former Member
0 Kudos

Can you post the code causing the exception?

Former Member
0 Kudos

I have catched the exception.

The code is correct i think, because it is running everyday.

The error is happened rarely.

The following is our code:

	StringBuffer strAlias = new StringBuffer("");
    
	try {
	        String alias = WDClientUser.getCurrentUser().getSAPUser().getUniqueName();
	        strAlias.append(alias);
		
	} catch (WDUMException e) {
		e.printStackTrace();
	}

While executing to the line of WDClientUser.getCurrentUser(),

it throws exceptions.

Edited by: Wei-Yang Tang on Apr 6, 2010 9:47 AM

Former Member
0 Kudos

What does e.getMessage() contains?

Former Member
0 Kudos

like "No client user defined for the current request"

Former Member
0 Kudos

Hi Friend,

The exception is raised due to no portal session.

For this to happen, double click on the application and add authentication parameter.

Also, you can use the following lines of code to get the portal user id:

WDClientUser.getLoggedInClientUser().getSAPUser().getUniqueName();

UMFactory.getAuthenticator().getLoggedInUser().getUniqueName();

Regards,

Tushar S