users@jersey.java.net

How to understand jersey trace?

From: Franco Graziosi <fg123_at_fga-software.com>
Date: Wed, 06 Oct 2010 16:46:55 +0200

I am trying to understand how Jersey trace works, can anybody point a
documentation about it?

Until yesterday my application worked fine, now I get a 404 and apparently the
handling class is not called (at least using a debugger) and I don't understand
why, since seems to be accepted (see trace 003 below).

I am trying to understand what "accept" and "match" exactly mean, and why the
"mapped exception to resource" occurs.

I use a groovy script to submit requests to Jersey and display responses from an
xml template that saves my time and shows the exact trace (by the way available
to whoever wish, just email me). Here is the output of Jersey trace:


Jersey-Trace:
    000: accept root resource classes: "/rest/apps.legitimation"
    001: match path "/rest/apps.legitimation" -> "/application\.wadl(/.*)?",
"/([^/]+?)(/.*)?"
    002: accept right hand path java.util.regex.Matcher[pattern=/([^/]+?)(/.*)?
region=0,23 lastmatch=/rest/apps.legitimation]: "/rest/apps.legitimation" ->
"/rest" : "/apps.legitimation"
    003: accept resource: "rest" -> @Path("/{task}")
net.sinsys.x2p.ezrest.Dispatcher_at_addd9f
    004: match path "/apps.legitimation" -> ""
    005: accept termination: "/apps.legitimation"
    006: mapped exception to response:
com.sun.jersey.api.NotFoundException_at_b1203b -> 404