• Subin009
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
Hi Lately I am getting Expecting '}' but was: 'for' while saving for loop in apex.

Even a simple for loop counter is not working..Experiencing this today.

Please asssit.
Thanks
Subin Babu
Please see the code

public with sharing class sharedLocStockAdjust {
    for(Schema.Location temp : [select Id,Name from Location where LocationType='Van'])
    {
    }
}
While running the batch Apex I got this error "Apex heap size too large: 12239748"
Hi Lately I am getting Expecting '}' but was: 'for' while saving for loop in apex.

Even a simple for loop counter is not working..Experiencing this today.

Please asssit.
Thanks
Subin Babu
Please see the code

public with sharing class sharedLocStockAdjust {
    for(Schema.Location temp : [select Id,Name from Location where LocationType='Van'])
    {
    }
}
While running the batch Apex I got this error "Apex heap size too large: 12239748"

I am having the enterprise.wsdl file and i am trying to create a jar file using command 

 

java -classpath wsc-20.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar

 

but getting an error "Error: Unable to find compiler. Make sure that tools.jar is in your classpath:

java.lang.ClassNotFoundException: com/sun/tools/javac/Main.class"

 

can anyone help me..............

 

thank you.......................

I keep getting this error when compiling my wsdl with wsc?

 

Java version:

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

 

[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 363 java files.
java.io.FileNotFoundException: C:\Program Files\Java\jre6\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.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\jre6\lib\tools.jar (The syst
em cannot find the file specified)