One Star

java.lang.NoClassDefFoundError

Hello ,
Im working with talend for more than a month . i dont know why the following java error occurs suddenly while running a job .
before this i didn't changed anything in talend or in job . executed the job as daily but suddenly i got this error .
can any one help me for this issue .
java.lang.NoClassDefFoundError: infobuilder/report_and_mail_0_1/Report_And_Mail
Caused by: java.lang.ClassNotFoundException: infobuilder.report_and_mail_0_1.Report_And_Mail
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: infobuilder.report_and_mail_0_1.Report_And_Mail. Program will exit.
Exception in thread "main"
Thanks in Advance
Nilesh

29 REPLIES
Community Manager

Re: java.lang.NoClassDefFoundError

Hi Nilesh
The problem is that some of jars are missing, so please check what you have done maybe remove the files. Do you get the same problem when executing other jobs? Do you execute the job in studio or out of studio?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: java.lang.NoClassDefFoundError

i have checked with some other jobs . that too showing the same type of error
Im executing the job inside talend open studio as same i did before .
One Star

Re: java.lang.NoClassDefFoundError

can anyone help me to overcome this issue asap .
One Star

Re: java.lang.NoClassDefFoundError

still im getting the same error while executing a simple job
java.lang.NoClassDefFoundError: infobuilder/check_0_1/check
Caused by: java.lang.ClassNotFoundException: infobuilder.check_0_1.check
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: infobuilder.check_0_1.check. Program will exit.
Exception in thread "main"
can anyone help me .
Community Manager

Re: java.lang.NoClassDefFoundError

Hi
Which OS? Can you show us the installation path?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: java.lang.NoClassDefFoundError

im working in "windows 2003 server"
and this is the path which i installed "D:\TOS-All-r50363-V4.1.1\TOS-All-r50363-V4.1.1"
im working with the same background from last 3 months suddenly i got such error
One Star

Re: java.lang.NoClassDefFoundError

Hi Nilesh,
Have u added any new classpath variables in the environment variables or the classpath is set?. This error may some times come because of this
One Star

Re: java.lang.NoClassDefFoundError

nothing i did .. i was working asusual suddenly this error occured .
Community Manager

Re: java.lang.NoClassDefFoundError

Hi
Ok, can you please install a new studio into another folder? and then create a simple a job and test whether the problem still exists, if not, we will migrate all the jobs from old studio to the new one.
Note that: don't remove the old studio before you backup the projects.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: java.lang.NoClassDefFoundError

i have installed talend open studio in a other folder and checked with a simple job now its working fine .
how can i migrate all jobs from old project to this new one?
Community Manager

Re: java.lang.NoClassDefFoundError

Hi
Please follows the steps to migrate all items from old studio to new studio:
1. Empty Recycle bin in old studio.
2. Right click on Job design in old studio and select 'export item' option.
3. Select 'Select archive file' option and browse a archive file path, click on 'Select All' button.
4. Backup the export archive file.
5. Open the new studio, right click on the Job Design and select 'import items' option, and then import all the items from the archive file.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: java.lang.NoClassDefFoundError

thanks for ur help . it works
Community Manager

Re: java.lang.NoClassDefFoundError

Hi
Good news! Thanks for your feedback!
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: java.lang.NoClassDefFoundError

hi ,
I got "java.lang.ClassNotFoundException" error after that i changed the talend path to another drive then started working normally but now again im getting the same error in this path also .
java.lang.NoClassDefFoundError: infobuilder/eventtrigger_sendmail_0_1/eventtrigger_sendmail
Caused by: java.lang.ClassNotFoundException: infobuilder.eventtrigger_sendmail_0_1.eventtrigger_sendmail
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: infobuilder.eventtrigger_sendmail_0_1.eventtrigger_sendmail. Program will exit.
Exception in thread "main"
can anyone help me how this error occurs and how can i solve it ?
With Regards ,
Nilesh R
One Star

Re: java.lang.NoClassDefFoundError

If re-importing doesn't work, can I see a screenshot of your job? I had this issue, and it wasn't anything that I could find on the forums but a weird error with how the components were laid out.
Here is my post where I had the same issue: http://www.talendforge.org/forum/viewtopic.php?id=16836
One Star

Re: java.lang.NoClassDefFoundError

thanks for ur valuable reply . i changed the path of environmental variables and now it works .
One Star

Re: java.lang.NoClassDefFoundError

I have the same issue. What environment variable have you changed the value?
One Star

Re: java.lang.NoClassDefFoundError

Hi SHong,
I have same problem..in my case for new installation and new job also am getting the same issue.
please help me.
Four Stars

Re: java.lang.NoClassDefFoundError

I had the same problem, and it was solved by removing the spaces in the path.
My project directory (path) had a space. Remove any space in all Talend path.
This one works C:\Talend\TalendWorkspace, this C:\Dev\Talend Workspace doesn't!
Moderator

Re: java.lang.NoClassDefFoundError

Hi Praveen Kumar Konda,
@fatemeh.behfa, thanks for sharing your experience with us. It is very helpful. Make sure there is no extra space and special characters(Illegal character) in your installation path and set the java environment correctly.
If someone still have the same problem even though you have re-installed product into a short path without special characters, please provide the details, such as product version? Your system? JDK version?
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.
One Star

Re: java.lang.NoClassDefFoundError

I am facing something similar.
What i am trying to do here is invoke a service in one of the job. My executions stops at that particular job and i get this
Exception in thread "Thread-2" java.lang.Error: java.lang.Error: java.lang.NoClassDefFoundError: com/stigma/pollen/wsclient/patientclient.
Can any one help me.
Thanks
One Star

Re: java.lang.NoClassDefFoundError

I am able to run a job successfully from the studio directly.
When I export the same item and create a new job design, to create a test version of the working job, It throws the below error
java.lang.NoClassDefFoundError
can anyone please help?
Moderator

Re: java.lang.NoClassDefFoundError

Hi GeethaSukumar,
When I export the same item and create a new job design, to create a test version of the working job, It throws the below error
java.lang.NoClassDefFoundError

How do you create a test version? Import the exported one?or drag the same component by manual?
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.
One Star

Re: java.lang.NoClassDefFoundError

I was getting this type of error when the order of columns in the original query was different than in the schema after.
Also, I was able to solve this error by copy hole project into another folder and then re-importing a project again.
One Star

Re: java.lang.NoClassDefFoundError

I have created a Talend job using 5.5.1 version and it is working fine in Talend studio, but when running it as a jar in server, the below exception occurs. Can you please help me in resolving this. I have used toracleconnection,toracleinput, tmap,tjasperoutput for this job.
11 Sep 2015 08:52:17 CDT at com.chartis.clp.talend.TalendJobWrapper.executeJob(TalendJobWrapper.java:97)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.talend.TalendJobWrapper.executeJob(TalendJobWrapper.java:79)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.dm.om.report.controller.TransactionReconcilationOMControllerImpl.generateReport(TransactionReconcilationOMControllerImpl.java:190)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.dm.om.report.bpo.ReportsOMBPO.generateTransactionReconcilation(ReportsOMBPO.java:151)
11 Sep 2015 08:52:17 CDT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11 Sep 2015 08:52:17 CDT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11 Sep 2015 08:52:17 CDT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11 Sep 2015 08:52:17 CDT at java.lang.reflect.Method.invoke(Method.java:597)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.core.base.Base.invokeDla(Base.java:95)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.core.base.Base.executeDla(Base.java:61)
11 Sep 2015 08:52:17 CDT at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
11 Sep 2015 08:52:17 CDT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11 Sep 2015 08:52:17 CDT at java.lang.reflect.Method.invoke(Method.java:597)
11 Sep 2015 08:52:17 CDT at aiu.core.component.ApplicationHome.processRequest(ApplicationHome.java:489)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.core.bpo.ApplicationHomeHelper.processRequest(ApplicationHomeHelper.java:390)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.core.bpo.ApplicationHomeHelper.processRequestEx(ApplicationHomeHelper.java:258)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.batch.job.TransactionReconcilationReportJob.invoke(TransactionReconcilationReportJob.java:263)
11 Sep 2015 08:52:17 CDT at com.chartis.is.util.ibm.WorkCreator.run(WorkCreator.java:50)
11 Sep 2015 08:52:17 CDT at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:269)
11 Sep 2015 08:52:17 CDT at java.security.AccessController.doPrivileged(Native Method)
11 Sep 2015 08:52:17 CDT at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:769)
11 Sep 2015 08:52:17 CDT at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
11 Sep 2015 08:52:17 CDT at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:159)
11 Sep 2015 08:52:17 CDT at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
11 Sep 2015 08:52:17 CDT Caused by: java.lang.reflect.InvocationTargetException
11 Sep 2015 08:52:17 CDT at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11 Sep 2015 08:52:17 CDT at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11 Sep 2015 08:52:17 CDT at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11 Sep 2015 08:52:17 CDT at java.lang.reflect.Method.invoke(Method.java:597)
11 Sep 2015 08:52:17 CDT at com.chartis.clp.talend.TalendJobWrapper.executeJob(TalendJobWrapper.java:90)
11 Sep 2015 08:52:17 CDT ... 23 more
11 Sep 2015 08:52:17 CDT Caused by: java.lang.NoClassDefFoundError: com/talend/csv/CSVWriter
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.tOracleInput_1Process(UITRD.java:7343)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.tJava_7Process(UITRD.java:5804)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.CentralLoggerJoblet_1_tFixedFlowInput_7Process(UITRD.java:5539)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.CentralLoggerJoblet_1_tJava_6Process(UITRD.java:4791)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.CentralLoggerJoblet_1_tOracleInput_1Process(UITRD.java:4646)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.CentralLoggerJoblet_1_tOracleConnection_1Process(UITRD.java:4227)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.CentralLoggerJoblet_1_tJava_7Process(UITRD.java:4074)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.tJava_1Process(UITRD.java:3973)
11 Sep 2015 08:52:17 CDT at uitrd_om_report.uitrd_0_1.UITRD.runJobInTOS(UITRD.java:18124)
Moderator

Re: java.lang.NoClassDefFoundError

Hi prkasire,
Caused by: java.lang.NoClassDefFoundError: com/talend/csv/CSVWriter

The problem is that some of jars are missing. Do you use Talend ESB product and deploy your job (jar file, OSGI Bundle) on Talend Runtime?
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.
One Star

Re: java.lang.NoClassDefFoundError

Hi I am getting this below error while running the job. My intension is , I have to load log file of talend job to kafka. by using the kafkaAppender. but i am getting below error.
Please find the below kafka appender :


        




log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassNotF oundException: kafka.producer.KafkaLog4jAppender       at java.net.URLClassLoader$1.run(Unknown Source)
One Star

Re: java.lang.NoClassDefFoundError

When I run sample tJava component in Talend BigData Open Studio, I got this error can any one tell me the solution


java.lang.NoClassDefFoundError: Integer

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.privateGetMethodRecursive(Unknown Source)

at java.lang.Class.getMethod0(Unknown Source)

at java.lang.Class.getMethod(Unknown Source)

at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)

at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Caused by: java.lang.ClassNotFoundException: Integer

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)

... 7 more

Error: A JNI error has occurred, please check your installation and try again

Exception in thread "main"
Moderator

Re: java.lang.NoClassDefFoundError

Hi masthansk524,
 Have you ever successfully execute a job in your Talend BigData Open Studio? What's your JDK version? Are you using JDK 1.8?
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.