Metadata Preview problem : java.lang.NoClassDefFoundError

One Star

Metadata Preview problem : java.lang.NoClassDefFoundError

Hi,
Anyone seen the following problem?:
- Project using Java Generation (not seen in Perl)
- Open Studio 4.0.2 and 4.1.0
- Seen when generating File Delimited Metadata Preview for an ordinary .csv file: Get error below.
- I can see main in ala_test/shadowfileinputtodelimitedoutput_0_1/ShadowFileInputToDelimitedOutput.java
I'm a newby, so I expect that I've done something stupid. Help is appreciated.
Thanks,
Diarmuid
Error code in preview window:
java.lang.NoClassDefFoundError: ala_test/shadowfileinputtodelimitedoutput_0_1/ShadowFileInputToDelimitedOutput
Caused by: java.lang.ClassNotFoundException: ala_test.shadowfileinputtodelimitedoutput_0_1.ShadowFileInputToDelimitedOutput
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: ala_test.shadowfileinputtodelimitedoutput_0_1.ShadowFileInputToDelimitedOutput. Program will exit.
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(Unknown Source)
org.talend.repository.ui.utils.ShadowProcessHelper.getCsvArray(Unknown Source)
org.talend.repository.ui.wizards.metadata.connection.files.delimited.DelimitedFileStep2Form$PreviewProcessor.nonUIProcessInThread(Unknown Source)
org.talend.commons.ui.swt.thread.SWTUIThreadProcessor$1.run(Unknown Source)
One Star

Re: Metadata Preview problem : java.lang.NoClassDefFoundError

Fixed!
It seems that the Talend Open Studio installation fails silently when done on a path containing a space. Fair enough, you Unix-heads say, but Windows encourages applications to be installed to 'Program Files'.
Specifically, the Workspace is not set up correctly with only 1 sub-directory structure created (.JETEmitters). .Java, .metadata, and the project specific directories are not created.
Solution: Un-Install & re-install to somewhere other then 'Program Files'.
D.

Re: Metadata Preview problem : java.lang.NoClassDefFoundError

but you also have to ensure that your workspace is in the local disk when using windows
see
http://www.talendforge.org/forum/viewtopic.php?pid=61046
One Star

Re: Metadata Preview problem : java.lang.NoClassDefFoundError

Hi,
I have the exact same problem. I made sure that my workspace, JDK, Open Studio, everything is on C: drive and none of these have a space in their path.
I have JDK 1.7 installed and Open Studio TOS_DI-20150702_1326-V6.0.0.
Can you please help me here?
Regards,
Mehul
Community Manager

Re: Metadata Preview problem : java.lang.NoClassDefFoundError

Hi Mehul 
Are you on a 32-bit or 64-bit machine? Make sure you have installed the correct JDK version for your operating system. 
Do you have any error messages generated in the log file which is located in <talend studio install dir>/workspace/.metadata/?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Metadata Preview problem : java.lang.NoClassDefFoundError

Hi Shong,
Thank you for your quick response.
I'm on 64bit machine. I've installed JDK jdk-7u79-windows-x64 on my C:\Dev_Exp\ folder.
This is the JDK I'm referring to in my Open Studio, the same is set as JAVA_HOME and added to PATH variable.
I could find a log file created in my workspace/.metadata. I've attached the same to this thread.
Regards,
Mehul
.log.log
One Star

Re: Metadata Preview problem : java.lang.NoClassDefFoundError

I have the same problem. My environment is Windows 7 64 bit ,  java 1.8 and Talend Open Studio for Data Integration 6.0.
Here is my error message
??: ???????????? b.shadowfileinputtodelimitedoutput_0_1.ShadowFileInputToDelimitedOutput
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.positional.FileStep2Form$PreviewProcessor.nonUIProcessInThread(FileStep2Form.java:506)
org.talend.commons.ui.swt.thread.SWTUIThreadProcessor$1.run(SWTUIThreadProcessor.java:74)