SugarCRM to anything

One Star

SugarCRM to anything

I'm new to this so I don't know much yet.
From what I've been able to figure out this is an encoding problem. I'm using UTF-8 in both Sugar and whatever I choose to go to whether it's mysql table or csv or anything. I get this. Anyideas what I can do? Thanks for your help
SugarCRM 5.0e
Ubuntu 8.04 (desktop)
Ubuntu 7.10 server
MySQL 5.0
Talend 2.3.3
I get this output:
Starting job SugarDev at 16:51 29/05/2008.
Exception in component tSugarCRMInput_4
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: Content is not allowed in prolog.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTraceSmiley Surprisedrg.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:1411)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1024)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
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:508)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
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:107)
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 javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.talend.sugarws.SugarsoapBindingStub.get_entry_list(SugarsoapBindingStub.java:1865)
at org.talend.SugarManagement.SugarManagementImpl.getRecordswithQuery(SugarManagementImpl.java:110)
at sugar.sugardev.SugarDev.tSugarCRMInput_4Process(SugarDev.java:451)
at sugar.sugardev.SugarDev.runJobInTOS(SugarDev.java:1369)
at sugar.sugardev.SugarDev.main(SugarDev.java:1276)
{http://xml.apache.org/axis/}hostname:ini-1005
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.talend.sugarws.SugarsoapBindingStub.get_entry_list(SugarsoapBindingStub.java:1865)
at org.talend.SugarManagement.SugarManagementImpl.getRecordswithQuery(SugarManagementImpl.java:110)
at sugar.sugardev.SugarDev.tSugarCRMInput_4Process(SugarDev.java:451)
at sugar.sugardev.SugarDev.runJobInTOS(SugarDev.java:1369)
at sugar.sugardev.SugarDev.main(SugarDev.java:1276)
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:1411)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1024)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
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:508)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
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:107)
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 javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
... 13 more
Job SugarDev ended at 16:51 29/05/2008.
Community Manager

Re: SugarCRM to anything

Hello JVWay
Can you show more information about your job? Which module did you try to connecte? Can you show some input data?
So, we will try to reproduce your job and confirm if it is a bug?
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: SugarCRM to anything

I was using the tSugarCRMInput and trying to get some, any data, out of it to a number of different Outputs. I tried Delimited, Excel and XML. I got the same error from all.
There's really nothing unusual about my Sugar data. I tried it from the Contacts and Accounts modules. I'm using 5.0 e version with MySQL as a backend.
Unfortunately I cannot post any sample data.
Mostly what I want at this point is a proof of concept. I need to show that I can hook so Sugar and get data out of it. Ultimately I'd like to utilize the newly created package from Paham Pavizi whose created the Quickbooks connector. But that's after I can successfully get data out of Sugar and into something else. If I can achieve that easily then I can commit the time to more.
Thanks,
Jerry.
Employee

Re: SugarCRM to anything

What version of Apache are you using to run the webservice? It seems as if the error stems from Apache. The SugarCRM input connects to the webservice to get data not the DB (noted by the component property ?SugerCRM Webservice URL?). Make sure the URL is correct.
Also if you have access to the DB you can use a DB connector to pull the info off directly. My Sugar instance is running locally on WinXP with a MS SQL DB and Apache 5.5. I can either choose to connect to the DB via a MSsql connector or via Sugar input connector? URL ?http://127.0.0.1/sugar/soap.php?
One Star

Re: SugarCRM to anything

Thanks, it's apache 2.2.4. I can successfully retrieve data from MySQL but I need the abstraction of the SOAP in case of underlying db changes.
Any ideas if there's config changes I can make to apache?
The URL is correct because it's making the connection. It's just that there's something about the data coming back that XML can't parse.
Employee

Re: SugarCRM to anything

Hello
I don't know with SugarCRM 5.0, but with SugarCRM 4.51 you have to precise the module name in the query condition.
If you query Leads, you have to specify a query like "leads.name like 'xx'".
Moreover, empty query doesn't works.
All of these questions are related to SugarCRM Soap API.
HTH,
PS You can also have this error with a wrong port.
One Star

Re: SugarCRM to anything

Hello,
I has the same error, but with MSSQL database.
I test a tools for sync meetings between Outllok and Sugar. With this tools i has same error.
I used a tcpmonitor and trace on Sugar's php component for find the problem.
The problem was an error SQL.
You can see on this forum, maybe you can find something for help you ... :
http://www.sugarforge.org/forum/forum.php?thread_id=4307&forum_id=106
One Star

Re: SugarCRM to anything

I had this same problem and solved it very simply.
In the component tab for the tSugarCRMInput the query condition field defaults to "new='talend'". This string is turned into a WHERE statement and for most of us, WHERE new='talend' is not valid because 'new' is not a field.
Change the field to "1" and the SQL that TOS submits through the SugarAPI will have WHERE 1 as the conditional.
This solved my problem.
One Star

Re: SugarCRM to anything

Hi
mhirt is correct. Even with SugarCRM 6 you have to prefix the tables: example: " contacts.last_name='Meyer'"
The example given by Talend when inserting the component is wrong.
PLUS for custom fields: even you can use them in the input conponent like built in fields by just adding them in schema. In the query section you have to use: _cstm after the module name
example: " contacts_cstm.identifier_my_own_field='pbel'"
Cheers
pbel
One Star

Re: SugarCRM to anything

When I try running this I get:
org.apache.axis.client.Call invoke SEVERE: Exception:
org.xml.sax.SAXException: Bad types (class org.talend.sugarws.Entry_value -> class org.talend.sugarws.Set_entry_result)
We are running on the sugar hosted service and this is the first API call we have attempted using Talend. Any ideas?
Thanks
One Star

Re: SugarCRM to anything

There is new Sugar CRM Advanced component for Talend available, look at this http://cloudbee.com/sugar-crm-talend-component/
It supports new SugarCRM API-s and also relationships creation.
One Star

Re: SugarCRM to anything

Just to add to this thread, I've been needing to export all contacts from SugarCRM to .csv and have found that if I make the query string:
"contacts.deleted='0'"
that it works to bring all those not deleted, which is in fact what I want.