Skip to content

JsonException trying to access LocalDocker.volumes()  #241

@sbespalov

Description

@sbespalov

Probably something wrong with expected JSON format.

How to reproduce:

	Volumes volumes = new LocalDocker(Paths.get("/var/run/docker.sock").toFile()).volumes();
	volumes.iterator();

Expected result:
Got the volumes iterator

Actual result:
javax.json.JsonException

Exception in thread "main" javax.json.JsonException: Cannot read JSON array, found JSON object
	at org.glassfish.json.JsonReaderImpl.readArray(JsonReaderImpl.java:122)
	at com.amihaiemil.docker.ReadJsonArray.handleResponse(ReadJsonArray.java:61)
	at com.amihaiemil.docker.ReadJsonArray.handleResponse(ReadJsonArray.java:1)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
	at com.amihaiemil.docker.HttpClientEnvelope.execute(HttpClientEnvelope.java:103)
	at com.amihaiemil.docker.ResourcesIterator.<init>(ResourcesIterator.java:64)
	at com.amihaiemil.docker.ListedVolumes.iterator(ListedVolumes.java:78)
	at Main.main(Main.java:11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions