Skip to Content
Author's profile photo Dirk Koest

Facilitate error analysis with WCEM Session Logging

/wp-content/uploads/2013/07/title_240188.png
Fragezeichen.png
Did you ever had problems finding log entries related to a problem you are currently facing? 

A really efficient feature within Web Channel Experience Management for everyone who has to deal with error analysis is the Session Logging tool that is part of the so called Administration pages. With this tool you can create a special downloadable log file which contains the entries related to a certain UI step/sequence. Advantages are as follows:
  • no need to switch any debug settings with the log configuration tool of Netweaver Administrator, the log level is switched temporarily to level DEBUG during the current session and set back afterwards
  • no need to look through huge log files resp. many pages of the log viewer to find the corresponding entries, the file does only contain entries that are produced during the current session 
  • no need to access any file system to be able to download the log entries within a file, there is a zipped file created which can be downloaded directly

First of all two remarks:
Ausrufezeichen.png
1. The Administration page is protected by security constraints in web.xml and can only be accessed with a UME logon on the Java application server. The user role has to be a role that is maintained as a context parameter in web.xml:
<context-param>
<param-name>admin.user.role</param-name>
<param-value>wecadmin</param-value>
</context-param>
Ausrufezeichen.png

2. Session logging does not always function in a cluster that has more than one server process. To use more than one server process, install an additional instance that contains only one server process to run the Administration page.
 
 
The tool can be accessed via 
         
http://<server>:<port>/<deployment_unit>/com.sap.common/adminStartPage.jsf

Here a dedicated tab is available where the necessary steps are described: 

SelectApp.png
So after having selected the application you want to create a session log file for, you have several options that are influencing the result:
PossibleSelections.png
Depending on what step or process you want to create a log file for, you can start the session logging immediately. According to this decision, there will be an additional button rendered in the next step, which gives you the possibility to start session logging at a later point in time.

Ausrufezeichen.png
In general it is recommended to log only the step in which an error occurred to keep log files from becoming too big, which means to leave the start session logging unchecked.
     

With the next two check boxes you can explicitly include log entries for categories UI components and resource handling. The tool switches the log level temporarily to DEBUG for all categories. As especially both mentioned categories are producing a large amount of log entries and to enhance the readability of the result, we decided to exclude these categories by default.
After having made these decisions, you can create the Application URL which then will be used to reproduce the steps you want to check:
ApplicationURL.png
Ausrufezeichen.png
Please be aware that executing the generated URL within the same browser will destroy the session the tool runs in and thus there will not be any usable result. Thus you have to use a different browser to start the generated URL.

If you have chosen to start session logging immediately, you can now reproduce the behavior you want to check (despite shown in the picture above, there will be no button available to start session logging). Otherwise you have to navigate to one step before the step you want to check, start session logging via the button, and then reproduce the behavior you want to check.

If you are done with the steps, you can stop session logging via the corresponding button and then download the created log file for further investigation.

Hopefully this blog will help you saving some time in error analysis 🙂

weitereInfos.png
Security Guide for WCEM 2.0 (section User Roles on SAP NetWeaver AS Java for more information on assigning security roles to grant access to Administration page)
All guides can be found under http://help.sap.com/wec

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Dirk,

      Please let me know the exact role which can be assigned to the user either in UME/CRM so that the user can access the session logging.

      Thanks and Regards,

      Sunil

      Author's profile photo Dirk Koest
      Dirk Koest
      Blog Post Author

      Hi Sunil,

      The security role wecadmin is mapped by default to the UME server role administrator. This is due to a mapping definition in the Web descriptor file Web-j2ee-engine.xml.

      Please refer also to Security Guide for WCEM (you can find it under http://service.sap.com/wec-inst) chapter Predefined User Role on SAP NetWeaver AS Java

      So on our development we have to use the UME-user Administrator and it works.

      If this is not working for you, you have to manually assign the created Action wecadmin to a role that is assigned to your user...

      For trouble shooting plaese also refer to the security guide.

      I hope this will help, otherwise please come back to me.

      BR

      Dirk

      Author's profile photo Former Member
      Former Member

      Hi Dirk,

      It works fine with the standard application (leanapp) but when we try to access it in our own application we get an error 403, you're not authorised.

      Our user is in the administrator group.

      Thanks,

      Benoît

      Author's profile photo Dirk Koest
      Dirk Koest
      Blog Post Author

      Hi Benoit,

      first of all, do you have referenced the default web.xml in your web.xml via

      <!--@@include wec/frw/tc/core/includes/webxml--> ?

      If yes and it is still no working, can you please add the following entry to your web-j2ee-engine.xml:

      <security-role-map>

           <role-name>wecadmin</role-name>

           <server-role-name>administrator</server-role-name>

      </security-role-map>

      Hope this helps?!

      Best Regards,

      Dirk

      Author's profile photo Former Member
      Former Member

      Hi Dirk,

      Yes thank you it was very helpful, unfortunately I cannot give you points here 😉

      Regards,

      Benoît

      Author's profile photo Dirk Koest
      Dirk Koest
      Blog Post Author

      You're welcome 🙂 If not yet done you can rate or like the blog 😉

      Bet Regards and have a nice weekend,

      Dirk

      Author's profile photo Former Member
      Former Member

      This worked for me as well...would you mind explaining a little bit more about what is going on here and why this fixes it?  (If you remember from 2 years ago of course...)