on 04-06-2010 7:57 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please catch the WDUMException, where you are executing the IWDClientUser.
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the "Authentication" parameter of the WD application set to true?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.