Getting org.hibernate.exception.ConstraintViolationException when trying to save JobSubmissionDTO - 02305202

Forum for users and developers of Bullhorn's Webservices API suite

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
rahulmittal82
User
Posts: 1
Joined: Fri Jul 15, 2016 11:47 am

Getting org.hibernate.exception.ConstraintViolationException when trying to save JobSubmissionDTO - 02305202

Post by rahulmittal82 » Fri Jul 15, 2016 11:59 am

Following is the XML format of my request:

Code: Select all

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Header/>
	<soap:Body>
		<ns2:save xmlns:ns2="http://apiservice.bullhorn.com/">
			<session>[hidden]</session>
			<dto xmlns:ns4="http://job.entity.bullhorn.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:jobSubmissionDto">
				<candidateID>[hidden]</candidateID>
				<dateAdded>2016-07-14T16:11:00</dateAdded>
				<isDeleted>false</isDeleted>
				<jobOrderID>[hidden]</jobOrderID>
				<sendingUserID>[hidden]</sendingUserID>
				<source>[hidden]</source>
				<status>New Lead</status>
			</dto>
		</ns2:save>
	</soap:Body>
</soap:Envelope>
I get get following exception in response:

Code: Select all

<message>org.hibernate.exception.ConstraintViolationException: could not insert: [com.bullhorn.entity.job.JobSubmission]</message>
<message>The INSERT statement conflicted with the FOREIGN KEY constraint "FK_JobResponse_JobPosting". The conflict occurred in database "BULLHORN5257", table "Bullhorn1.BH_JobOpportunity", column 'jobPostingID'.</message>
I understand that I am trying to save a JobSubmission for the candidate that already exists. Am I right? If yes, I need to change either candidateid or joborderid in order to test this. How do I get a list of candidateids and joborderids in the system?

AmberOswald
User
Posts: 1
Joined: Mon Aug 15, 2016 11:08 am

Re: Getting org.hibernate.exception.ConstraintViolationException when trying to save JobSubmissionDTO - 02305202

Post by AmberOswald » Mon Aug 15, 2016 11:23 am

Hello rahulmittal82,

This is Amber with Bullhorn Support.

The easiest way to get a list of both JobOrderIDs and CandidateIDs would be through the List Views in Bullhorn. An admin user in Bullhorn will be able to export the list with the ID numbers to a CSV file.

If you have any further comments or questions please do not hesitate to let us know.

Thank you,
Amber
Technical Support Analyst

Post Reply