You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Arvind Nadendla (JIRA)" <ji...@apache.org> on 2015/07/10 06:10:04 UTC

[jira] [Commented] (JCLOUDS-333) Glance failed to parse Image details which has microseconds in Date format

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

Arvind Nadendla commented on JCLOUDS-333:
-----------------------------------------

https://github.com/jclouds/jclouds-labs-openstack/commit/a6dafd0b8319e14e2240a392d940f5c8d78e7350 
fix has been submitted and upstreamed into jclouds. Should be fixed in 1.9.1 or later

> Glance failed to parse Image details which has microseconds in Date format
> --------------------------------------------------------------------------
>
>                 Key: JCLOUDS-333
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-333
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>    Affects Versions: 1.6.2
>         Environment: openstack folsom
>            Reporter: Yin Zhang
>
> Glance seems could not handle the details of the image which has creation/updated date containing microseconds (e.g. 2013-10-02T06:55:50.722021)
> This happens while using get(String ImageId) method.
> Stacktrace and the raw data of the image are following:
> java.lang.IllegalArgumentException: Error parsing data at 0
> 	at org.jclouds.date.internal.SimpleDateFormatDateService.iso8601SecondsDateParse(SimpleDateFormatDateService.java:168)
> 	at org.jclouds.openstack.glance.v1_0.functions.ParseImageDetailsFromHeaders.apply(ParseImageDetailsFromHeaders.java:63)
> 	at org.jclouds.openstack.glance.v1_0.functions.ParseImageDetailsFromHeaders.apply(ParseImageDetailsFromHeaders.java:53)
> 	at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:95)
> 	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:78)
> 	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:49)
> 	at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> 	at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:70)
> 	at sun.proxy.$Proxy119.get(Unknown Source)
> 	at com.ezhgyin.tests.GlanceGetMethod.getImageWithId(GlanceGetMethod.java:239)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
> 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> 	at org.testng.TestRunner.privateRun(TestRunner.java:767)
> 	at org.testng.TestRunner.run(TestRunner.java:617)
> 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
> 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
> 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
> 	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
> 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
> 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
> 	at org.testng.TestNG.run(TestNG.java:1057)
> 	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
> 	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
> 	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
> Caused by: java.text.ParseException: Unparseable date: "2013-10-02T06:55:50.722+0000"
> 	at java.text.DateFormat.parse(DateFormat.java:357)
> 	at org.jclouds.date.internal.SimpleDateFormatDateService.iso8601SecondsDateParse(SimpleDateFormatDateService.java:166)
> 	... 33 more
> ==========================================================
> DEBUG [jclouds.headers] (main) >> HEAD http://IP:29292/v1/images/c70a2f97-b6ba-4dac-bc66-8c541672c0e9 HTTP/1.1
> DEBUG [jclouds.headers] (main) >> X-Auth-Token: 7b75236681aa47e48f79649f1a87df9c
> DEBUG [jclouds.headers] (main) << HTTP/1.1 200 OK
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Checksum: 50bdc35edb03a38d91b1b071afb20a3c
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Owner: add94b76b90a4076a8631a6e5185f0ed
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Deleted: False
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Name: CirrOS i386
> DEBUG [jclouds.headers] (main) << Location: http://IP/v1/images/c70a2f97-b6ba-4dac-bc66-8c541672c0e9
> DEBUG [jclouds.headers] (main) << Etag: 50bdc35edb03a38d91b1b071afb20a3c
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Created_at: 2013-10-02T06:55:50.722021
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Protected: False
> DEBUG [jclouds.headers] (main) << Connection: keep-alive
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Min_disk: 0
> DEBUG [jclouds.headers] (main) << X-Openstack-Request-Id: req-e6d71f5d-4326-49ba-b5c6-5124be5c14c3
> DEBUG [jclouds.headers] (main) << Date: Thu, 03 Oct 2013 13:43:45 GMT
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Id: c70a2f97-b6ba-4dac-bc66-8c541672c0e9
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Min_ram: 0
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Status: active
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Disk_format: qcow2
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Is_public: True
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Updated_at: 2013-10-02T06:55:50.856342
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Size: 9761280
> DEBUG [jclouds.headers] (main) << X-Image-Meta-Container_format: bare
> DEBUG [jclouds.headers] (main) << Content-Type: text/html; charset=UTF-8
> DEBUG [jclouds.headers] (main) << Content-Length: 0



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