Error add excel file in metadata

Five Stars

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


Accepted Solutions
Five Stars

Re: Error add excel file in metadata

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


All Replies
Ten Stars

Re: Error add excel file in metadata

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...
Five Stars

Re: Error add excel file in metadata

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.


Ten Stars

Re: Error add excel file in metadata

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.
Thirteen Stars

Re: Error add excel file in metadata

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

Manohar B
Five Stars

Re: Error add excel file in metadata

@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.

Five Stars

Re: Error add excel file in metadata

@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.

Thirteen Stars

Re: Error add excel file in metadata

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

Manohar B
Thirteen Stars

Re: Error add excel file in metadata

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

Manohar B
Moderator

Re: Error add excel file in metadata

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

--
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: Error add excel file in metadata

Hello,

Thanks for your answers,

I'm Work on windows 10, and java version is allready in jdk1.8.0_171.

But, maybe I finded a solution of contournement; If I create a new projet in same workSpace and I import all elements to my old projet in this new, Now I can create new excel File in metadata.

It's possible to hace a parameter in project who can create this error ?

 

BR
Maxime

Five Stars

Re: Error add excel file in metadata

Somebody have an idea of parameters in projet who created the error ?

Maxime

Ten Stars

Re: Error add excel file in metadata

Cant imagine its a parameter, somebody from Talend should help you out on this.
One thing is your JAVA_HOME and Talend (window>preferences) pointing to a JDK and not to an installed JRE ?
Five Stars

Re: Error add excel file in metadata

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

Ten Stars

Re: Error add excel file in metadata

This made me laugh, but is also frustrating, glad you fixed it and shared the cause of the error.
@xdshi maybe you could elaborate on this?
Moderator

Re: Error add excel file in metadata

Hello,

I never met this issue before. An error in user routines cause error when adding excel file in metadata. We will make an investigation on this issue and then come back to you as soon as we can.

 

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: Error add excel file in metadata

Hello @xdshi,


I would like to give you a present.

This is a very simple projet whit the error.
In the projet, he have just a routine with enum "CreateBugMetadata".
Now,  if you would like to created metadata with a new Excel file or delimited file,  you have the error.

I hope can help you.

Maxime