WARN: malformed image: null [JClouds 1.3.2]

62 views
Skip to first unread message

Paolo Di Tommaso

unread,
May 30, 2012, 11:38:38 AM5/30/12
to jcl...@googlegroups.com
Hi guys, 

I getting this warning launching a custom Amazon AMI. Everything works fine, but I get the annoying stack trace showed below. 

Is this a bug, or there is something wrong with my AMI. 

In any case any idea of to avoid that?




java.lang.NullPointerException: architecture
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) ~[guava-11.0.1.jar:na]
at org.jclouds.ec2.domain.Image.<init>(Image.java:81) ~[ec2-1.3.2.jar:1.3.2]
at org.jclouds.ec2.xml.DescribeImagesResponseHandler.endElement(DescribeImagesResponseHandler.java:169) ~[ec2-1.3.2.jar:1.3.2]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2939) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) [na:1.6.0_31]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) [na:1.6.0_31]
at org.jclouds.http.functions.ParseSax.doParse(ParseSax.java:141) [jclouds-core-1.3.2.jar:1.3.2]
at org.jclouds.http.functions.ParseSax.parse(ParseSax.java:130) [jclouds-core-1.3.2.jar:1.3.2]
at org.jclouds.http.functions.ParseSax.apply(ParseSax.java:86) [jclouds-core-1.3.2.jar:1.3.2]
at org.jclouds.http.functions.ParseSax.apply(ParseSax.java:54) [jclouds-core-1.3.2.jar:1.3.2]
at com.google.common.util.concurrent.Futures$4.apply(Futures.java:503) [guava-11.0.1.jar:na]
at com.google.common.util.concurrent.Futures$4.apply(Futures.java:501) [guava-11.0.1.jar:na]
at com.google.common.util.concurrent.Futures$3.apply(Futures.java:279) [guava-11.0.1.jar:na]
at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:729) [guava-11.0.1.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_31]
at java.lang.Thread.run(Thread.java:680) [na:1.6.0_31]



Thanks, 
Paolo

 

Hans Hrasna

unread,
May 30, 2012, 2:32:04 PM5/30/12
to jcl...@googlegroups.com, Paolo Di Tommaso
Hi Paolo,

   We see this stack trace as well. This may be a further clue to the cause. We have seen this as far back as jclouds 1.2.2. We have several AWS accounts and only get these annoying but seemingly benign errors on certain accounts. Our accounts have a mix of EBS and instance-store based images, but I haven't been able to narrow it down to which one is triggering it, and it doesn't occur on accounts that have no personal AMIs.

-Hans
--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/CVJbnwvkiIIJ.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.


-- 
Hans Hrasna
Senior Architect
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Office: 781-357-3087
Cell: 978-549-4865

Adrian Cole

unread,
May 30, 2012, 2:58:46 PM5/30/12
to jcl...@googlegroups.com
So architecture is nullable :) An easy patch to adjust the code to
not enforce null. Anyone want to try?

-A

Hans Hrasna

unread,
May 30, 2012, 7:37:33 PM5/30/12
to jcl...@googlegroups.com, Adrian Cole
Here's the diff against the 1.5.0-SNAPSHOT branch:

diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/Image.java
b/apis/ec2/src/main/java/
index 12a95d1..c3e8592 100644
--- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/Image.java
+++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Image.java
@@ -78,7 +78,7 @@ public class Image implements Comparable<Image> {
@Nullable String ramdiskId, RootDeviceType rootDeviceType,
@Nullable String rootDe
Map<String, EbsBlockDevice> ebsBlockDevices,
VirtualizationType virtualizationType
this.region = checkNotNull(region, "region");
- this.architecture = checkNotNull(architecture, "architecture");
+ this.architecture = architecture;
this.imageId = checkNotNull(imageId, "imageId");
this.name = name;
this.description = description;


Do you mean try submitting a pull request?

-Hans

Paolo Di Tommaso

unread,
May 31, 2012, 1:18:03 PM5/31/12
to jcl...@googlegroups.com
Yes, it is already fixed in the latest snapshot. 


Thanks, 
Paolo



For more options, visit this group at
http://groups.google.com/group/jclouds?hl=en.



--
Hans Hrasna
Senior Architect
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Office: 781-357-3087
Cell: 978-549-4865

--
You received this message because you are subscribed to the Google Groups
"jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/jclouds?hl=en.


--
Hans Hrasna
Senior Architect
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Office: 781-357-3087
Cell: 978-549-4865


--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+unsubscribe@googlegroups.com.

Hans Hrasna

unread,
Feb 13, 2013, 12:02:21 PM2/13/13
to Adrian Cole, jcl...@googlegroups.com
Hi Adrian,

We are seeing this bug again in jclouds 1.5.3 -> 1.5.7. Was the
fix was dropped sometime after 1.5.0 ?
I'm trying to track it down on Github now.

thanks,
Hans

On 5/30/12 7:49 PM, Adrian Cole wrote:
> Sure. Few times we are as lucky to have such simple pull requests :)
>
> I'll send you the CLA, and your first PR will be a snap!
> -A

Hans Hrasna

unread,
Feb 13, 2013, 12:45:12 PM2/13/13
to Adrian Cole, jcl...@googlegroups.com
Hi again, I just realized the bug we are now experiencing is a bit
different from the previous issue,
and is currrently documented: https://github.com/jclouds/jclouds/issues/1066

Also this issue is not quite the same as the previous issue where
architecture was null.
As described in the 1066 issue in the current release, it is imageId
that is null in this case.

regards,
Hans

Adrian Cole

unread,
Feb 18, 2013, 8:01:15 PM2/18/13
to Hans Hrasna, jcl...@googlegroups.com
thanks for updating the issue. let's ensure this is in 1.5.8

-a

On Wed, Feb 13, 2013 at 9:45 AM, Hans Hrasna
Reply all
Reply to author
Forward
0 new messages