Could not find or load main class Error

One Star

Could not find or load main class Error

I am getting Error: Could not find or load main class, i after setting proper environment variables in ubuntu.
Can anyone help me to solve this error.Thanks in advance.
Moderator

Re: Could not find or load main class Error

Hi,
What's JDK version you are using? Please make sure that there is no extra space in your installation path.
More information will be helpful for us to address your issue quickly.
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: Could not find or load main class Error

Hi Sabrina,
    Thank you very much for replying.I have solved that query by reinstalling the Talend open studio.
I have one more question to ask, now I am creating custom components, in that the IDE not letting me to define the class and methods in .javajet files. its giving  Execution failed: Failed to generate code. I am not getting why it's not generating the code.Is there any specific approach to deal with class and methods?. 
Moderator

Re: Could not find or load main class Error

Hi,
Did you follow up KB article about:TalendHelpCenter:How to create a custom component to custom your component?
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: Could not find or load main class Error

Hi,
 Thanks a lot for the link u have given.
 I had followed the above link and i got information about a custom component.But i want to create a class inside begin.javajet file,i have been trying by using different techniques but getting -ve results.Even i want to write concrete method inside begin.javajet file that is also not happening.
  Can anyone suggest me how to write class or method inside begin.javajet file.   
Moderator

Re: Could not find or load main class Error

Hi,
What does your custom component look like?
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: Could not find or load main class Error

Hi all,
    I am working with netty in Talend, I have written my code in routine and I want to execute the code through tJava component.I even added netty-4.1.8-final.jar in a routine library. But I am not at able to execute the code.I am getting Exception in thread "main" java.lang.NoClassDefFoundError: io/netty/channel/nio/NioEventLoopGroup.
    Please! can anyone help me to solve this problem? Thanks a lot.
Thanks
Naveen
Moderator

Re: Could not find or load main class Error

Hi,
Would you mind posting your java code in tjava component on forum which will be helpful for us to address your issue?
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: Could not find or load main class Error

Hi Sabrina,
   In tJava Component I am creating an object of a class and then I want to access that class.
(Demo d=new Demo(localhost,8080,"request"); this is the code in tJava, and I have a method in a routine I want to access that method through this object.(d.method()); like this.But an interface called EventLoopGroup and class called NeoEventLoopGroup in Demo class is not executing, its throwing an exception(in an earlier post I had mentioned).
Thanks
Naveen
One Star

Re: Could not find or load main class Error

Hi all,
     I am working with netty in talend, I want to create a method inside custom component begin.javajet file, but i am not able to create a method inside the component file.
     Can anyone help to solve this problem. Thank you.
Naveen
One Star

Re: Could not find or load main class Error

Hi all,
    I am creating a custom component, in that I want a dropdown list dynamically.Which means I want data from XML file to be filled in a dropdown list.Is it possible in a custom component?
Thanks
Naveen
Moderator

Re: Could not find or load main class Error

Hi,
 I am creating a custom component, in that I want a dropdown list dynamically.Which means I want data from XML file to be filled in a dropdown list.Is it possible in a custom component?

For your dynamic dropdown list, could you please set an example for 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.
One Star

Re: Could not find or load main class Error

Hi xdshi,
     Ex: I have a file called demo.xml, in that I am having data like <row1>Naveen</row1><row2>ABC</row2><row3>CBA</row3>.
I want all data (Naveen, ABC, CBA) dynamically in my dropdown list in a custom component. Is this possible in Talend.If possible what code should I write in component name_java.xml in a custom component?
Thanks
Naveen.
Moderator

Re: Could not find or load main class Error

Hi,
We don't have such a dynamic dropdown list feature before. Usually, we use tcontextload or implicit tcontextload in talend to modifie dynamically the values of the active context. We will make an investigation on your issue and 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.
One Star

Re: Could not find or load main class Error

Hi xdshi,
        Thank you very much for your concern.

Thanks
Naveen