Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.9.1, 2.0.0
Description
Docker server returns only some Port fields for exited containers (in version 1.9.1). Then the JClouds docker provider throws NPE.
Sample:
"Ports": [ { "PrivatePort": 8080, "Type": "tcp" } ]
And stacktrace:
17:21:14.181 [main] ERROR org.jclouds.http.functions.ParseJson - Error parsing input: Null ip java.lang.NullPointerException: Null ip at org.jclouds.docker.domain.AutoValue_Port.<init>(AutoValue_Port.java:20) ~[docker-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.docker.domain.Port.create(Port.java:38) ~[docker-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_31] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_31] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_31] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_31] at com.google.common.reflect.Invokable$MethodInvokable.invokeInternal(Invokable.java:197) ~[guava-18.0.jar:na] at com.google.common.reflect.Invokable.invoke(Invokable.java:102) ~[guava-18.0.jar:na] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.newInstance(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:224) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:204) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:90) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:82) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:61) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:272) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:184) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:90) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:82) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:61) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at com.google.gson.Gson.fromJson(Gson.java:810) ~[gson-2.3.1.jar:na] at com.google.gson.Gson.fromJson(Gson.java:775) ~[gson-2.3.1.jar:na] at com.google.gson.Gson.fromJson(Gson.java:724) ~[gson-2.3.1.jar:na] at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:42) ~[jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:83) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:77) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:62) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:42) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117) [jclouds-core-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87) [guava-18.0.jar:na] at com.sun.proxy.$Proxy60.listContainers(Unknown Source) [na:na] at org.jclouds.docker.compute.strategy.DockerComputeServiceAdapter.listNodes(DockerComputeServiceAdapter.java:212) [docker-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:122) [jclouds-compute-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:112) [jclouds-compute-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:192) [jclouds-compute-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:121) [jclouds-compute-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT] at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:210) [jclouds-compute-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
Attachments
Issue Links
- relates to
-
JCLOUDS-1044 MapTypeAdapter and IterableTypeAdapter doesn't handle NULL values correctly
- Resolved