Debugging with application's logs

From Wiki

Jump to: navigation, search


In addition to server's logs, the WebRatio developer can use four automatically generated additional application related logs, for debugging and error report.

These logs are:

  • RTX.log
  • RTXError.log
  • WRStruts.log
  • WRStrutsError.log

and can be found in the folder: <application directory>/WEB-INF/log/

Contents

Application Logs

The application's logs provides information on the execution of the application. Using logs, a developer can find Web Model related information on the runtime behaviour of the application. With logs it's possible to trace all the errors (and their reasons) in which the application has occured during its execution. Each log provides different information:

  • RTX: it keeps track of the history of the units executed and the pages visited, along with the queries executed by each unit and, in case, registers the runtime errors occurred.
  • RTXError: it keeps track of all the runtime errors.
  • WRStruts: it keeps track of the execution of each unit and page, the links followed and the data transported, along with the outcome of each execution (error / success).
  • WRStrutsError: it logs the Framework Struts errors.

Since the information provided by logs are related to the Web Model, they are the principal instruments to WebRatio application debugging.

Log Levels

Each log has a (log4j) level that states the relevance of the information to be logged. The levels are:

  • DEBUG
  • INFO
  • WARN
  • ERROR (default level)

The developer can choose among one of these, starting from the DEBUG level where each information is logged, to the ERROR level where only blocking errors are logged. To change the log levels it's necessary to change the file RTXLogConfig.properties (for the RTX and RTXError logs) and the StrutsLogConfig.properties (for the WRStruts and WRStrutsError logs).

#Use one of the following log levels: DEBUG, INFO, WARN, ERROR
log4j.logger.org.hibernate.SQL=DEBUG, RTXLogFile
log4j.logger.com.webratio.rtx=DEBUG, RTXLogFile, RTXErrorLogFile
log4j.logger.com.webratio.units=DEBUG, RTXLogFile, RTXErrorLogFile

The properties file can be found in the folder: <application directory>/WEB-INF/conf/. Setting the log level as DEBUG allows to perform tests with all the information necessary to debug the application while setting the log level as ERROR means better performance.

Log properties file

Besides the log level, the properties file can be modified in order to configure several aspects of the application's logs. For each log, the properties file shows several configurations, in the following example, the properties of the RTX.log file are reported:

log4j.appender.RTXLogFile=org.apache.log4j.RollingFileAppender
log4j.appender.RTXLogFile.File=${logDirectory}${file.separator}RTX.log
log4j.appender.RTXLogFile.MaxFileSize=1MB
log4j.appender.RTXLogFile.MaxBackupIndex=3
log4j.appender.RTXLogFile.layout=org.apache.log4j.PatternLayout
log4j.appender.RTXLogFile.layout.ConversionPattern= %d{dd MMM yyyy HH:mm:ss,SSS}  %p [%t]  (%c:%L) - %m%n
log4j.appender.RTXLogFile.Append=true
log4j.appender.RTXLogFile.Threshold=DEBUG
  • the first line specifies the appender type (org.apache.log4j.RollingFileAppender extends FileAppender to backup the log files when they reach a certain size).
  • "RTXLogFile.File" is used to specify the path and the name of the log file.
  • "RTXLogFile.MaxFileSize" and "RTXLogFile.MaxBackupIndex" specifies the maximum size of the log file (beyond which the backup is performed,creating a file with the name specified above, with a numeric index appended) and the maximum numeric index for the backup file.
  • "RTXLogFile.layout=org.apache.log4j.PatternLayout" specifies that the format of the log must be configured, and "RTXLogFile.layout.ConversionPattern= %d{dd MMM yyyy HH:mm:ss,SSS}  %p [%t] (%c:%L) - %m%n" specifies the format of the log.
  • "RTXLogFile.Append=true" specifies that each new message will be appended in the file (if false the file is erased at each new message).
  • "RTXLogFile.Threshold" states the minimum priority of the messages that will be logged.

How to read logs

During the runtime execution, each component (page or unit) is identified by its id (the attribute automatically generated by WebRatio at design-time that univocally identifies each component). During the runtime execution, if an error occurs, it is logged in the RTX.log and RTXError.log files. The log contains information on the error and the id of the unit that caused it. Having the id of the unit, it's possible to use the WebRatio Search feature to find the unit in the Web Model and correct the error. If the logs levels are set as DEBUG, it is possible to search for the id in the logs in order to find the error trace and its cause using the element Id.

In the following example, extracted from a RTX.log set at DEBUG level, it's possible to see the Data Unit with id "dau13" performing a query on the User table. The query has a Key Condition, the value is displayed in the first line of the example, passed as parameter to the query (p0=1).


19 dic 2008 15:11:26,031  DEBUG [http-8080-Processor23]  (com.webratio.rtx.core.DefaultRTXManager:404) - [dau13]Requested content 
   unit service
19 dic 2008 15:11:26,031  INFO [http-8080-Processor23]  (com.webratio.rtx.hibernate.DBCPConnectionProvider:259) - 
   active: 1 (max: 5)   idle: 0(max: 8)
19 dic 2008 15:11:26,031  DEBUG [http-8080-Processor23]  (com.webratio.units.content.rtx.db.DataUnitService:132) - 
   [dau13][]Query Text Expander: null
19 dic 2008 15:11:26,031  DEBUG [http-8080-Processor23]  (com.webratio.units.content.rtx.db.DataUnitService:132) - 
   [dau13][]Expanded query: select a_user.OID, a_user.userName from User a_user where ((a_user.OID in(:p0)))
19 dic 2008 15:11:26,031  DEBUG [http-8080-Processor23]  (com.webratio.units.content.rtx.db.DataUnitService:132) - 
   [dau13][]Setting parameter p0={1}
19 dic 2008 15:11:26,031  DEBUG [http-8080-Processor23]  (org.hibernate.SQL:111) - 
    select
        user0_."oid" as col_0_0_,
        user0_."username" as col_1_0_ 
    from
        public."user" user0_ 
    where
        user0_."oid" in (
            ?
        ) limit ?
19 dic 2008 15:11:26,031  DEBUG [http-8080-Processor23]  (com.webratio.units.content.rtx.db.DataUnitService:132) - 
  [dau13][][trace][127.0.0.1,504597BC817F8DFB464AA7764F3CA557] {OID=1}

Use of the Logs for debugging

In this example a Script Unit creates a welcome message for the user, after the login. Let's see how to operate to fix an error using the application logs.

The Selector Unit uses the UserCtxParam to get the oid of the logged user and passes the username to the script unit which generates a welcome message, displayed by the MultiMessage Unit.

Since the Selector Unit always returns sets of the selected elements (even in case of a single element), in the Script Unit these data must be accessed as arrays.

The Script Unit contains the following code

//inputs=userName

def message = "Hi " + userName[1] +", you are now logged in the application"
 
return message

This Script Unit contains an error, in fact Groovy arrays are 0-based, but in the code there's 1 as index (the Selector Unit of the model returns only one element: the username of the logged user). This cause an "ArrayIndexOutOfBoundsException" exception. Due to this error, when the home page is accessed, no message is displayed. In case of anomalous behaviour of the application the first thing to do is to analize the application's logs. In fact in the RTXError.log there's the following message:

19 dic 2008 15:59:40,671  ERROR [http-8080-Processor25]  (com.webratio.units.utility.rtx.ScriptUnitService:159) - 
  [scu7][Create welcome message]Unable to execute the script
 org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.ArrayIndexOutOfBoundsException: 1
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:92)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:665)
	at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
	at groovy.lang.Script.invokeMethod(Script.java:78)
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.getAt(DefaultGroovyMethods.java:2961)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
...

This log gives information on what's happened: the id of the unit that generated the error and the type of the error/exception. Looking in the Web Model (using the Search in Project feature, searching the id of the Unit) the Unit with id scu7 is the script unit in the home page.

By looking the error, it's possible to fix the script with the right index

//inputs=userName

def message = "Hi " + userName[0] +", you are now logged in the application"
 
return message

Once the error has been fixed, the welcome message is correctly displayed in the home page.

In the next example let's see how to use the WRStruts log to follow the runtime behaviour of a Switch Unit.

Here the user chooses in a Selection Field the destination of the link (the page he wants to visit). Depending on the input (the chosen page), the Switch Unit redirects the user to the right page.

22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) -
   [/switch1]================== Entering Operation Action ==================
22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]Preparing operation context
22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/switch1]Extracting HTTP request parameters
22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/switch1]sp=page1
22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/switch1]link=ln16
22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/switch1]switch1.switch=Page1
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/switch1]Extracting HTTP request parameters
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]lastURL: /switch1.do?sp=page1&link=ln16&switch1.switch=Page1
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]Preparing the context before execution:
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]HTTP_SERVLET_RESPONSE=org.apache.catalina.connector.ResponseFacade@1055294
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]HTTP_SERVLET_REQUEST=org.apache.struts.upload.MultipartRequestWrapper@70816e
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]sp=page1
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]link=ln16
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]http-servlet-request=org.apache.struts.upload.MultipartRequestWrapper@70816e
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]switch1.switch=Page1
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]com.webratio.rtx.IN_OPERATION=true
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]com.webratio.rtx.REMOTE_ADDRESS=127.0.0.1,C4D7779D15CA6CFAC773BBE47FB68B64
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]http-servlet-response=org.apache.catalina.connector.ResponseFacade@1055294
22 dic 2008 18:16:35,328  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]Executing the operation service for the operation 'switch1'
22 dic 2008 18:16:35,343  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1][switch1][0 ms] Executing
22 dic 2008 18:16:35,343  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]Computing the new context:
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]HTTP_SERVLET_RESPONSE=org.apache.catalina.connector.ResponseFacade@1055294
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]HTTP_SERVLET_REQUEST=org.apache.struts.upload.MultipartRequestWrapper@70816e
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]sp=page1
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]link=oln31
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]http-servlet-request=org.apache.struts.upload.MultipartRequestWrapper@70816e
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]switch1.switch=Page1
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]com.webratio.rtx.IN_OPERATION=true
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]com.webratio.rtx.REMOTE_ADDRESS=127.0.0.1,C4D7779D15CA6CFAC773BBE47FB68B64
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]http-servlet-response=org.apache.catalina.connector.ResponseFacade@1055294
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]resultCode=success.Page1
22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]================== Leaving Operation Action ==================

Analizing the log, it's possible to see the input parameter of the unit:

22 dic 2008 18:16:35,312  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/switch1]switch1.switch=Page1

and the result of its execution:

22 dic 2008 18:16:35,390  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/switch1]link=oln31

Where "oln31" is the id of the ok link followed.

In this example the usage of the WRStruts log with a Script Unit is shown.

The Script Unit in the example receives as input two numbers and performs a division, managing all the possible errors. This is the code:

//inputs=numerator|denominator
//outputs=division
def division
try{
	division=numerator.toInteger()/denominator.toInteger()
}
catch(Throwable e){
	return ["resultCode":"error","division":division]
}
return ["resultCode":"success","division":division]

Analizing the WRStruts log it's possible to track the runtime behaviour of the script

23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) -
   [/scu4]================== Entering Operation Action ==================
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]Preparing operation context
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]Extracting HTTP request parameters
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]sp=page1
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]scu4.numerator=3
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]link=ln16
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) -
   [/scu4]scu4.denominator=3
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]Extracting HTTP request parameters
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]lastURL: /scu4.do?sp=page1&scu4.numerator=3&link=ln16&scu4.denominator=3
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]Preparing the context before execution:
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]HTTP_SERVLET_RESPONSE=org.apache.catalina.connector.ResponseFacade@1c1f2
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]HTTP_SERVLET_REQUEST=org.apache.struts.upload.MultipartRequestWrapper@1489ea3
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]sp=page1
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]scu4.numerator=3
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]link=ln16
23 dic 2008 11:49:06,557  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]http-servlet-request=org.apache.struts.upload.MultipartRequestWrapper@1489ea3
23 dic 2008 11:49:06,573  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]scu4.denominator=3
23 dic 2008 11:49:06,573  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]com.webratio.rtx.IN_OPERATION=true
23 dic 2008 11:49:06,573  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]com.webratio.rtx.REMOTE_ADDRESS=127.0.0.1,E5B543AE906F7D9C040BEBE5CA34BAF1
23 dic 2008 11:49:06,573  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]http-servlet-response=org.apache.catalina.connector.ResponseFacade@1c1f2
23 dic 2008 11:49:06,573  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]Executing the operation service for the operation 'scu4'
23 dic 2008 11:49:06,666  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4][scu4][93 ms] Executing
23 dic 2008 11:49:06,666  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]Computing the new context:
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]_scu4=com.webratio.units.utility.rtx.beans.ScriptUnitBean@1d16ecf
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]HTTP_SERVLET_RESPONSE=org.apache.catalina.connector.ResponseFacade@1c1f2
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]HTTP_SERVLET_REQUEST=org.apache.struts.upload.MultipartRequestWrapper@1489ea3
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]sp=page1
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]scu4.numerator=3
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]link=oln34
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]http-servlet-request=org.apache.struts.upload.MultipartRequestWrapper@1489ea3
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]scu4.denominator=3
23 dic 2008 11:49:06,682  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]com.webratio.rtx.IN_OPERATION=true
23 dic 2008 11:49:06,698  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]com.webratio.rtx.REMOTE_ADDRESS=127.0.0.1,E5B543AE906F7D9C040BEBE5CA34BAF1
23 dic 2008 11:49:06,698  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]http-servlet-response=org.apache.catalina.connector.ResponseFacade@1c1f2
23 dic 2008 11:49:06,698  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]resultCode=success
23 dic 2008 11:49:06,698  DEBUG [http-8080-Processor23]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]================== Leaving Operation Action ==================

In the log it's possible to see that the unit received as inputs the numbers 3 as numerator and 3 as denominator and that the "resultCode" has the value "success" (following the ok link). In this other case, the inputs were 5 as numerator and 0 as denominator (causing a division by zero). It's possible to read it in the WRStruts log:

23 dic 2008 11:49:48,776  DEBUG [http-8080-Processor25]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]================== Entering Operation Action ==================
23 dic 2008 11:49:48,776  DEBUG [http-8080-Processor25]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]Preparing operation context
23 dic 2008 11:49:48,776  DEBUG [http-8080-Processor25]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]Extracting HTTP request parameters
23 dic 2008 11:49:48,776  DEBUG [http-8080-Processor25]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]sp=page1
23 dic 2008 11:49:48,791  DEBUG [http-8080-Processor25]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]scu4.numerator=5
23 dic 2008 11:49:48,791  DEBUG [http-8080-Processor25]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]link=ln16
23 dic 2008 11:49:48,791  DEBUG [http-8080-Processor25]  (com.webratio.struts.DefaultHttpRequestHelper:509) - 
   [/scu4]scu4.denominator=0

...

23 dic 2008 11:49:48,838  DEBUG [http-8080-Processor25]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]com.webratio.rtx.REMOTE_ADDRESS=127.0.0.1,E5B543AE906F7D9C040BEBE5CA34BAF1
23 dic 2008 11:49:48,838  DEBUG [http-8080-Processor25]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]http-servlet-response=org.apache.catalina.connector.ResponseFacade@346239
23 dic 2008 11:49:48,838  DEBUG [http-8080-Processor25]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]resultCode=error
23 dic 2008 11:49:48,838  DEBUG [http-8080-Processor25]  (com.webratio.struts.actions.AbstractWRAction:183) - 
   [/scu4]================== Leaving Operation Action ==================

The division by zero has been managed causing the "resultCode" to be "error" (following the ko link).


Related articles:
Category Difficulty Refers
Can I integrate a manually written JSP page in a WebRatio application? Integration Advanced Web Application
Debugging with application's logs Web Model Intermediate Web Application
How can I configure runtime properties (e.g. upload directory)? Deployment Beginner Web Application
How can I increase memory in my application server? Deployment Beginner Web Application
How can I manage non ISO-8859-1 characters passing on the URL? Deployment Intermediate Web Application
… further results












Personal tools