One Star

[Urgent] tXMLRPCInput Problem

Dear All,
I have tried to use the component tXMLPRCInput , however the following error shown:
========================================================
Exception in component tXMLRPCInput_1
org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse servers response: Expected methodResponse element, got head
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:177)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
at talenddemosjava.testing_0_1.testing.tXMLRPCInput_1Process(testing.java:255)
at talenddemosjava.testing_0_1.testing.runJobInTOS(testing.java:513)
at talenddemosjava.testing_0_1.testing.main(testing.java:384)
Caused by:
org.xml.sax.SAXParseException: Expected methodResponse element, got head
at org.apache.xmlrpc.parser.XmlRpcResponseParser.startElement(XmlRpcResponseParser.java:79)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
at talenddemosjava.testing_0_1.testing.tXMLRPCInput_1Process(testing.java:255)
at talenddemosjava.testing_0_1.testing.runJobInTOS(testing.java:513)
at talenddemosjava.testing_0_1.testing.main(testing.java:384)
=============================================================================================
Any Idea about this error, please help~~~
12 REPLIES
One Star

Re: [Urgent] tXMLRPCInput Problem

This problem is solved , the error shown because of wrong format.
However, when I now try another simple search function, new error shown:
-----------------------------------------------------------------------------------------------------------------------------------------------
Exception in component tXMLRPCInput_5
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at org.apache.xmlrpc.parser.XmlRpcResponseParser.addResult(XmlRpcResponseParser.java:55)
at org.apache.xmlrpc.parser.RecursiveTypeParserImpl.endValueTag(RecursiveTypeParserImpl.java:71)
at org.apache.xmlrpc.parser.XmlRpcResponseParser.endElement(XmlRpcResponseParser.java:164)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
at talenddemosjava.testing_0_1.testing.tXMLRPCInput_3Process(testing.java:804)
at talenddemosjava.testing_0_1.testing.runJobInTOS(testing.java:1190)
at talenddemosjava.testing_0_1.testing.main(testing.java:1061)
------------------------------------------------------------------------------------------------------------------------------------------------
Would someone please kindly help?
Community Manager

Re: [Urgent] tXMLRPCInput Problem

Hello
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

Try to change the type of column to String on schema.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [Urgent] tXMLRPCInput Problem

Hi Shong,
Thanks for quick reply, I have already set all the field as String in schema, however error still shown.
Any Idea ?
One Star

Re: [Urgent] tXMLRPCInput Problem

Would someone please kindly help??
One Star

Re: [Urgent] tXMLRPCInput Problem

Same problem for me. Did you fix it? Still interested?
One Star

Re: [Urgent] tXMLRPCInput Problem

Well, it seems openerp is returning String faultcode and apache xmlrpc client expects Integer. I think the best aproach is catch CastException at execute method and treat as the real server error response that, in fact, it is.
Other problem I faced is that xmlrpcinput component is using "non built-in http common transport" wich hangs after first iteration. I copied xmlrpcinput component and removed httptransport setting and went fine.
Hope it helps.
One Star

Re: [Urgent] tXMLRPCInput Problem

I think this is the solution: http://www.tumblr.com/tagged/talend
One Star

Re: [Urgent] tXMLRPCInput Problem

I try to connect to OpenERP 6.1.1 and get the exactly the same error messages like described here and in the link http://www.tumblr.com/tagged/talend
Unfortunatly the solution described there seems not to work with OpenERP 6.1.1
Does anybody got luck by connecting talend with XML/RPC to OpenERP?!
Thanks!
One Star

Re: [Urgent] tXMLRPCInput Problem

Hi,
I have the same problem for OpenERPOutput componenet. Most of the time I get the below error
Exception in component tOpenERPOutput_3
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at org.apache.xmlrpc.parser.XmlRpcResponseParser.addResult(XmlRpcResponseParser.java:55)
at org.apache.xmlrpc.parser.RecursiveTypeParserImpl.endValueTag(RecursiveTypeParserImpl.java:71)
at org.apache.xmlrpc.parser.XmlRpcResponseParser.endElement(XmlRpcResponseParser.java:164)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:39)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
at com.debortoliwines.openerp.api.Session.executeCommand(Session.java:197)
at com.debortoliwines.openerp.api.OpenERPCommand.createObject(OpenERPCommand.java:151)
at openerp_7_0_import.pricelists_import_0_1.pricelists_import.tFileInputExcel_3Process(pricelists_import.java:18543)
at openerp_7_0_import.pricelists_import_0_1.pricelists_import.runJobInTOS(pricelists_import.java:22719)
at openerp_7_0_import.pricelists_import_0_1.pricelists_import.main(pricelists_import.java:22536)

The code line for the error shown is the unigue id
openERPSession_tOpenERPOutput_3
.getOpenERPCommand()
.writeObject(
"product.pricelist.item",
(Integer) valueMap_tOpenERPOutput_3
.get("id"),
valueMap_tOpenERPOutput_3);
Please could anyone help on this...
Regards,
GS
One Star

Re: [Urgent] tXMLRPCInput Problem

Did you finally find a solution for your problem ?
Regards.
Thibaut
Community Manager

Re: [Urgent] tXMLRPCInput Problem

Hi 
tOpenERPOutput is a custom component shared by robert-datenpol on Talend exchange, it seems this component has not been updated for a long time. I am notifying this topic the author of the component, hope that he will come back to us!
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [Urgent] tXMLRPCInput Problem

Hi,
the component does not support OpenERP 6.x - we testet the component with OpenERP 7 and we will support Odoo 8 (OpenERP has been renamed to Odoo). If there are any problems - please report them to  as an issue on Github. The name of of the project is: Odoo-Talend-Component
As well you can fork the project on Github and we will merge back to master.
On Github the component got some small updates.
Robert / datenpol gmbh (www.datenpol.at)