Running through the tutorial on the developer site gets me errors.

C:\Users\z\Downloads>java -classpath C:\Users\z\Downloads\force-wsc-
39.0.1.jar com.sforce.ws.tools.wsdlc C:\Users\z\Downloads\wsdl.jsp.xml C:\
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.STGroupDir
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 7 more

I've tried every trick I could find including putting the folder into the classpath. I'm not 100% sure I dled the enterprise wsdl correctly. when I click the generate link it opened as a new tab in chrome in which I save as wsdl.jsp.xml and renamed as wsdl.

Any tips or hints would be much appreciated. Thanks.

  • This is a Java library (JAR file) versioning problem where one class expects to find another class but can't. Check these Google results for a solution. – Keith C Mar 9 '17 at 18:11

figured it out. the issue was that I didn't get the uber.jar which is pretty confusing because I couldn't find it here

Ended up getting it from here. Works fine. http://central.maven.org/maven2/com/force/api/force-wsc/39.0.1/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.