Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error add excel file in metadata

Hi Everybody,
I have a problem when I add a new excel file in metaData talend.
I can finish the step 1 and 2, but when I arrive in step 3, in output, I Have this error:

 

Exception in thread "main" java.lang.Error: Unresolved compilation problem:

    at LocalProject.shadowfileinputtodelimitedoutput_0_1.ShadowFileInputToDelimitedOutput.main(ShadowFileInputToDelimitedOutput.java:2916)

Erreur de prévisualisation. Des paramètres doivent être modifiés`
Note : Les erreurs de prévisualisation sont généralement liées à un mauvais paramétrage de l'encodage.
org.talend.designer.runprocess.shadow.ShadowFilePreview.preview(ShadowFilePreview.java:90)
org.talend.metadata.managment.ui.utils.ShadowProcessHelper.getCsvArray(ShadowProcessHelper.java:383)
org.talend.repository.ui.wizards.metadata.connection.files.excel.ExcelFileStep2Form$PreviewProcessor.nonUIProcessInThread(ExcelFileStep2Form.java:1042)
org.talend.commons.ui.swt.thread.SWTUIThreadProcessor$1.run(SWTUIThreadProcessor.java:74)

 

I tried to unistall and install Java (I used jdk 1.8.0_172 and same  1.7 and 10.0.1)
I tried to add environment variables for JAVA_HOME, add -vm, change parameters for Installed JREs, delete and unzip my folder TOS DI (I tried with 6.5.1 and 7.0.1), change workspace emplacement, create a new workspace.
I tried to use many excel file obviously.

 

Somebody have an idea for resolved this problem ?

 

 

Thanks so mush,

 

BR Maxime

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I FIND THE SOLUTION, Oh my god, it's so stupid.

It's in my routines, I created an enumeration:

enum TypeDataSet {
File,
Database,
}

and in this configuration, when I wanted to create a metadata, I had the error but if I just add a "public" before my enumeration, it works correctly !!!

I do not know why my routines without the "public" keyword before my enumeration make a mistake when I wanted to create a metadata. If anyone has an idea, please tell me Smiley Wink

So, I found a solution for my problem, maybe create a ticket to talend on this error because it is not normal that talend has this reaction and displays this error which has nothing to do with the problem. ...

Thank you all for your help.

 

Maxime

View solution in original post

16 Replies
Jesperrekuh
Specialist
Specialist

You are probably using a custom encoding, which is not possible to use, check your settings in step2... try UTF-8... or something strange in the excel file is happening. Test a xls file with one record no formatting or pivot tables, a clean file.
Hint: Sometimes people rename a csv file into xls...
Anonymous
Not applicable
Author

Hi Dijke,
Thank for your answers.

I already do that, I tried all encodings is in Talend...

I tried to convert my xls file to csv and text, ( I created a new file) but
it's doesn't work.


Jesperrekuh
Specialist
Specialist

This sucks because I have no idea what else could be wrong.
Could you share the xls file? so I can try and see if it works?
Is it xls or xlsx? Just a sidenote did you know xlsx is a zip file, you could extract all sheets and workbook stuff as files... so in worst case you could read the extracted XML files.
manodwhb
Champion II
Champion II

@MaximeData, can you try to check Read excel2007 file format(xlsx) option in step 2 and if you still have issue let me know?

Anonymous
Not applicable
Author

@Dijke  Hi, I think the error don't come of the file because I tried with another file (empty) and I have the same error.

Anonymous
Not applicable
Author

@manodwhbIn step 2, I checked "Read excel2007", I can have a preview of the file, but when I go in step 3, I have the error.

manodwhb
Champion II
Champion II

@MaximeData,you can preview the file.if you still see that error means might be file has corrupted.

manodwhb
Champion II
Champion II

@MaximeData,can you check that required jars has installed to create metadata for excel?

Anonymous
Not applicable
Author

Hello,

What's OS version are you using? Is your java environment set correctly on your VM?

Talend is only supported on Java CPS Versions, not Java PSU. Have you tried to use jdk 1.8.0_171 to see if it works?

http://www.oracle.com/technetwork/java/javase/cpu-psu-explained-2331472.html

Best regards

Sabrina