Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm encountering an error when executing a small job in Talend Open Studio for ESB:
Error: Could not find or load main class miscellaneous.standing_orders_0_1.STANDING_ORDERS
Some points that might help shed some light:
- This error is only encountered when executing the job in TOS ESB.
- I am unable to build a Standalone Job job. It appears to complete successfully but no zip file is produced and no error is shown. Building to an OSGI Bundle produces a file.
- The TOS ESB directory has no spaces: C:/TESB/
- My workspace is on a mapped network drive, however this also has no spaces in the name (and never caused problems with TOS ESB 5.6).
- I am using the Java 1.7 JDK
Any help would be greatly appreciated.
Thanks,
Jay
Hi,
I am also facing this error. " Could not find or load main class". Tried with environment variable setting given in this thread but no luck. Is it product bug or is there any simple fix for this issue. I am able to run the job from talend studio but when run its .bat file after building job getting this error. Using talend Version: 7.1.1 and jdk-11.0.2. Any help would be appreciated.
Hello@tariq4you
So far, we are not targeting JDK 11. What dependencies you have that requires JRE11?
Please refer to this online installation guide about:TalendHelpCenter:Compatible Java Environments .
Best regards
Sabrina
Hi,
I tried with JDK 8 also but it did not work. I tried with these version of Java but no luck :
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_201
JAVA_HOME = C:\Program Files\Java\jdk-11.0.2
JAVA_HOME = C:\Program Files\Java\jre1.8.0_181
I am using windows 10 and job is running in studio perfectly but not from .bat file. Can you please give me clear instruction what to install and what environment variable should i set. If possible download link of java to avoid any version issue. Here is output of command line.
C:\Tariq Folder\Talend POC\Salesforce_CSV_Load_0.1\Salesforce_CSV_Load>java -Dtalend.component.manager.m2.repository=C:\Tariq Folder\Talend POC\Salesforce_CSV_Load_0.1\Salesforce_CSV_Load/../lib -Xms256M -Xmx1024M -cp .;../lib/routines.jar;../lib/slf4j-log4j12-1.7.2.jar;../lib/ST4-4.0.7.jar;../lib/annotation-2.4.0.jar;../lib/antlr-2.7.7.jar;../lib/antlr-runtime-3.5.jar;../lib/antlr4-runtime-4.6.jar;../lib/auto-common-0.3.jar;../lib/auto-service-1.0-rc2.jar;../lib/avro-1.8.1.jar;../lib/commons-beanutils-1.8.3.jar;../lib/commons-codec-1.10.jar;../lib/commons-collections-3.2.2.jar;../lib/commons-compress-1.8.1.jar;../lib/commons-lang3-3.7.jar;../lib/commons-logging-1.2.jar;../lib/components-api-0.25.3.jar;../lib/components-common-0.25.3.jar;../lib/components-common-oauth-0.25.3.jar;../lib/components-salesforce-definition-0.25.3.jar;../lib/components-salesforce-runtime-0.25.3.jar;../lib/daikon-0.27.0.jar;../lib/dom4j-1.6.1.jar;../lib/force-partner-api-44.0.0.jar;../lib/force-wsc-44.0.0.jar;../lib/guava-20.0.jar;../lib/httpclient-4.5.5.jar;../lib/httpcore-4.4.9.jar;../lib/jackson-annotations-2.9.0.jar;../lib/jackson-core-2.9.5.jar;../lib/jackson-core-asl-1.9.14-TALEND.jar;../lib/jackson-databind-2.9.5.jar;../lib/jackson-mapper-asl-1.9.14-TALEND.jar;../lib/javacsv-2.0.jar;../lib/javax.inject-1.jar;../lib/javax.servlet-api-3.1.0.jar;../lib/jcl-over-slf4j-1.7.25.jar;../lib/joda-time-2.8.2.jar;../lib/json-20140107.jar;../lib/json-io-4.9.9-TALEND.jar;../lib/log4j-1.2.17.jar;../lib/org.apache.oltu.oauth2.client-1.0.0.jar;../lib/org.apache.oltu.oauth2.common-1.0.0.jar;../lib/paranamer-2.7.jar;../lib/pax-url-aether-2.4.7.jar;../lib/slf4j-api-1.7.25.jar;../lib/snappy-java-1.1.1.3.jar;../lib/stringtemplate-3.2.1.jar;../lib/talend-codegen-utils.jar;../lib/talendcsv.jar;../lib/xz-1.5.jar;salesforce_csv_load_0_1.jar; local_project.salesforce_csv_load_0_1.Salesforce_CSV_Load
Error: Could not find or load main class Folder\Talend
Hello,
Before building your Job, could you please go to Window > Preferences, select Talend > Import/Export, and then select the Add classpath jar in exported jobs check box to wrap the Jars in a classpath.jar file added to the built Job?
Let us know if it is OK with you.
Best regards
Sabrina
Thank you for reply. I tried your suggestion but i got the same error however it wrapped up jar files. Can you please share environment variable setting which works for batch file running. Looks like this is a product issue.