Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background exception happening when updating/inserting entities through SDK #442

Open
tiredolddog opened this issue Dec 5, 2023 · 1 comment

Comments

@tiredolddog
Copy link

Hello there everyone.

When making rest requests to insert/update entities, we are encountering issues. No exception is thrown in the logs, but there’s an error happening which looks like it’s being suppressed at some point and it seems to happen within the SDK Jackson library at the time of converting the entity to be sent.

We fetch the candidate using the searchForList method, the only field we manipulate is the customText11, which in our case is specific for associating a profile link from TH with the BH candidate.

After setting the attribute, we update the candidate using the BullhornData.updateEntity(entity) method,

If there’s no candidate in BH yet, we then proceed to create one, as such:

new Candidate(
        firstName: firstName,
        lastName: lastName,
        email: email,
        name: fullName,
        phone: cellphone,
        referredBy: source,
        customText11: customLink,
        source: source
)

Which then is created by using the method BullhornData.insertEntity(entity)

JobSubmission is being created like so:



new JobSubmission(
        isDeleted: false,
        candidate: candidate,
        sendingUser: candidate.owner,
        jobOrder: jobOrder,
        status: 'New Lead',
        dateWebResponse: DateTime.now(),
        comments: applicationNote,
        source: source
)

And then the object is sent through SDK by using the method BullhornData.insertEntity(entity)

Since the exception seems to be suppressed at some moment, it's only in runtime that we manage to end up in a catch block where we see that the following exception is happening:

java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ser.PropertyWriter.getMember()Lcom/fasterxml/jackson/databind/introspect/AnnotatedMember;

This happens in both methods, for Candidates and JobSubmissions.

For Candidate, there seems to be some missing fields when creating, but even adding those made no difference. Weirdly, this used to work, so i'm guessing with the new updates, the changes affected those parts of the code. But when we update the existing candidate by fetching it from BH and use the updateEntity method to change the entity, every required field is returned from the API and this too leads to the error described above.

For JobSubmission though we are sending every required field as marked by the documentation at https://bullhorn.github.io/rest-api-docs/entityref.html#jobsubmission and yet it also fails with the same exception.

Versions used are as follows:
SDK new version 2.2.2;
Grails version 3.1.16;
Java 8;

We were not able to found a workaround for this. Have anyone else encountered this problem?

@mugren
Copy link

mugren commented Dec 7, 2023

I would want to follow up on this, and the address issue that me and @tiredolddog experienced in the project we are using Bullhorn SDK.

These issues are a consequence of the need to switch from 1.x to 2.2.x version because the 1.x version started to get the 'Rest API session exceptions' out of a sudden (similar to this, but different), for correct credentials. Noting, this auth issue only appears when using the SDK, not when manually invoking the endpoints, via Postman for example.

If the lift to maintain the SKD 2.x to work with JDK 8 is bigger than having the 1.x work with JDK 8 and have no auth issues, the latter will work better for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants