[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-06-24 Thread Everett Toews (JIRA)

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

Everett Toews commented on JCLOUDS-558:
---

https://github.com/jclouds/jclouds/pull/421

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
> Fix For: 1.8.0, 1.7.4
>
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:124)
>  ~[compute-basics-jar-with-depend

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-06-23 Thread ASF subversion and git services (JIRA)

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

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

Commit b33825441f635c879b362c3053440c8a095209a2 in jclouds's branch 
refs/heads/1.7.x from [~everett-toews]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=b338254 ]

Fix for JSON parse error on createNodesInGroup (JCLOUDS-558)


> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-ba

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-06-23 Thread ASF subversion and git services (JIRA)

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

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

Commit b95898fc0a3d574143f89bfd0f2d0d422fc87de2 in jclouds's branch 
refs/heads/master from [~everett-toews]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=b95898f ]

Fix for JSON parse error on createNodesInGroup (JCLOUDS-558)


> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-b

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-06-19 Thread Everett Toews (JIRA)

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

Everett Toews commented on JCLOUDS-558:
---

https://github.com/jclouds/jclouds/pull/414

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:124)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.g

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-06-02 Thread Dan Offek (JIRA)

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

Dan Offek commented on JCLOUDS-558:
---

In OpenStack, when creating a server, the "image" is not always mandatory.
For example, when creating a server with Storage instead of Image, Openstack 
"create" server expects "block_device_mapping" and does not require an image.
When creating a server this way via Horizon (using storage instead of image) 
you can see in the api.log that create server does not use an image :

2014-06-03 09:31:39.132 18899 DEBUG nova.api.openstack.wsgi 
[req-95d6d0a3-fc6c-4e83-a858-eab30da6b347 47a34f0f39224257804678783d996e60 
1c5ebfc0a7f54880ab35a2bea7b111c2] Action: 'create', body: {"server": {"name": 
"InstancBootedViaStorage", "imageRef": "", "block_device_mapping": 
[{"volume_id": "8d751974-f5ae-4b5e-92f4-0b9e57f5619a", "delete_on_termination": 
"0", "device_name": "vda"}], "flavorRef": 
"adc2c1c5-dc3f-45b0-9128-2434fa4a9ac0", "max_count": 1, "min_count": 1, 
"networks": [{"uuid": "653495b9-8733-4feb-83d4-5b43b5541b04"}], 
"security_groups": [{"name": "default"}]}} _process_stack 
/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py:961

Following this create server command, the list servers (show) will show the new 
server with "image":"", since it has no image.
I tried a workaround similar to what Ignasi suggested, and it works, but I 
believe a full solution needs to be developed.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.j

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-20 Thread Ignasi Barrera (JIRA)

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

Ignasi Barrera commented on JCLOUDS-558:


A trivial fix would be to try to parse the json and fallback to a parser that 
tries to parse the "buggy response":

In 
[NovaParserModule.java#L129|https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/config/NovaParserModule.java#L129]:
{code:java}

Server serverBase = null;
try {
   serverBase = apply((ServerInternal) context.deserialize(jsonElement, 
ServerInternal.class));
 } catch (JsonSyntaxException ex) {
   // Try to parse the json using the "buggy" server class
   serverBase =  apply((ServerInternal) context.deserialize(jsonElement, 
ServerInternalWithStringLiteralImage.class));
}
{code}

And have that {{ServerInternalWithStringLiteralImage}} class declare the 
{{image}} field as a String instead of as a {{Resource}}. The problem here is 
that we can't then pass the image field to the parent's constructor, and it is 
a mandatory field, so we can't just pass a {{null}}.

I don't know if relaxing the constraint and making the image nullable would be 
a fair change just to workaround this issue (as there are many providers using 
the nova api that might expect the image field to be always set). If we are 
confident that having a null image won't break stuff, we could add another 
protected constructor to the parent {{Server}} class, marked deprecated, to be 
used only by that workaround class, and leaving the field null.

I don't know, it's just an idea and would love to hear your ideas too, but I 
think we should do something with this issue without waiting for a fix in nova.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-20 Thread Ignasi Barrera (JIRA)

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

Ignasi Barrera commented on JCLOUDS-558:


This is also affecting the Jenkins plugin. The plugin uses the {{listNodes}} 
call to validate the connection to the provider, and this is a blocker for the 
plugin. If the OpenStack installation is affected by the Nova issue and there 
are such nodes deployed, then the Jenkins plugin just don't work.

Given that the priority of the issue has been set to low, I think we should 
create a workaround for this.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-11 Thread Everett Toews (JIRA)

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

Everett Toews commented on JCLOUDS-558:
---

Filed a bug over in OpenStack Nova

https://bugs.launchpad.net/nova/+bug/1317880

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>Assignee: Everett Toews
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:124)
>  ~[compute-basics-jar-with-depende

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-06 Thread Andrew Ruef (JIRA)

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

Andrew Ruef commented on JCLOUDS-558:
-

I used "launch from image" with "create new volume", and made a new 40gb disk 
for the image.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:124)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-06 Thread Everett Toews (JIRA)

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

Everett Toews commented on JCLOUDS-558:
---

H...the images look okay to me.

>From your initial list servers call, do you know how that server (id: 
>6aa6bb89-d9ef-4647-982a-803eee53f573) was created in the first place?

Maybe?

 # [Launch from 
image|http://docs.openstack.org/user-guide/content/launch_from_image.html]
 # Launch from image snapshot
 # [Launch from 
volume|http://docs.openstack.org/user-guide/content/boot_from_volume.html]

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.c

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-05 Thread Andrew Ruef (JIRA)

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

Andrew Ruef commented on JCLOUDS-558:
-

Sure, here it is:

{noformat}
-  Sending request 2011553126: GET 
http:///v2/aa8b003283e24ad7afc42975eb4deeb1/images/detail HTTP/1.1
-  >> GET 
http:///v2/aa8b003283e24ad7afc42975eb4deeb1/images/detail HTTP/1.1
-  >> Accept: application/json
-  >> X-Auth-Token: 
-  Receiving response 2011553126: HTTP/1.1 200 OK
-  << HTTP/1.1 200 OK
-  << Date: Mon, 05 May 2014 20:54:42 GMT
-  << Connection: keep-alive
-  << X-Compute-Request-Id: req-9fae29df-52f7-4818-9e58-050266eaea3f
-  << Content-Type: application/json
-  << Content-Length: 2921
-  << "{"images": [{"status": "ACTIVE", "updated": "2014-05-01T15:03:15Z", 
"links": [{"href": 
"http:///v2/aa8b003283e24ad7afc42975eb4deeb1/images/8b7817e3-3ca4-4fff-b35b-918955927112",
 "rel": "self"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/8b7817e3-3ca4-4fff-b35b-918955927112",
 "rel": "bookmark"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/8b7817e3-3ca4-4fff-b35b-918955927112",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"8b7817e3-3ca4-4fff-b35b-918955927112", "OS-EXT-IMG-SIZE:size": 344457216, 
"name": "CentOS 6.5 x86_64", "created": "2014-05-01T14:58:24Z", "minDisk": 2, 
"progress": 100, "minRam": 1000, "metadata": {}}, {"status": "ACTIVE", 
"updated": "2014-05-01T14:57:03Z", "links": [{"href": 
"http:///v2/aa8b003283e24ad7afc42975eb4deeb1/images/f1885998-9da6-4777-bacd-937e42096282",
 "rel": "self"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/f1885998-9da6-4777-bacd-937e42096282",
 "rel": "bookmark"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/f1885998-9da6-4777-bacd-937e42096282",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"f1885998-9da6-4777-bacd-937e42096282", "OS-EXT-IMG-SIZE:size": 2147483648, 
"name": "Fedora 20 x86_64", "created": "2014-05-01T14:56:45Z", "minDisk": 2, 
"progress": 100, "minRam": 2000, "metadata": {}}, {"status": "ACTIVE", 
"updated": "2014-05-01T15:01:08Z", "links": [{"href": 
"http:///v2/aa8b003283e24ad7afc42975eb4deeb1/images/78cc4b66-bec3-4dca-ab06-ce01be832042",
 "rel": "self"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/78cc4b66-bec3-4dca-ab06-ce01be832042",
 "rel": "bookmark"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/78cc4b66-bec3-4dca-ab06-ce01be832042",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"78cc4b66-bec3-4dca-ab06-ce01be832042", "OS-EXT-IMG-SIZE:size": 252903936, 
"name": "Ubuntu 14.04 LTS (Trusty Tahr) x86_64", "created": 
"2014-04-30T02:12:54Z", "minDisk": 2, "progress": 100, "minRam": 0, "metadata": 
{}}, {"status": "ACTIVE", "updated": "2014-05-01T15:00:54Z", "links": [{"href": 
"http:///v2/aa8b003283e24ad7afc42975eb4deeb1/images/306b4413-ce6e-44d0-8126-c7e2864cb2b5",
 "rel": "self"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/306b4413-ce6e-44d0-8126-c7e2864cb2b5",
 "rel": "bookmark"}, {"href": 
"http:///aa8b003283e24ad7afc42975eb4deeb1/images/306b4413-ce6e-44d0-8126-c7e2864cb2b5",
 "type": "application/vnd.openstack.image", "rel": "alternate"}], "id": 
"306b4413-ce6e-44d0-8126-c7e2864cb2b5", "OS-EXT-IMG-SIZE:size": 237371392, 
"name": "Fedora 19 x86_64", "created": "2013-12-31T00:50:57Z", "minDisk": 0, 
"progress": 100, "minRam": 0, "metadata": {}}]}"
-  no jclouds.zones configured for provider openstack-nova 
-  no jclouds.zones configured for provider openstack-nova 
>> No of images 4
{noformat}

There is one running image when I run the "add" command, it is an Ubuntu image 
with its own disk. 

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
>

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-05 Thread Everett Toews (JIRA)

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

Everett Toews commented on JCLOUDS-558:
---

Can you please try listing your images and send us the log output as you did 
with listing the servers?

i.e. Do the 
[LISTIMAGES|https://github.com/jclouds/jclouds-examples/blob/master/compute-basics/src/main/java/org/jclouds/examples/compute/basics/MainApp.java#L219]
 case from the example.

That might give us an idea as to why your OpenStack cloud is returning an image 
as a String instead of an Object.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-05 Thread Andrew Ruef (JIRA)

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

Andrew Ruef commented on JCLOUDS-558:
-

Thanks [~jdaggett]! I tried adding that command line argument and the error was 
the same. 

I don't configure or have access to the OpenStack installation, is there 
anything I can ask the people that administer it to look for?

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.openstack.nova.v2_0.config

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-05 Thread Jeremy Daggett (JIRA)

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

Jeremy Daggett commented on JCLOUDS-558:


[~awruef] There is something awry in this OpenStack installation.

The [image | 
https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/Server.java#L103]
 field is a [Resource | 
https://github.com/jclouds/jclouds/blob/master/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/domain/Resource.java],which
 is the correct type that OpenStack should be returning as per the Havana 
codebase for the [Server | 
https://github.com/openstack/nova/blob/stable/havana/nova/api/openstack/compute/views/servers.py#L173]
 object.

Try to set the version of the API to version "2" in the command line arguments 
{{-Djclouds.api-version=2}}. The [Rackspace Cloud Servers Provider | 
https://github.com/jclouds/jclouds/blob/master/providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/CloudServersUSProviderMetadata.java#L85]
 sets the value accordingly.

JCLOUDS-554 was recently submitted to remove the v1.1 API which is the current 
default.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependen

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-04 Thread Ignasi Barrera (JIRA)

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

Ignasi Barrera commented on JCLOUDS-558:


This is the API call jclouds is using to get the list of nodes:
http://docs.openstack.org/api/openstack-compute/2/content/GET_OS-EXT-IPS-MAC-v2_getServersDetailed_v2__tenant_id__servers_detail_ext-os-server-os-ext-ips-mac.html

It returns an image object and not a String. I don't really know why your 
OpenStack installation is returning a String there, but adding a check for an 
empty String does not seem to be the right way to fix it (why not considering 
also numeric or even boolean values there, or just catch any parsing error for 
that field?). The API seems to be returning something different than what is 
said in the docs, so let's first investigate a bit and try understand why, and 
then we'll be in a better position to apply the right fix.

Let's see if the stackers can give some light here!

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compu

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-04 Thread Andrew Ruef (JIRA)

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

Andrew Ruef commented on JCLOUDS-558:
-

Thank you for your quick weekend response [~nacx]! 

Looking at the OpenStack API, 
http://docs.openstack.org/api/openstack-compute/2/content/GET_listServers__v2__tenant_id__servers_List_Servers-d1e2078.html#d6e1517
 , the image field seems to be optional, but an object type instead of a 
string. Would it be unreasonable to patch jclouds to expect either an empty 
string or an object, or would this be a bug in OpenStack that perhaps is fixed 
in a newer version? 

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:803) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson.fromJson(Gson.java:868) 
> ~[compute-basics-jar-with-dependencies.jar:na]
>   at com.google.gson.Gson$1.deserialize(Gson.java:126) 
> ~[compute-basics-jar-with-depende

[jira] [Commented] (JCLOUDS-558) JSON parse error on createNodesInGroup

2014-05-04 Thread Ignasi Barrera (JIRA)

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

Ignasi Barrera commented on JCLOUDS-558:


Thanks for the detailed report, [~awruef].

This error is caused because the json returned by OpenStack is not the one 
jclouds expects. Jclouds tries to deserialize each server into a 
[ServerInternal|https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/config/NovaParserModule.java#L146-L157]
 object by matching the fields in the constructor to the fields in the json 
document.

The mismatch here is in the {{image}} field. The json contains an empty string, 
while jclouds expects an object (an empty *{}* in the json).

I'm not the OpenStack expert here, but perhaps [~everett-toews], [~zack-s] or 
[~jdaggett] will be able to help determine if there is an OpenStack version 
thing or an issue in the jclouds domain object definition.

> JSON parse error on createNodesInGroup
> --
>
> Key: JCLOUDS-558
> URL: https://issues.apache.org/jira/browse/JCLOUDS-558
> Project: jclouds
>  Issue Type: Bug
>  Components: jclouds-compute
>Affects Versions: 1.7.2
> Environment: jclouds version 1.7.2 and 1.8.0-SNAPSHOT
> ubuntu 14.04 x86_64
> $ java -version
> java version "1.7.0_55"
> OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
> OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
> openstack Havana 2013.2.3
>Reporter: Andrew Ruef
>
> using jclouds-example compute-basic: 
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
> with command line:
> java \
>  -Dopenstack-nova.image-id=RegionOne/ \
>  -Dopenstack-nova.login-user=ubuntu \
>  -Djclouds.trust-all-certs=true \
>  -Djclouds.keystone.credential-type=passwordCredentials \
>  -Dopenstack-nova.endpoint=https:///v2.0 \
>  -jar target/compute-basics-jar-with-dependencies.jar \
>  openstack-nova :  mygroup add
> Command fails with exception: 
> {noformat}
> -  no jclouds.zones configured for provider openstack-nova
> -  >> invoking server:list
> -  Sending request 811507394: GET http:///v2//servers/detail 
> HTTP/1.1
> -  >> GET http:///v2//servers/detail HTTP/1.1
> -  >> Accept: application/json
> -  >> X-Auth-Token: 
> -  Receiving response 811507394: HTTP/1.1 200 OK
> -  << HTTP/1.1 200 OK
> -  << Date: Sat, 03 May 2014 05:36:11 GMT
> -  << Connection: keep-alive
> -  << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab
> -  << Content-Type: application/json
> -  << Content-Length: 1503
> -  << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", 
> "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", 
> "addresses": {"": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", 
> "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, 
> {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": 
> "", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": 
> "http:///v2//servers/6aa6bb89-d9ef-4647-982a-803eee53f573",
>  "rel": "self"}, {"href": 
> "http:servers/6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "rel": "bookmark"}], "key_name": "foo-test", "image": "", 
> "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", 
> "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.00", "flavor": {"id": "3", 
> "links": [{"href": "http:flavors/3", "rel": 
> "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", 
> "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, 
> "OS-EXT-AZ:availability_zone": "FOO", "user_id": "", "name": 
> "", "created": "2014-05-03T00:44:12Z", "tenant_id": "", 
> "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": 
> [{"id": ""}], "accessIPv4": "", "accessIPv6": "", "progress": 0, 
> "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}"
> -  Error parsing input
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected BEGIN_OBJECT but was STRING
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263)
>  ~[compute-basics-jar-with-dependencies.jar:na]
>   at 
> org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175)
>  ~[compute-basics-