Random osgi tips and tricks - we're learning...

Log service usage

Example of locating the stack trace of an exception which only says "Internal server error" on the browser.

This works after starting Cocoon using cocoon.sh from the whiteboard/osgi directory, and making a request which causes a 500 Internal error.

> enter log
log> show
. . .
juil. 18 16:27:48 INFO  #5  HTTP Server
  Errors during initializing Apache Cocoon 2.2.0-dev : 
  Unable to read configurations from context://WEB-INF/xconf
. . .

This shows that bundle #5 caused the error.

log> show -s 5
. . .
juil. 18 16:27:47 WARNING #5HTTP Server    - 
  [ERROR] Could not set up Cocoon Logger, will use screen  instead
  org.apache.avalon.framework.configuration.ConfigurationException: Unable to read configurations from context://WEB-INF/xconf
        at org.apache.cocoon.core.CoreUtil.initLogger(CoreUtil.java:517)
        at org.apache.cocoon.core.CoreUtil.init(CoreUtil.java:170)
        at org.apache.cocoon.core.CoreUtil.<init>(CoreUtil.java:110) 

OsgiTipsAndTricks (last edited 2009-09-20 23:41:16 by localhost)