question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

com.eclipsesource.json.Json.parse(String strInput) get stuck in Infinite Loop

See original GitHub issue

Hi, I have observed a behavior that com.eclipsesource.json.Json.parse(String strInput) gets stuck in an infinite loop. Usually it happens at app-server (wildfly-10.1.0.Final) startup hence it blocks my web-service. Once it is stuck it would keep getting stuck on further web-services calls unless i reboot my app-server. Sometimes rebooting the app-server doesn’t resolve this and re-trying a few times resolve this issue. Kindly help me with the issue. I would add details once i get concrete steps to reproduce it. I have witnessed this issue more than 30 times since i started using this jar (almost a month back).

Maven dependency which i am using:

<dependency>
  <groupId>com.eclipsesource.minimal-json</groupId>
  <artifactId>minimal-json</artifactId>
  <version>0.9.4</version>
</dependency>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
ralfstxcommented, Dec 6, 2017

@sbernard31 Thanks for the thread dump, that’s helpful. As far as I can see, the minimal-json classes Json and JsonValue are loaded concurrently by two different threads, both of which holding a lock (<clinit> is the static initialization of a class and its static fields).

  • pool-1-thread-10 at com.eclipsesource.json.Json.<clinit> (Json.java:63)
  • pool-1-thread-9 at com.eclipsesource.json.JsonValue.<clinit> (JsonValue.java:71)

Since the initialization of JsonValue.TRUE depends on the initialization of Json.TRUE, this seems to lead to some kind of deadlock situation.

If this is true, the static fields in JsonValue, which are only meant for compatibility are causing trouble and should be removed. Since this is a breaking change, it would require a 1.0.0.

0reactions
ralfstxcommented, Mar 9, 2018

@sbernard31 I’d prefer to open a new bug. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - How can we solve json parsing error com.eclipsesource ...
I want create json object from string value my String value is {item_type:file,item_id:1026757353679,item_name:X MIB original data_Sep2022 ...
Read more >
JsonObject (minimal-json 0.9.4 API) - javadoc.io
Represents a JSON object, a set of name/value pairs, where the names are strings and the values are JSON values. Members can be...
Read more >
com.eclipsesource.json.Json.parse java code examples
Reads the entire input from the given reader and parses it as JSON. The input must contain a valid JSON value, optionally padded...
Read more >
Clojure Programming [PDF] [2336tr1caro0] - VDOC.PUB
Loop : control returns to the read step. Clojure has a REPL too, but it differs from many other languages' REPLs in that...
Read more >
A Fast and Minimal JSON Parser for Java - EclipseSource
In the RAP project, reading and writing JSON are critical operations, since the server processes and creates JSON messages for a large ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found