You need to sign in to do that
Don't have an account?
MALFORMED_QUERY (im very novice :P )
// call the query saving the results in qr
try {
qr = binding.query("select c.accountid,c.closedDate,c.Description from case c,account ac where c.accountid=ac.accountNumber");//"select Name, numberOfEmployees, Id, Industry from Account }
catch (UnexpectedErrorFault uef) {
ERROR
------------
RESULTADO DEL ERROR (THIS IS NOT THE HOLY BIBLE :P)
-----------------------------------------
AxisFault
faultCode: {urn:fault.enterprise.soap.sforce.com}MALFORMED_QUERY
faultSubcode:
faultString: MALFORMED_QUERY:
c,account ac where c.accountId=ac.accountNumber
^
ERROR at Row:1:Column:88
unexpected token: ac.accountNumber
faultActor:
faultNode:
faultDetail:
{urn:fault.enterprise.soap.sforce.com}fault:<ns1:exceptionCode>MALFORMED_QUERY</ns1:exceptionCode><ns1:exceptionMessage>
c,account ac where c.accountId=ac.accountNumber
^
ERROR at Row:1:Column:88
unexpected token: ac.accountNumber</ns1:exceptionMessage><ns1:row>1</ns1:row><ns1:column>88</ns1:column>
c,account ac where c.accountId=ac.accountNumber
^
ERROR at Row:1:Column:88
unexpected token: ac.accountNumber
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
at com.sforce.soap.enterprise.fault.MalformedQueryFault.getDeserializer(MalformedQueryFault.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
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 com.sforce.soap.enterprise.SoapBindingStub.query(SoapBindingStub.java:3222)
at org.salesforce.quickstart.quickstart.doGetAccounts(quickstart.java:138)
at org.salesforce.quickstart.quickstart.mainLoop(quickstart.java:83)
at org.salesforce.quickstart.quickstart.<init>(quickstart.java:47)
at org.salesforce.quickstart.quickstart.main(quickstart.java:42)
THANKS A LOT!!!
select accountid, closedDate, Description, account.name, account.numberOfEployees, account.industry from case c
"select AccountId, ClosedDate, Description, Account.name, Account.NumberOfEmployees, Account.industry from Case c"
the problem is the next:
com.sforce.soap.enterprise.sobject._case cannot be cast to com.sforce.soap.enterprise.sobject.Account