Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
RHaleyMotrex
Contributor II
Contributor II

tFileEncryptPGP component from Talend Exchange does not work with Studio 8.0

I have a job that needs to encrypt a file using a PGP key. I was using the tFileEncryptPGP component from Talend Exchange but with Studio 8.0 I can no longer build the job. How do I rebuild the job to not use this component?

I have seen people discuss tsystem and tmap but I am clueless on how to use these components.

Can anyone help me re-build the job?

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi @Renae Haley​ , this component was built based on TOS3.1 which was really older. The component still use Sun base64 encoder/decoder which should be replaced with other option: Apache Commons has one, or when you're already on Java 1.8 or 11 then use java.util.Base64.Decoder/Encoder.

Open the component folder and edit this file: tFileEncryptPGP_main.java.jet

Remove these two lines from the import section.

sun.misc.BASE64Encoder

sun.misc.BASE64Decoder

 

or replace these two lines with the below lines:

java.util.Base64.Decoder;

java.util.Base64.Encoder;

 

Save the file and restart Studio, let me know if it works.

 

Regards

Shong

 

View solution in original post

4 Replies
Anonymous
Not applicable

Can you not build the job because the component hasn't been added to your Studio 8.0 or is it because the component does not work with Studio 8.0? I am afraid that we do not support the Exchange component, so I am not aware of this particular one.

RHaleyMotrex
Contributor II
Contributor II
Author

The job does not build at all below is the error that generates when I build the job. I just need help in figuring out how to replace the component in the job with a routine or other components.

 

 

1. ERROR in C:\TalendStudio8\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\file\management\TFileEncryptPGPMainJava.java (at line 21)

import sun.misc.BASE64Encoder;

    ^^^^^^^^^^^^^^^^^^^^^^

The import sun.misc.BASE64Encoder cannot be resolved

----------

2. ERROR in C:\TalendStudio8\workspace\.JETEmitters\src\org\talend\designer\codegen\translators\file\management\TFileEncryptPGPMainJava.java (at line 22)

import sun.misc.BASE64Decoder;

    ^^^^^^^^^^^^^^^^^^^^^^

The import sun.misc.BASE64Decoder cannot be resolved

Anonymous
Not applicable

Hi @Renae Haley​ , this component was built based on TOS3.1 which was really older. The component still use Sun base64 encoder/decoder which should be replaced with other option: Apache Commons has one, or when you're already on Java 1.8 or 11 then use java.util.Base64.Decoder/Encoder.

Open the component folder and edit this file: tFileEncryptPGP_main.java.jet

Remove these two lines from the import section.

sun.misc.BASE64Encoder

sun.misc.BASE64Decoder

 

or replace these two lines with the below lines:

java.util.Base64.Decoder;

java.util.Base64.Encoder;

 

Save the file and restart Studio, let me know if it works.

 

Regards

Shong

 

RHaleyMotrex
Contributor II
Contributor II
Author

After making the change you suggested the job builds and runs. thank you for your help.