salesforce java api wsdl Exception in thread "main" org/stringtemplate/v4 /STGroupDir

Varun   Varun 1127 Views
While building enterprise wsdl with following command , folks who are new to salesforce java APIs get following error....reason being they forget including these jar files to class path ( "js-1.7R2.jar" and "ST-4.0.7.jar" ) . so what you need just download these files and include in your class path.

java -classpath force-wsc-33.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar ( gives error )


salesforce java api wsdl Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4 /STGroupDir
Keep all jar files into same folder where you have wsdl file and wsc jar.
 
java -classpath ./force-wsc-33.0.0.jar;./js-1.7R2.jar;./ST-4.0.7.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar

Download these jars from following location:
js-1.7R2.jar => http://mvnrepository.com/artifact/rhino

ST-4.0.7.jar => http://www.stringtemplate.org/download/