cancel
Showing results for 
Search instead for 
Did you mean: 

I hate EP6 SP9 logging

Former Member
0 Kudos

Iview exceptions used to appear directly on the HTML page, I don't know what you did with this release but it's really not intuitive. Where are all the easy to use controls and JSPLogger Iviews ?

I tried using the portal logger, I can't even find it!

I get something like this on the screen:

===========================

Portal Runtime Error

An exception occurred while processing a request for :

iView : Redirector.test

Component Name : Redirector.test

com/sap/tc/webdynpro/clientserver/navigation/api/WDPortalNavigationMode.

Exception id: 03:23_11/02/05_0046_4072650

See the details for the exception ID in the log file

==========================

How can I switch the exception handling back to the HTML page ?

Where on hell is this exception logged.

Really not intuitive....

Olivier

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Try to look in: \j2ee\cluster\<SERVER_DIR\log\defaultTrace.#.trc

The logs are accessible from the Portal as well:

System Administration --> Support --> Portal Runtime --> Log Viewer

Dan

Former Member
0 Kudos

Hi, I'm modifying the masthead-jsp. With EP6 SP2 it was easily possible to find the wrong statement. Now, with EP6 SP11 unfortunately I haven't been able to do so, so far. I can find the correct part in the log/trace-file, but it does not help me to find the wrong statement:

...

[EXCEPTION]

#1#com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Resource

Component : pcd:portal_content/ch.cc.ega.design/com.sap.portal.frameworkpage/ch.cc.ega.masthead

Component class : com.sapportals.portal.navigation.HeaderiView

User : CCC_SCHF

at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:444)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)

at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)

at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)

at com.sapportals.portal.navigation.HeaderiView.doContent(HeaderiView.java:63)

at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)

...

How can I get to the wrong statement?

Former Member
0 Kudos

I've found two ways for finding some better log with compile errors in a jsp-page.

1) when testing the application in an iView, view the source-code of the error-page and there will be some details somwhere in the stacktrace (unfortunately the stylesheet sets this tag to invisible):

Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: D:/usr/sap/IEP/JC01/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/ch.admin.portal.navigation.masthead/work/jsp/_sapportalsjsp_headeriview.java:598: isAnonymous is already defined in subDoContent(com.sapportals.portal.prt.component.IPortalComponentRequest,com.sapportals.portal.prt.component.IPortalComponentResponse,javax.servlet.jsp.PageContext,com.sapportals.portal.prt.servlets_jsp.server.jsp.response.JSPResponse,java.util.Vector)

boolean isAnonymous = false;

2) use the exception-id from the error-page to search the logfiles. this brings you to the stacktrace, but thisone does not contain helpful information. look above it for statements like:

Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException:

There will be the same text as in the source of the error-page.

Former Member
0 Kudos

Hi,

since there's so much confusion about logging, especially with "old" sp2 components in NW04, i started a weblog series on that topic.

-> This is Part One, Log Configration

Stay tuned, if you want to get some best practices on log viewing and how to configure dedicated log files.

Regards, Karsten

Former Member
0 Kudos

Part Two, Log Viewing:

Part Three, Configuring Log Destinations:

Former Member
0 Kudos

From reading all that and trying to get through myself, I get the impression SAP is always searching for the most complex and complicated way... And they are successfull in it!

I am used to log4j from Apache (e.g. included in WebSphere as well). There I go to the filesystem an just read the log file. You know what, you don't need any tools except an editor! You have a system.out, system.err log etc. Users familiar with unix will identify them easily...

Former Member
0 Kudos

I agree Frank, the SAP Log Viewer and logging mechanism stinks!

Former Member
0 Kudos

Try to look in: \j2ee\cluster\<SERVER_DIR\log.defaultTrace.#.trc

The logs are accessible from the Portal as well:

System Administration --> Support --> Portal Runtime --> Log Viewer

Dan

Former Member
0 Kudos

ok...

this sounds crazy, because I don't see myself added such code to each of my iviews - but the only way I could get the exception traced on the damn screen was to trap the exception myself.

try {

//DO SOMETHING

} catch (Throwable e) {

ViewBean viewBean = new ViewBean();

StringBuffer stkTrace = new StringBuffer();

stkTrace.append(e.toString()).append("<BR><BR>");

StackTraceElement[] elmt = e.getStackTrace();

for (int i = 0; i < elmt.length; i++) {

stkTrace.append(elmt<i>.toString()).append("<BR>");

}

viewBean.setMessage(stkTrace.toString());

setViewBean(ViewBeanType.REQUEST, "viewBean", viewBean);

includeJSP(request, response, "error.jsp");

}

Please... How can I change the default Portal Error page ?