Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: Cannot override built-in adapter for class com.google.gson.JsonObject with gson 2.11.x #82

Open
jamesnetherton opened this issue Jun 4, 2024 · 1 comment

Comments

@jamesnetherton
Copy link

The framework my project uses upgraded gson to 2.11.0. This results in an IllegalArgumentException being thrown from CouchDbClientBase.initGson:

Caused by: java.lang.IllegalArgumentException: Cannot override built-in adapter for class com.google.gson.JsonObject
	at com.google.gson.GsonBuilder.registerTypeAdapter(GsonBuilder.java:714)
	at org.lightcouch.CouchDbClientBase.initGson(CouchDbClientBase.java:699)
	at org.lightcouch.CouchDbClientBase.<init>(CouchDbClientBase.java:95)
	at org.lightcouch.CouchDbClient.<init>(CouchDbClient.java:119)

There was a similar issue reported in the Apache Camel project:

https://issues.apache.org/jira/browse/CAMEL-20800

@lightcouch
Copy link
Owner

Thanks for reporting the issue.

We'll look into that in our current code update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants