# Grok Pattern For Java stack traces

**URL:** <https://discuss.elastic.co/t/grok-pattern-for-java-stack-traces/319036>\
**Category:** Logstash\
**Created:** [November 16, 2022, 8:56am UTC](https://discuss.elastic.co/t/grok-pattern-for-java-stack-traces/319036 "2022-11-16T08:56:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nessy](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@Nessy](https://discuss.elastic.co/u/Nessy)\
**Post date:** [November 16, 2022, 8:56am UTC](https://discuss.elastic.co/t/grok-pattern-for-java-stack-traces/319036/1 "2022-11-16T08:56:34Z")

</div>

Hello, I have been workin on this topic for a long time.  
Here my logstash conf :

```auto
filter {

  if [fields][application_name] =~ "APPNAME" {
    grok {

        match => { "message" => "(?<timestamp>%{TIMESTAMP_ISO8601}) %{GREEDYDATA:logMessage} %{LOGLEVEL:LogLevel} %{GREEDYDATA:Message} $" }

    }
  }
}

```

here my filebeat yml :

```auto
filebeat.inputs:

- type: log

 # Unique ID among all inputs, an ID is required.
  id: sse-id

  # Change to true to enable this input configuration.
  enabled: true

  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /home/sscm/elk-demo-vsme.log

  fields:
    application_name: APPNAME

  multiline.pattern: '^[[0-9]{4}-[0-9]{2}-[0-9]{2}'
  multiline.negate: true
  multiline.match: after

```

here the part of my logs:  
2021-05-11 12:41:50,790 (SbmEventEngine.java:51) INFO - SbmEventEngine is starting..  
2021-05-11 12:41:51,377 (SbmEventEngine.java:56) FATAL - SbmEventEngine can not start. Exception occured while starting EventActionEngine.  
org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [select sbmeventac0\_.ID as col\_0\_0\_, sbmeventac0\_.RETRY\_DATE as col\_1\_0\_, sbmeventac0\_.NEXT\_RETRY\_DATE as col\_2\_0\_ from SBM\_EVENT\_ACTION sbmeventac0\_ where sbmeventac0\_.SLAVE\_ID=? and state=? order by sbmeventac0\_.RETRY\_DATE asc]; SQL state [HY000]; error code [1296]; could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query  
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:642)

I cant handle the exception logs, can anyone help me with it?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 14, 2022, 8:57am UTC](https://discuss.elastic.co/t/grok-pattern-for-java-stack-traces/319036/2 "2022-12-14T08:57:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
