maheshwarirohit87 / typica

Automatically exported from code.google.com/p/typica
Apache License 2.0
0 stars 0 forks source link

"Problem parsing returned message." with TestJec2 in build 265 #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Exception in thread "main" com.xerox.amazonws.ec2.EC2Exception: Problem parsing 
returned 
message.
    at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2008)
    at com.xerox.amazonws.ec2.Jec2.describeImages(Jec2.java:334)
    at com.xerox.amazonws.ec2.Jec2.describeImages(Jec2.java:269)
    at TestJec2.main(TestJec2.java:45)

It passes TestMonitoring fine with the same credentials. Was trying to get 
CloudWatch support 
and my app broke when I built build 265, so I ran the tests and got the same 
results.

The embedded exception looks like:

Caused by: javax.xml.bind.UnmarshalException: unexpected element 
(uri:"http://ec2.amazonaws.com/doc/2009-03-01/", 
local:"DescribeImagesResponse"). 
Expected elements are <{http://ls.amazonaws.com/doc/2008-04-
28/}ActivateDesktopProduct>,<{http://ls.amazonaws.com/doc/2008-04-
28/}ActivateDesktopProductResponse>,<{http://ls.amazonaws.com/doc/2008-04-
28/}ActivateDesktopProductResult>,<{http://ls.amazonaws.com/doc/2008-04-
28/}ActivateHostedProduct>,<{http://ls.amazonaws.com/doc/2008-04-
28/}ActivateHostedProductResponse>...

Did not post the full thing cause I am worried something sensitive might be in 
the huge output.

Original issue reported on code.google.com by george.r...@gtempaccount.com on 26 May 2009 at 12:38

GoogleCodeExporter commented 9 years ago
I've figured out the solution to this problem.  The Jec2.java file hasn't been 
updated with the XSD version from 
2009-03-01 to 2009-04-04, which is what the current typica classes are compiled 
against.

Original comment by morgan.c...@gtempaccount.com on 16 Jun 2009 at 5:53

Attachments:

GoogleCodeExporter commented 9 years ago
I've updated the Jec2.java file. svn r267

Original comment by dkavan...@gmail.com on 13 Oct 2009 at 12:13

GoogleCodeExporter commented 9 years ago
I am getting a similar error message when using sdbShell1.1a.jar. I presumed 
that
this fix had been applied to that jar file. Is that the case? If not, how do I
resolve this issue?

Original comment by Eddi...@gmail.com on 25 Jan 2010 at 9:36

GoogleCodeExporter commented 9 years ago
I am also getting the same problem. Though i have used the updated Jec2.java 
file the
problem is still not resolved. The problem applies for both typica1.6 and 1.7. 
Please
help. Here's the error msg:

[Fatal Error] :1:1: Content is not allowed in prolog.
Exception in thread "main" com.xerox.amazonws.ec2.EC2Exception: Problem parsing
returned message la badak.
        at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2293)
        at com.xerox.amazonws.ec2.Jec2.describeInstances(Jec2.java:823)
        at ec2test.Main.main(Main.java:64)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239)
        at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilde
rImpl.java:283)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at com.xerox.amazonws.common.JAXBuddy.deserializeXMLStream(JAXBuddy.java:117)
        at
com.xerox.amazonws.common.AWSQueryConnection.createException(AWSQueryConnection.
java:707)
        at
com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java
:503)
        at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2287)
        ... 2 more
Java Result: 1

Original comment by Amril.Na...@googlemail.com on 13 May 2010 at 3:10

GoogleCodeExporter commented 9 years ago
I am still running into trouble according to this issue with newest package 1.7 
and Eucalyptus 1.6.

Unfortunately i do not exactly know which API Version of EC2 Eucalyptus 1.6 
regards to, so i tested Typica 1.4 to 1.7, but with each version i ran into 
those problems.

Are there any solutions?

*********************************************************
Exception in thread "main" com.xerox.amazonws.ec2.EC2Exception: Problem parsing 
returned message.
    at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2008)
    at com.xerox.amazonws.ec2.Jec2.describeImages(Jec2.java:334)
    at com.xerox.amazonws.ec2.Jec2.describeImages(Jec2.java:269)
    at Ec2Sample.describeImages(Ec2Sample.java:74)
    at Ec2Sample.main(Ec2Sample.java:33)
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: Content is not allowed in prolog.]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:315)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:481)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:203)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:172)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
    at com.xerox.amazonws.common.JAXBuddy.deserializeXMLStream(JAXBuddy.java:80)
    at com.xerox.amazonws.common.AWSQueryConnection.createException(AWSQueryConnection.java:551)
    at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java:425)
    at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2004)
    ... 4 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:199)
    ... 11 more

Original comment by Karsten....@googlemail.com on 30 Jun 2010 at 3:40

GoogleCodeExporter commented 9 years ago
I'm getting the same problem with typica 1.7.1 and Eucalyptus 1.6. 

euca.stopInstances(['i-354205B7'],false)

(euca is an instance of Jec2)

I get the first error a few times (retries?)

[Fatal Error] :1:1: Content is not allowed in prolog.
Jul 16, 2010 11:35:56 AM com.xerox.amazonws.common.AWSQueryConnection 
createException
SEVERE: Couldn't parse error response!
org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
    at com.xerox.amazonws.common.JAXBuddy.deserializeXMLStream(JAXBuddy.java:117)
    at com.xerox.amazonws.common.AWSQueryConnection.createException(AWSQueryConnection.java:708)
    at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java:503)
    at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2291)
    at com.xerox.amazonws.ec2.Jec2.stopInstances(Jec2.java:729)

and then

INFO: response = Failure: 500 Internal Server Error

com.xerox.amazonws.ec2.EC2Exception: Number of retries exceeded : StopInstances
    at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2303)
    at com.xerox.amazonws.ec2.Jec2.stopInstances(Jec2.java:729)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
    at com.mtvi.cloud.test.GroovyCloudTest.testStopCloudInstance(GroovyCloudTest.groovy:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)
Caused by: org.apache.http.HttpException: Number of retries exceeded : 
StopInstances
    at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java:508)
    at com.xerox.amazonws.ec2.Jec2.makeRequestInt(Jec2.java:2291)
    ... 28 more
Caused by: com.xerox.amazonws.common.AWSException: Couldn't parse error 
response!
    at com.xerox.amazonws.common.AWSQueryConnection.createException(AWSQueryConnection.java:729)
    at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConnection.java:503)
    ... 29 more

Original comment by rick.ma...@gmail.com on 16 Jul 2010 at 3:47

GoogleCodeExporter commented 9 years ago
I see that this is closed, I'm going to open a new ticket. Sorry.

Original comment by rick.ma...@gmail.com on 16 Jul 2010 at 4:52