function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jacksonp2008jacksonp2008 

Error generating the enterprise client jar

Following the excellent vid:  http://www.youtube.com/watch?v=tK2CiLb5vgc&feature=player_embedded

 

And these instructions for Java http://wiki.developerforce.com/page/Introduction_to_the_Force.com_Web_Services_Connector

 

I get this error...

 

C:\Documents and Settings\spollock\workspace>java -classpath wsc-18.jar com.sfor
ce.ws.tools.wsdlc enterprise.wsdl enterprise.jar
[WSC][wsdlc.run:311]Created temp dir: C:\DOCUME~1\spollock\LOCALS~1\Temp\wsdlc-t
emp-6823038187248261205-dir
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Parse error: e
nterprise.wsdl (The system cannot find the file specified)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:61)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:75)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:311)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:302)
Caused by: java.io.FileNotFoundException: enterprise.wsdl (The system cannot fin
d the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:58)
... 3 more

 

What step did I miss?

SebastianBraunSebastianBraun

Hi,

 

if the files wsc-18.jar and enterprise.wsdl are located in C:\Documents and Settings\spollock\workspace\ this call should work. I can't find any mistakes. Maybe you should check the wsdl filename for correct spelling. Otherwhise try it with the full qualified path.

 

Greetings

 

Sebastian

jacksonp2008jacksonp2008

thank-you Sebatian, 

 

I am getting closer it appears, downloaded 18 and 22.  Both give me different errors.  I am actually using jdk1.7, and there is no note on the site for 1.7  http://code.google.com/p/sfdc-wsc/downloads/list

 

Does it really matter which version you are using?

 

C:\Documents and Settings\spollock\workspace>java -classpath "C:\Documents and S
ettings\spollock\workspace"\wsc-18.jar com.sforce.ws.tools.wsdlc enterprise.wsdl
enterprise.jar
[WSC][wsdlc.run:311]Created temp dir: C:\DOCUME~1\spollock\LOCALS~1\Temp\wsdlc-t
emp-8739380879133121818-dir
[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 640 java files.
Exception in thread "main" java.io.FileNotFoundException: Unable to find file: c
om/sforce/ws/tools/aggregateResult.template
at com.sforce.ws.template.Template.createInputStream(Template.java:129)
at com.sforce.ws.template.Template.exec(Template.java:88)
at com.sforce.ws.tools.wsdlc.generateAggregateResult(wsdlc.java:151)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:85)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:311)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:302)

 

 

 

 

C:\Documents and Settings\spollock\workspace>java -classpath "C:\Documents and S
ettings\spollock\workspace"\wsc-22.jar com.sforce.ws.tools.wsdlc enterprise.wsdl
enterprise.jar
[WSC][wsdlc.run:312]Created temp dir: C:\DOCUME~1\spollock\LOCALS~1\Temp\wsdlc-t
emp-7135527212378308900-dir
[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 640 java files.
java.io.FileNotFoundException: C:\Program Files\Java\jre7\lib\tools.jar (The sys
tem cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.sforce.ws.tools.wsdlc$ToolsJarClassLoader.<init>(wsdlc.java:425)
at com.sforce.ws.tools.wsdlc$Compiler.findCompilerInToolsJar(wsdlc.java:
346)
at com.sforce.ws.tools.wsdlc$Compiler.<init>(wsdlc.java:334)
at com.sforce.ws.tools.wsdlc.compileTypes(wsdlc.java:261)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:88)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:312)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:303)
Error: Unable to find compiler. Make sure that tools.jar is in your classpath: j
ava.io.FileNotFoundException: C:\Program Files\Java\jre7\lib\tools.jar (The syst

 

Actually, tools.jar is in C:\Program Files\Java\jdk1.7.0_03\lib

 

SebastianBraunSebastianBraun

Actually i have not tried java 1.7 but this may probably the cause of your errors. Just try to copy the tools jar from \jdk1.7.0_03\lib to \jre7\lib. If This wont work, i would recommend you to download java6 if possible.

 

Greetings Sebastian

jacksonp2008jacksonp2008

Backed everything to 1.6, used 22 and it worked! -- many thanks

 

Only issue is that in the video he adds a user library for apache axis (which I don't seem to have) to get everything to compile.  This is not referenced in the documentation either so I am a bit confused on that point.

 

On another note, I see there is an IDE for eclipse.  if Install the IDE does it bypass the need to do all this?

DCHATDCHAT
Hi All,

I am also getting the below error while parsing enterprise.wsdl:

C:\Users\DEBALINA\Downloads>java -classpath wsc-22.jar com.sforce.ws.tools.wsdlc
 enterprise.wsdl enterprise.jar
[WSC][wsdlc.run:312]Created temp dir: C:\Users\DEBALINA\AppData\Local\Temp\wsdlc
-temp-1470701074209440915-dir
[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 592 java files.
java.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_31\lib\tools.jar (
The system cannot find the file specified)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at com.sforce.ws.tools.wsdlc$ToolsJarClassLoader.<init>(wsdlc.java:425)
        at com.sforce.ws.tools.wsdlc$Compiler.findCompilerInToolsJar(wsdlc.java:
346)
        at com.sforce.ws.tools.wsdlc$Compiler.<init>(wsdlc.java:334)
        at com.sforce.ws.tools.wsdlc.compileTypes(wsdlc.java:261)
        at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:88)
        at com.sforce.ws.tools.wsdlc.run(wsdlc.java:312)
        at com.sforce.ws.tools.wsdlc.main(wsdlc.java:303)
Error: Unable to find compiler. Make sure that tools.jar is in your classpath: j
ava.io.FileNotFoundException: C:\Program Files\Java\jre1.8.0_31\lib\tools.jar (T
he system cannot find the file specified)

The Java version is as below:
C:\Users\DEBALINA\Downloads>java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) Client VM (build 25.31-b07, mixed mode)

And the JAVA_HOME is as below:
C:\Users\DEBALINA>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_23

Can anyone tell me if the java version is creating the problem or not?