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

Malformed JSON Exception at start #29271

Closed
SenfdazuGeber opened this issue Apr 29, 2024 · 4 comments · Fixed by #29287
Closed

Malformed JSON Exception at start #29271

SenfdazuGeber opened this issue Apr 29, 2024 · 4 comments · Fixed by #29287
Assignees
Milestone

Comments

@SenfdazuGeber
Copy link

SenfdazuGeber commented Apr 29, 2024

Description

After updating DBeaver to version 24.0.3.202404211624 the databse navigator is no longer reading my configuration. I found in the log a MalformedJSONException at the first configuration. This is an old no longer used connection which I have not yet deleted within my configuration. The folder no longer exists. I have some more of these connections, which was not a problem until this release. I tried to correct the configuration and deleted the malformed connection. Both didn't work, so I have no further idea.

DBeaver Version

24.0.3.202404211624

Operating System

Windows 10

Database and driver

Oracle
PostgreSQL
h2

Steps to reproduce

  1. I open DBeaver
  2. The configuration could not be read and results in an loop
  3. I cannot work

Additional context

Example of one of the connections:
"oracle_thin-162cea6d9c7-1d89a43c43c1590d": {
"provider": "oracle",
"driver": "oracle_thin",
"name": "PDBXXX_XXX_xxxxxxxxx",
"save-password": true,
"show-system-objects": true,
"folder": "Archiv",
"configuration": {
"database": "PDBXXX_XXX.XXX.XXXXXXXX.DE",
"url": "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ora12.muc.xxxxxxxx.de)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdbxxx_dev.muc.dynaware.de) ) )",
"configurationType": "MANUAL",
"home": "C:\ools\Oracle\product\12.2.0\client_1\jdk",
"type": "dev",
"closeIdleConnection": false,
"properties": {
"useFetchSizeWithLongColumn": "true",
"loginTimeout": "20"
},
"provider-properties": {
"@dbeaver-use-rule-hint@": "false",
"@dbeaver-connection-type@": "TNS",
"@dbeaver-check-schema-content@": "true",
"@dbeaver-sid-service@": "SERVICE",
"@dbeaver-always-show-dba@": "false"
}
}
},

And this i the debug log:

Start DBeaver SQL Language Semantic Model [org.jkiss.dbeaver.model.lsm 1.0.24.202404211624]
Start Konsole [org.eclipse.ui.console 3.13.100.v20230914-0751]
Start Debug-Kern [org.eclipse.debug.core 3.21.200.v20231021-1513]
Start GEF Classic Draw2d [org.eclipse.draw2d 3.14.100.202311222042]
Start GEF Classic GEF (MVC) [org.eclipse.gef 3.16.0.202311222042]
Start DBeaver ERD UI [org.jkiss.dbeaver.erd.ui 3.0.89.202404211624]
2024-04-29 21:15:42.421 - Some data source listeners are still registered: org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer:org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer@6c57105
2024-04-29 21:15:42.425 - Invalid escape sequence at line 20 column 18 path $..oracle_thin-162cea6d9c7-1d89a43c43c1590d.configuration.home
com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 20 column 18 path $..oracle_thin-162cea6d9c7-1d89a43c43c1590d.configuration.home
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1659)
at com.google.gson.stream.JsonReader.readEscapeCharacter(JsonReader.java:1650)
at com.google.gson.stream.JsonReader.nextQuotedValue(JsonReader.java:1027)
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:826)
at com.google.gson.internal.bind.ObjectTypeAdapter.readTerminal(ObjectTypeAdapter.java:95)
at com.google.gson.internal.bind.ObjectTypeAdapter.read(ObjectTypeAdapter.java:134)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:186)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:144)
at com.google.gson.Gson.fromJson(Gson.java:1227)
at com.google.gson.Gson.fromJson(Gson.java:1137)
at com.google.gson.Gson.fromJson(Gson.java:1107)
at org.jkiss.dbeaver.model.data.json.JSONUtils.parseMap(JSONUtils.java:276)
at org.jkiss.dbeaver.registry.DataSourceSerializerModern.readConfiguration(DataSourceSerializerModern.java:890)
at org.jkiss.dbeaver.registry.DataSourceSerializerModern.parseDataSources(DataSourceSerializerModern.java:402)
at org.jkiss.dbeaver.registry.DataSourceRegistry.loadDataSources(DataSourceRegistry.java:872)
at org.jkiss.dbeaver.registry.DataSourceRegistry.loadDataSources(DataSourceRegistry.java:798)
at org.jkiss.dbeaver.registry.DataSourceRegistry.loadDataSources(DataSourceRegistry.java:770)
at org.jkiss.dbeaver.registry.DataSourceRegistry.(DataSourceRegistry.java:106)
at org.jkiss.dbeaver.registry.DataSourceRegistry.(DataSourceRegistry.java:95)
at org.jkiss.dbeaver.registry.BaseProjectImpl.createDataSourceRegistry(BaseProjectImpl.java:216)
at org.jkiss.dbeaver.registry.BaseProjectImpl.lambda$0(BaseProjectImpl.java:198)
at org.jkiss.dbeaver.registry.BaseProjectImpl.lambda$1(BaseProjectImpl.java:208)
at org.jkiss.dbeaver.utils.RuntimeUtils$MonitoringTask.run(RuntimeUtils.java:727)
at org.jkiss.dbeaver.utils.RuntimeUtils$1.run(RuntimeUtils.java:263)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:115)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

@E1izabeth
Copy link
Member

I have tried to copy the provided connection and run dbeaver - no issue for me.

The log says that the issue is near $..oracle_thin-162cea6d9c7-1d89a43c43c1590d.configuration.home. Do you see this string part in the .data-sources.json file? Maybe you can show the part of the file, that include this string?

Alternatively, I would ask you to provide the whole file. If there are a lot of connections to hide sensitive information everywhere, you can send it to me on email [email protected]

@SenfdazuGeber
Copy link
Author

SenfdazuGeber commented Apr 30, 2024 via email

@E1izabeth
Copy link
Member

Thank you

@serge-rider
Copy link
Member

It is side effect of another fix.
Will be fixed in the next version.

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

Successfully merging a pull request may close this issue.

4 participants