You need to sign in to do that
Don't have an account?
Importing partner.wsdl using WSC
Hello,
I am trying to import the partner.wsdl in my java environment. I am using Mac OS X 10.10 and JDK 1.7 u60. I downloaded the WSC jar file from http://mvnrepository.com/artifact/com.force.api/force-wsc/33.0.3 and using it to import the wsdl file. The jar file, wsdl file are in the current directory.
When I execute the following command, I get a bunch of error messages.
java -classpath force-wsc-33.0.1.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4/STGroupDir
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
at java.lang.Class.getMethod0(Class.java:2813)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.STGroupDir
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
When I googled, they point to issues in classpath, but I have referenced to the right classpath in my environment variable.
<~/Downloads>echo ${CLASSPATH}
:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home:/Users/harish/Downloads:/Users/harish/Coding/JM
Could someone help me with this situation? Thanks.
-Harish
I am trying to import the partner.wsdl in my java environment. I am using Mac OS X 10.10 and JDK 1.7 u60. I downloaded the WSC jar file from http://mvnrepository.com/artifact/com.force.api/force-wsc/33.0.3 and using it to import the wsdl file. The jar file, wsdl file are in the current directory.
When I execute the following command, I get a bunch of error messages.
java -classpath force-wsc-33.0.1.jar com.sforce.ws.tools.wsdlc partner.wsdl partner.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/stringtemplate/v4/STGroupDir
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
at java.lang.Class.getMethod0(Class.java:2813)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.stringtemplate.v4.STGroupDir
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
When I googled, they point to issues in classpath, but I have referenced to the right classpath in my environment variable.
<~/Downloads>echo ${CLASSPATH}
:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home:/Users/harish/Downloads:/Users/harish/Coding/JM
Could someone help me with this situation? Thanks.
-Harish
https://code.google.com/p/sfdc-wsc/downloads/list
and followed jeff douglas' tutorial
http://blog.jeffdouglas.com/2010/05/17/java-command-line-app-using-the-salesforce-wsc/
and assuming your java command line is working properly then the line:
java -cp ....
should work since that's how I did it for a task I had.
Cyrus T
www.levementum.com
Does this mean the wsc jar file from http://mvnrepository.com/artifact/com.force.api/force-wsc/33.0.3 has some issue in executing? Which is the primary source of the wsc and is it okay to use older wsc.jar files for wsdl files belonging to latest api version (33.0)?