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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
MDOTSHADBA
Contributor III
Contributor III

tscramble

The tscramble component available in the following link is giving compilation errors.
http://www.talendforge.org/exchange/index.php?eid=410&product=tos&action=view&nav=1,2,1
Basically I am tring to encrypt and decrypt data. We are Using Talend Integration suite 4.2.2
Any help is appreciated!!

Errors
***************************************************************
Exception in thread "main" java.lang.Error: java.lang.Error: Unresolved compilation problems:
Type mismatch: cannot convert from SecretKey to KeySpec
skey cannot be resolved
SecretKeySpec cannot be resolved to a type
kgen cannot be resolved
The method getBytes(String) is undefined for the type Integer
The method decodeBuffer(String) in the type CharacterDecoder is not applicable for the arguments (Integer)
keytScramble_2 cannot be resolved to a type
The constructor SecretKeySpec(char[], String) is undefined
Cipher cannot be resolved to a type
Cipher cannot be resolved
ALGORITHM cannot be resolved to a variable
Cipher cannot be resolved to a variable
valueToEnc cannot be resolved
BASE64Encoder cannot be resolved to a type
Void methods cannot return a value
The method getBytes() is undefined for the type Integer
The method decodeBuffer(String) in the type CharacterDecoder is not applicable for the arguments (Integer)
*********************************************************************************************
Labels (3)
16 Replies
Anonymous
Not applicable

Hi Sai,
Thanks for reporting that, I'll test it again and see what the issue could be.
MDOTSHADBA
Contributor III
Contributor III
Author

Thank you vgalopin
Please let me know if you need any additional details.
Anonymous
Not applicable

Sai,
I found what's wrong!
This component requires a Java JDK installed, if you have this error this means that you are using a JRE, or that Talend is configured to use a JRE.
Verify what you Java installation is.
MDOTSHADBA
Contributor III
Contributor III
Author

vgalopin,
I have the JDK installed on my client machine in the following path. I have also added the path under preferences -> java -> Installed JREs
I see that jdk path is checked here. I chose the type Standard VM while adding the new path.
C:\Program Files\Java\jdk1.6.0_25
Please let me know if i am missing anything. Do i need to install JDK on the Talend server as well.
Thanks,
Sai Krishna.
Anonymous
Not applicable

Sai,
In Preferences, click on Talend, and check that the Java Interpreter is corresponding to the right path.
MDOTSHADBA
Contributor III
Contributor III
Author

vgalopin,
After adding the Java.exe path from jdk on the Java Interpreter, I am getting similar set of errors ( i have attached screen shot )
On the execution run screen i am getting the following message.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
TalendString cannot be resolved
Anonymous
Not applicable

Hi
The dependency routines are missing, right click on the job name and select 'set up dependency routines' option to add the system routines.
Best regards
Shong
MDOTSHADBA
Contributor III
Contributor III
Author

Thank you Shong, The errors related to talendstring went away. I am getting the following errors now

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Type mismatch: cannot convert from SecretKey to KeySpec
skey cannot be resolved
SecretKeySpec cannot be resolved to a type
kgen cannot be resolved
keytScramble_1 cannot be resolved to a type
The constructor SecretKeySpec(char[], String) is undefined
Cipher cannot be resolved to a type
Cipher cannot be resolved
ALGORITHM cannot be resolved to a variable
Cipher cannot be resolved to a variable
valueToEnc cannot be resolved
BASE64Encoder cannot be resolved to a type
Void methods cannot return a value
Anonymous
Not applicable

Something is definitely wrong. All the encryption classes come from the jdk, the fact that your studio cannot find them, even though you have configured it to use the jdk is not normal.
Could you do this for me:
- Select the tScramble component in your design
- On the bottom left, click on the Code Viewer tab to show the code for the tScramble component
- Click on the Down Arrow next to it and make sure "All" is selected.
- Copy the code displayed and paste it here
It will help me understand why it's working for me and not for you.