users@jersey.java.net

[Jersey] Debugging Jersey

From: jeff saremi <jeffsaremi_at_hotmail.com>
Date: Mon, 14 Dec 2015 13:59:41 -0500

I keep getting 405's when I submit requests to my jersey-grizzly app
i'm trying to enable trace on the server. I am not successful
I know about jersey.config.server.tracing.threshold and jersey.config.server.tracing.type however i'm not able to set them
I put them on the java command line (-D) it didnt' work
I created a log.conf. It shows some detailed initialization messages however nothing about my requests
I even set the following in the header still nothing:
X-Jersey-Tracing-Threshold: VERBOSE

server code:
                Map<String, String> appParams = new HashMap<String, String>(); appParams.put(ApiApp.DirKey, args[0]); appParams.put(ApiApp.PostFixKey, args[1]);
                System.out.println("Starting REST API..."); ResourceConfig config = ResourceConfig.forApplication(new ApiApp(appParams)); HttpServer server = GrizzlyHttpServerFactory.createHttpServer(BASE_URI, config);
client request:
curl -X POST -i -H "ContentType: text/plain" -H "X-Jersey-Tracing-Threshold: VERBOSE" -H "X-Jersey-Tracing-Accept" -d "{some: text}" http://localhost:9998/export

Response:
HTTP/1.1 415 Unsupported Media TypeDate: Mon, 14 Dec 2015 18:48:22 GMTContent-Length: 0

thanksJeff