Skip to content

Weird stacktrace for some java applications #141

@redsigma

Description

@redsigma

Some java logs have a exception field which looks like this when i tried to add it to the always_print_fields

exception > exceptionType: java.lang.NullPointerException
exception > frames[0] > class: org.services.resources.Resource
exception > frames[0] > line: 181
exception > frames[0] > method: addTopLevelGroup
exception > frames[1] > class: org.services.resources.admin.GroupsResource$invoker$addTopLevelGroup_b1454f0b6d09a55fc9fa006f5850e4f8ea300cbb
exception > frames[1] > method: invoke
exception > frames[2] > class: org.jboss.resteasy.reactive.server.handlers.InvocationHandler
exception > frames[2] > line: 29
exception > frames[2] > method: handle
exception > frames[3] > class: io.resteasy.reactive.server.runtime.ReactiveRequestContext
exception > frames[3] > line: 141
exception > frames[3] > method: invokeHandler
exception > frames[4] > class: org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext
exception > frames[4] > line: 147
exception > frames[4] > method: run
exception > frames[5] > class: io.vertx.core.runtime.VertxCoreRecorder$14
exception > frames[5] > line: 635
exception > frames[5] > method: runWith
exception > frames[6] > class: org.jboss.threads.EnhancedQueueExecutor$Task
exception > frames[6] > line: 2516
exception > frames[6] > method: doRunWith
exception > frames[7] > class: org.jboss.threads.EnhancedQueueExecutor$Task
exception > frames[7] > line: 2495
exception > frames[7] > method: run
exception > frames[8] > class: org.jboss.threads.EnhancedQueueExecutor$ThreadBody
exception > frames[8] > line: 1521
exception > frames[8] > method: run
exception > frames[9] > class: org.jboss.threads.DelegatingRunnable
exception > frames[9] > line: 11
exception > frames[9] > method: run
exception > frames[10] > class: org.jboss.threads.ThreadLocalResettingRunnable
exception > frames[10] > line: 11
exception > frames[10] > method: run
exception > frames[11] > class: io.netty.util.concurrent.FastThreadLocalRunnable
exception > frames[11] > line: 30
exception > frames[11] > method: run
exception > frames[12] > class: java.lang.Thread
exception > frames[12] > line: 1583
exception > frames[12] > method: run
      exception > message: Cannot invoke "org.representations.Representation.getName()" because "rep" is null
        exception > refId: 1

This is how the raw json looks like (but i did a pretty format on it)

{
    "exception": {
        "refId": 1,
        "exceptionType": "java.lang.NullPointerException",
        "message": "Cannot invoke \"org.representations.Representation.getName()\" because \"rep\" is null",
        "frames": [
            {
                "class": "org.services.resources.admin.GroupsResource",
                "method": "addTopLevelGroup",
                "line": 181
            },
            {
                "class": "org.services.resources.GroupsResource$invoker$addTopLevelGroup_b1454f0b6d09a55fc9fa006f5850e4f8ea300cbb",
                "method": "invoke"
            },
            {
                "class": "org.jboss.resteasy.reactive.server.handlers.InvocationHandler",
                "method": "handle",
                "line": 29
            },
            {
                "class": "io.resteasy.reactive.server.runtime.ReactiveRequestContext",
                "method": "invokeHandler",
                "line": 141
            },
            {
                "class": "org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext",
                "method": "run",
                "line": 147
            },
            {
                "class": "io.vertx.core.runtime.VertxCoreRecorder$14",
                "method": "runWith",
                "line": 635
            },
            {
                "class": "org.jboss.threads.EnhancedQueueExecutor$Task",
                "method": "doRunWith",
                "line": 2516
            },
            {
                "class": "org.jboss.threads.EnhancedQueueExecutor$Task",
                "method": "run",
                "line": 2495
            },
            {
                "class": "org.jboss.threads.EnhancedQueueExecutor$ThreadBody",
                "method": "run",
                "line": 1521
            },
            {
                "class": "org.jboss.threads.DelegatingRunnable",
                "method": "run",
                "line": 11
            },
            {
                "class": "org.jboss.threads.ThreadLocalResettingRunnable",
                "method": "run",
                "line": 11
            },
            {
                "class": "io.netty.util.concurrent.FastThreadLocalRunnable",
                "method": "run",
                "line": 30
            },
            {
                "class": "java.lang.Thread",
                "method": "run",
                "line": 1583
            }
        ]
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions