johvargas / sfdc-wsc

Automatically exported from code.google.com/p/sfdc-wsc
0 stars 0 forks source link

Bulk API Query on _History Objects #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Bulk API Query
2. Query <Name>_History Table in Salesforce Production, where <Name> is the 
name of the Object.
3.

What is the expected output? What do you see instead?
Expect:
Output from History table

I see:
Exception in thread "main" [AsyncApiException  exceptionCode='ClientInputError'
 exceptionMessage='Failed to parse exception '
]
Caused by: com.sforce.ws.ConnectionException: InvalidEntityNot a valid 
enumeration for type: class com.sforce.async.AsyncExceptionCode

What version of the product are you using? On what operating system?
V22, Mac OS

Please provide any additional information below.
It works when I run the query in Sandbox but not in Production. Exactly the 
same query. Login was successful and my Profile has Bulk API privileges. 

Original issue reported on code.google.com by tmich...@rocketlawyer.com on 5 Feb 2013 at 7:47

GoogleCodeExporter commented 8 years ago
Hi, could you please add a stacktrace?

Thanks

Jesper Udby

Original comment by jesperudby on 5 Feb 2013 at 9:59

GoogleCodeExporter commented 8 years ago
Exception in thread "main" [AsyncApiException  exceptionCode='ClientInputError'
 exceptionMessage='Failed to parse exception '
]

    at com.sforce.async.BulkConnection.parseAndThrowException(BulkConnection.java:116)
    at com.sforce.async.BulkConnection.createOrUpdateJob(BulkConnection.java:92)
    at com.sforce.async.BulkConnection.createJob(BulkConnection.java:72)
    at com.thysmichels.SFDCBulkManager.createJob(SFDCBulkManager.java:66)
    at com.thysmichels.SFDCBulkManager.runJob(SFDCBulkManager.java:287)
    at com.thysmichels.SFDCBulkManager.run(SFDCBulkManager.java:370)
    at com.thysmichels.SFDCBulkManager.main(SFDCBulkManager.java:46)
Caused by: com.sforce.ws.ConnectionException: InvalidEntityNot a valid 
enumeration for type: class com.sforce.async.AsyncExceptionCode
    at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:622)
    at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
    at com.sforce.async.AsyncApiException.loadFields(AsyncApiException.java:116)
    at com.sforce.async.AsyncApiException.load(AsyncApiException.java:107)
    at com.sforce.async.BulkConnection.parseAndThrowException(BulkConnection.java:109)
    ... 6 more

Original comment by tmich...@rocketlawyer.com on 5 Feb 2013 at 10:09

GoogleCodeExporter commented 8 years ago
Hi, I do not know the root cause of this and why sandbox and prod differs, but 
SFDC returns an exception with exception code=InvalidEntity, this exception 
code does not exist in the AsyncExceptionCode enumeration and becomes a 
ConnectionException that again is wrapped in an AsyncApiException.

You should probably dig into why SFDC returns "InvalidEntity".

Hope this helps - regards

Jesper Udby

Original comment by jesperudby on 5 Feb 2013 at 11:10

GoogleCodeExporter commented 8 years ago
Hi,

just an update: I will add the (undocumented) exception-code InvalidEntity to 
the AsyncExceptionCode enumeration, and "fix" the Exception message when 
exception-code is not found in the enumeration (put a blank between e.g 
InvalidEntity and Not :-)

This will make it into a coming release 23, hopefully by the end of this week.

Regards

Jesper Udby

Original comment by jesperudby on 6 Feb 2013 at 3:42

GoogleCodeExporter commented 8 years ago
The merge with forked version 27.0.0 included the InvalidEntity enumeration, 
will be present in release 23.

Original comment by jesperudby on 8 Feb 2013 at 8:10