Error on preview when loading excel file

Six Stars

Error on preview when loading excel file

I've tried differents enconding, still the same error.

 

Here's the log:

 

object is not an instance of declaring class
Preview error. Some settings must be changed.
Note: Preview errors are generally due to a wrong encoding setting.
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:461)
org.talend.designer.codegen.config.TalendJetEmitter.generate(TalendJetEmitter.java:684)
org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:441)
org.eclipse.emf.codegen.jet.JETEmitter.generate(JETEmitter.java:432)
org.talend.designer.codegen.proxy.JetProxy.generate(JetProxy.java:54)
org.talend.designer.codegen.CodeGenerator.instantiateJetProxy(CodeGenerator.java:444)
org.talend.designer.codegen.CodeGenerator.generateContextCode(CodeGenerator.java:361)
org.talend.designer.core.runprocess.Processor.updateContextCode(Processor.java:637)
org.talend.designer.runprocess.java.JavaProcessor.generateContextCode(JavaProcessor.java:1585)
org.talend.designer.runprocess.ProcessorUtilities.generateContextInfo(ProcessorUtilities.java:693)
org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:929)
org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:741)
org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1463)
org.talend.designer.runprocess.ProcessorUtilities.generateCode(ProcessorUtilities.java:1432)
org.talend.designer.core.runprocess.Processor.run(Processor.java:178)
org.talend.designer.runprocess.java.AbstractJavaProcessor.run(AbstractJavaProcessor.java:272)
org.talend.designer.core.runprocess.Processor.run(Processor.java:136)
org.talend.designer.runprocess.shadow.ShadowProcess.runWithErrorOutputAsException(ShadowProcess.java:371)
org.talend.designer.runprocess.shadow.ShadowFilePreview.preview(ShadowFilePreview.java:86)
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)

Accepted Solutions
Six Stars

Re: Error on preview when loading excel file

I fixed by changing my .ini settings in the talend folder to:

 

-vmargs
-Xms512m
-Xmx1536m
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication


All Replies
Six Stars

Re: Error on preview when loading excel file

I fixed by changing my .ini settings in the talend folder to:

 

-vmargs
-Xms512m
-Xmx1536m
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication

Moderator

Re: Error on preview when loading excel file

Hello,

Great it is fixed. Thanks for sharing it with us.

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

Re: Error on preview when loading excel file

I had the same error, but my talend*.ini file looks exactly as your updated config..

 

-vmargs
-Xms512m
-Xmx1536m
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication

 

Any idea? My version is 7.0.1

 

 

Moderator

Re: Error on preview when loading excel file

Hello,

Does this issue repro on all your excel files or a specific one? For v6 of Talend products JDKv1.8 is required instead of JRE.

Please try to add -vm path to java bin in the .ini file(example: Talend-Studio-win-x86_64.ini)

Example:

-vm C:\Program Files\Java\jdk1.8.0_65 \bin

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

Re: Error on preview when loading excel file

I tried with 2 Excel files. They contained same format. Let me update my Java and also the ini.

Will update again.
Four Stars

Re: Error on preview when loading excel file

Xdshi

 

I updated my system with a JDK and updated the ini file:

 

-vmargs
-Xms512m
-Xmx1536m
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-vm C:\Program Files\Java\jdk1.8.0_181\bin

 

However, I am still running into the same issue.

 

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
 at chap_1.shadowfileinputtodelimitedoutput_0_1.ShadowFileInputToDelimitedOutput.main(ShadowFileInputToDelimitedOutput.java:1276)
Preview error. Some settings must be changed.
Note: Preview errors are generally due to a wrong encoding setting.
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)
Four Stars

Re: Error on preview when loading excel file

Hi 

 

Any ideas how I can trace this issue? I installed Talend in another laptop and it worked. However I need it fo work on my main laptop. I tried using a CSV file and also had the same error.

Moderator

Re: Error on preview when loading excel file

Hello,

What's OS are you using? Have you tried to re-install V 7.0.1 on your laptop to see if it works?

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

Re: Error on preview when loading excel file

Hi Sabrina

 

I am running Talend Open Studio in Windows 10 Pro 64 bit. I have reinstalled and the outcome is the same. I know it worked on another laptop but I need to make it work on the current laptop. Also, I need to know how to troubleshoot such issues.

Four Stars

Re: Error on preview when loading excel file

Hi Sabrina

 

I am running Talend Open Studio in Windows 10 Pro 64 bit. I have reinstalled and the outcome is the same. I know it worked on another laptop but I need to make it work on the current laptop. Also, I need to know how to troubleshoot such issues.

 

Thank you in advance.

Four Stars

Re: Error on preview when loading excel file


@xdshi wrote:

Hello,

What's OS are you using? Have you tried to re-install V 7.0.1 on your laptop to see if it works?

Best regards

Sabrina



Hi Sabrina

 

I am running Talend Open Studio in Windows 10 Pro 64 bit. I have reinstalled and the outcome is the same. I know it worked on another laptop but I need to make it work on the current laptop. Also, I need to know how to troubleshoot such issues.

 

Thank you in advance.

Moderator

Re: Error on preview when loading excel file

Hello,

We cannot repro this issue on Window 10, V 7.0.1 from our side. Could you please check the java version by typing : java - version in cmd to make sure your java environment is set correctly?

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

Re: Error on preview when loading excel file

Sabrina

 

It turned out that the environment variable is not set correctly. I don't think JDK or JRE mattered.

 

 

Moderator

Re: Error on preview when loading excel file

Hello,

For v6 of Talend products JDKv1.8 is required instead of JRE. If that requirement is met, ensure JDK bin is included in your PATH environment variable and is being reached.

Note:You have to install corresponding JDK, install 64bit JDK on 64bit system.

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.