{"action":"created","issue":{"url":"https://api.github.com/repos/payara/Payara/issues/2949","repository_url":"https://api.github.com/repos/payara/Payara","labels_url":"https://api.github.com/repos/payara/Payara/issues/2949/labels{/name}","comments_url":"https://api.github.com/repos/payara/Payara/issues/2949/comments","events_url":"https://api.github.com/repos/payara/Payara/issues/2949/events","html_url":"https://github.com/payara/Payara/issues/2949","id":339219087,"node_id":"MDU6SXNzdWUzMzkyMTkwODc=","number":2949,"title":"Exception from JAXRS resource is logged without stacktrace","user":{"login":"marm5r","id":2293007,"node_id":"MDQ6VXNlcjIyOTMwMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/2293007?v=4","gravatar_id":"","url":"https://api.github.com/users/marm5r","html_url":"https://github.com/marm5r","followers_url":"https://api.github.com/users/marm5r/followers","following_url":"https://api.github.com/users/marm5r/following{/other_user}","gists_url":"https://api.github.com/users/marm5r/gists{/gist_id}","starred_url":"https://api.github.com/users/marm5r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marm5r/subscriptions","organizations_url":"https://api.github.com/users/marm5r/orgs","repos_url":"https://api.github.com/users/marm5r/repos","events_url":"https://api.github.com/users/marm5r/events{/privacy}","received_events_url":"https://api.github.com/users/marm5r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-08T11:42:01Z","updated_at":"2018-07-20T10:40:48Z","closed_at":null,"author_association":"NONE","body":"# Description #\r\n----------\r\n\r\nException stack traces from JAXRS resources are swalloed up by `fish.payara.microprofile.opentracing.jaxrs.JaxrsContainerRequestTracingFilter`\r\nSo, there is no chance to trace exceptions back to their origins!\r\n\r\n## Expected Outcome\r\n\r\nIn log file: Exception with stack trace\r\n\r\n## Current Outcome\r\n\r\nIn log file: Exception without stack trace, e.g.:\r\n`[2018-07-08T13:18:46.152+0200] [] [SCHWERWIEGEND] [] [fish.payara.microprofile.opentracing.jaxrs.JaxrsContainerRequestTracingFilter] [tid: _ThreadID=38 _ThreadName=http-thread-pool::http-listener(9)] [timeMillis: 1531048726152] [levelValue: 1000] java.lang.RuntimeException`\r\n\r\n## Steps to reproduce (Only for bug reports) \r\n\r\n1. Clone git repository\r\n`git clone https://github.com/marm5r/p5-missing-stacktrace.git`\r\n\r\n2. Start application with Payara Micro\r\n```\r\ncd p5-missing-stacktrace\r\nmvn package payara-micro:start\r\n```\r\n\r\n3. Make GET request\r\n`curl http://localhost:8080/missing-stacktrace/resources/resource`\r\n\r\n4. Examine log output\r\nA RuntimeException from marm5r.p5.sample.Resource is logged without stack trace\r\n\r\n## Context ##\r\n\r\nCode fragment from JaxrsContainerRequestTracingFilter which swallows up the stack trace:\r\n```\r\n// After method invocation\r\n    @Override\r\n    public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) \r\n            throws IOException {\r\n        // Try block so that we can always attach error info if there is any\r\n        try {\r\n            ...\r\n        } finally {\r\n            // If there's an attached error on the response, log the exception and set the response entity as the \r\n            // error message (instead of as the error object)\r\n            if (responseContext.hasEntity() && responseContext.getEntity() instanceof Throwable) {\r\n                Throwable throwable = (Throwable) responseContext.getEntity();\r\n                logger.log(Level.SEVERE, throwable.toString());\r\n                responseContext.setEntity(throwable.toString());\r\n            }\r\n        }\r\n\r\n    }\r\n```\r\n\r\n## Environment ##\r\n\r\n- **Payara Version**: 5.182\r\n- **Edition**: Full, Micro\r\n- **JDK Version**: jdk1.8.0_171\r\n- **Operating System**:  Windows\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/payara/Payara/issues/comments/406563177","html_url":"https://github.com/payara/Payara/issues/2949#issuecomment-406563177","issue_url":"https://api.github.com/repos/payara/Payara/issues/2949","id":406563177,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjU2MzE3Nw==","user":{"login":"MattGill98","id":12214116,"node_id":"MDQ6VXNlcjEyMjE0MTE2","avatar_url":"https://avatars3.githubusercontent.com/u/12214116?v=4","gravatar_id":"","url":"https://api.github.com/users/MattGill98","html_url":"https://github.com/MattGill98","followers_url":"https://api.github.com/users/MattGill98/followers","following_url":"https://api.github.com/users/MattGill98/following{/other_user}","gists_url":"https://api.github.com/users/MattGill98/gists{/gist_id}","starred_url":"https://api.github.com/users/MattGill98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattGill98/subscriptions","organizations_url":"https://api.github.com/users/MattGill98/orgs","repos_url":"https://api.github.com/users/MattGill98/repos","events_url":"https://api.github.com/users/MattGill98/events{/privacy}","received_events_url":"https://api.github.com/users/MattGill98/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T10:40:48Z","updated_at":"2018-07-20T10:40:48Z","author_association":"CONTRIBUTOR","body":"Hi @marm5r,\r\n\r\nThanks for raising this issue. I've reproduced it, and created internal issue `PAYARA-2921` to address it.\r\n\r\nKind regards,\r\n\r\nMatt"}}
{"actor":{"display_login":"MattGill98"}}