jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1041) NPE in Port class - methods should be nullable
Date Fri, 20 May 2016 10:14:12 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293112#comment-15293112
] 

ASF subversion and git services commented on JCLOUDS-1041:
----------------------------------------------------------

Commit 02546dfea42714a4112fcdb5fe3481c6a2743b73 in jclouds-labs's branch refs/heads/1.9.x
from [~nacx]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;h=02546df ]

JCLOUDS-1041: Fix NPE when deserializing Port in Docker 1.9.1


> NPE in Port class - methods should be nullable
> ----------------------------------------------
>
>                 Key: JCLOUDS-1041
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1041
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs
>    Affects Versions: 1.9.1, 2.0.0
>            Reporter: Josef Cacek
>              Labels: docker
>             Fix For: 2.0.0
>
>
> Docker server returns only some {{Port}} fields for exited containers (in version 1.9.1).
Then the JClouds docker provider  throws NPE.
> Sample:
> {code}
>         "Ports": [
>             {
>                 "PrivatePort": 8080,
>                 "Type": "tcp"
>             }
>         ]
> {code}
> And stacktrace:
> {code}
> 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]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message