java.lang.ClassCastException: com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by DavidLeoni
, 1 year ago
com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject
java.lang.ClassCastException: com.google.gson.JsonArray cannot be cast to com.google.gson.JsonObject
at eu.trentorise.opendata.disiclient.services.EntityExportService.semantifyJsonObject(EntityExportService.java:101)
at eu.trentorise.opendata.disiclient.services.EntityExportService.convertToJsonLd(EntityExportService.java:84)
at eu.trentorise.opendata.disiclient.services.EntityService.exportToJsonLd(EntityService.java:698)
at eu.trentorise.opendata.opendatarise.ekb.EntityServiceController.exportToJsonLd(EntityServiceController.java:48)
at eu.trentorise.opendata.opendatarise.model.CommitProcess.run(CommitProcess.java:125)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.