tJSONDocSave Failed following to different version of jackson-databind

Five Stars

tJSONDocSave Failed following to different version of jackson-databind

Hi, 

I designed a job which read data from Salesforce to populate a json file.

The json file creation is done using the custom components tJSONDoc.

When running the job from Talend Studio, it works well. But when trying to run from the TAC, it failed with the following errors

 

[statistics] disconnected
Exception in thread "Thread-1" java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.SerializationConfig.getDefaultPropertyInclusion()Lcom/fasterxml/jackson/annotation/JsonInclude$Value;
	at com.fasterxml.jackson.databind.node.ObjectNode.serialize(ObjectNode.java:298)
	at com.fasterxml.jackson.databind.ser.std.SerializableSerializer.serialize(SerializableSerializer.java:41)
	at com.fasterxml.jackson.databind.ser.std.SerializableSerializer.serialize(SerializableSerializer.java:27)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:129)
	at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:1052)
	at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:923)
	at de.jlo.talendcomp.json.JsonDocument.getJsonString(JsonDocument.java:677)
	at esb.oi2jsn_20_jsoncust_010_consents_0_1.OI2JSN_20_JsonCust_010_consents.tJSONDocSave_2Process(OI2JSN_20_JsonCust_010_consents.java:3660)

 

After investigations, I found that when building the job Talend brings different versions of the same Jackson jars (see screenshot).

 

I tried different solutions without any success : 

- delete the older version from Talend configuration/ ...,

- build the job from the Studio -> Unzip the build and delete the older version -> re-zip -> it works in my local but it failed after importing the zip in the TAC.

 

 

Does someone have a solution ? I will appreciate... I spent too much time trying to fix that.

 

Thanks,


Accepted Solutions
Five Stars

Re: tJSONDocSave Failed following to different version of jackson-databind

Just wanted to add my problem is still not solved but I found a workaround ; I now able to run from the TAC the built job I cleaned.

So to summarize, I did the follow :
- build the job from the studio ( select binaries)
- unzip the zip built job
. here there are 3 items ( file .properties, lib folder and the job folder)
. in the lib folder, remove the old version of the Jackson jar
- re-zip the job : select the above 3 items and zip them. Take care of not zip them inside a new folder, otherwise the job will fail when running on the TAC.
- From the TAC, create a task by importing the zip

_(o)_

All Replies
Eleven Stars

Re: tJSONDocSave Failed following to different version of jackson-databind

you can try to load the good jar with tLibraryLoad!

but the best way is to upgrade Tac Version jar version.

good luck

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Five Stars

Re: tJSONDocSave Failed following to different version of jackson-databind

Thanks for your reply.

I ve tried that before. But it's still failing .

Moderator

Re: tJSONDocSave Failed following to different version of jackson-databind

Hello,

Are you using Nexus or commandline?

For commandline, have you tried to restart the commandline, and then generate the task again?

Let us know if you can get the user component latest updating.

Best regards

Sabrina

 

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tJSONDocSave Failed following to different version of jackson-databind

Hello,
I tried both but it did not work.
So far what was successful was the following :
- build the job from the studio
- unzip the zip built and remove the old version of the Jackson jar
- execute locally
This works only when I run in my machine.
When I re-zip and import in the TAC (import zip), it failed during the execution with this error : "connection to the server failed".

Do you know why after having unzipped a build job and re-zipped manually, the TAC cannot execute it ?

Thank you for helping,

Five Stars

Re: tJSONDocSave Failed following to different version of jackson-databind

Just wanted to add my problem is still not solved but I found a workaround ; I now able to run from the TAC the built job I cleaned.

So to summarize, I did the follow :
- build the job from the studio ( select binaries)
- unzip the zip built job
. here there are 3 items ( file .properties, lib folder and the job folder)
. in the lib folder, remove the old version of the Jackson jar
- re-zip the job : select the above 3 items and zip them. Take care of not zip them inside a new folder, otherwise the job will fail when running on the TAC.
- From the TAC, create a task by importing the zip

_(o)_
Moderator

Re: tJSONDocSave Failed following to different version of jackson-databind

Hello,

Thanks for sharing your solution with us on forum.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.