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

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

Commit 26c060a0e899333bed560b1def58ac08634d12fd in jclouds's branch 
refs/heads/fix/AzureTemplateBuilderLiveTest from [~hendrens]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=26c060a ]

JCLOUDS-1185 Allow rangeIPv4 to be null

The default network of recently created projects have a null value for rangeIPv4
And all regions as subnets, which do have values for the rangeIPv4.

Fixes JCLOUDS-1158


> A Network rangeIPv4 may be null
> -------------------------------
>
>                 Key: JCLOUDS-1185
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1185
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute, jclouds-labs-google
>    Affects Versions: 2.0.0
>            Reporter: Stuart Hendren
>              Labels: google-compute-engine
>             Fix For: 2.0.0
>
>
> When creating an instance using the default network I get an NPE because the 
> rangeIPv4 for the default network is null. It seems this is a valid response 
> from the API now (it may not have been in the past, all legacy default 
> networks had an IP range).
> Relevant log snippets:
> Wire log of response:
> {noformat}
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "{[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "kind": "compute#network",[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "id": 
> "2880581387445067991",[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "creationTimestamp": 
> "2016-09-30T05:44:40.283-07:00",[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "name": "default",[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "description": "Default 
> network for the project",[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "selfLink": 
> "https://www.googleapis.com/compute/v1/projects/project-name/global/networks/default",[\n]";
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "autoCreateSubnetworks": 
> true,[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " "subnetworks": [[\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "  
> "https://www.googleapis.com/compute/v1/projects/project-name/regions/asia-east1/subnetworks/default",[\n]";
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "  
> "https://www.googleapis.com/compute/v1/projects/project-name/regions/us-central1/subnetworks/default",[\n]";
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "  
> "https://www.googleapis.com/compute/v1/projects/project-name/regions/europe-west1/subnetworks/default",[\n]";
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "  
> "https://www.googleapis.com/compute/v1/projects/project-name/regions/us-west1/subnetworks/default",[\n]";
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "  
> "https://www.googleapis.com/compute/v1/projects/project-name/regions/us-east1/subnetworks/default"[\n]";
> 11:13:46.682 DEBUG [main]  jclouds.wire - << " ][\n]"
> 11:13:46.682 DEBUG [main]  jclouds.wire - << "}[\n]"
> {noformat}
> NPE:
> {noformat}
> 11:13:47.589 ERROR [main]  org.jclouds.http.functions.ParseJson - Error 
> parsing input: Null rangeIPv4
> java.lang.NullPointerException: Null rangeIPv4
>       at 
> org.jclouds.googlecomputeengine.domain.AutoValue_Network.<init>(AutoValue_Network.java:45)
>  ~[google-compute-engine-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
>       at 
> org.jclouds.googlecomputeengine.domain.Network.create(Network.java:58) 
> ~[google-compute-engine-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> ~[na:1.8.0_73]
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> ~[na:1.8.0_73]
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[na:1.8.0_73]
>       at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_73]
>       at 
> com.google.common.reflect.Invokable$MethodInvokable.invokeInternal(Invokable.java:197)
>  ~[guava-19.0.jar:na]
>       at com.google.common.reflect.Invokable.invoke(Invokable.java:102) 
> ~[guava-19.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 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)
>  
> {noformat}



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

Reply via email to