Salesforce Offline Symbol Table Problem

Issue #574 resolved
Nuri Atik created an issue

Hi, I have an error when creating a Salesforce project. The screenshot of error and log file attached. Thanks.

Comments (16)

  1. Scott Wells repo owner

    Hi, Nuri. I'm seeing something very strange in the logs. I'm seeing things like:

    java.lang.IllegalArgumentException: No enum constant com.illuminatedcloud.symtab.ApexDataType.STRÝNG
        at java.lang.Enum.valueOf(
        at com.illuminatedcloud.symtab.ApexDataType.valueOf(SourceFile:13)
        at com.illuminatedcloud.intellij.psi.impl.ApexTypeMixin$1.compute(SourceFile:105)


    java.lang.IllegalArgumentException: No enum constant com.illuminatedcloud.symtab.ApexDataType.ÝNTEGER
        at java.lang.Enum.valueOf(
        at com.illuminatedcloud.symtab.ApexDataType.valueOf(SourceFile:13)
        at com.illuminatedcloud.intellij.psi.impl.ApexTypeMixin$1.compute(SourceFile:105)

    Notice the special character being used instead of "I". Can you provide an example of the source code that's doing this?

  2. Nuri Atik reporter

    2017-03-20 15:28:49,922 [ 6312] ERROR - napi.project.CacheUpdateRunner - Error while indexing ..............................\src\classes\XtHelperComponent.cls To reindex this file IDEA has to be restarted java.lang.IllegalArgumentException: No enum constant com.illuminatedcloud.symtab.ApexDataType.STRİNG

    public class XtHelperComponent {
        public Decimal inputDecimal {get; set;}
        public String formattedText;
        public String formatLocale {get; set;}
        public static String doFormatting(Decimal val, integer dec, String tSep, String dSep) {
            String s, tmp;
            Integer i = 4 + dec;
            // If the number of decimals is zero (0)... prevents the first 1000s seperator from being set at the 4th.
            s = val.setScale(dec).toPlainString().replace(tSep, dSep);
            while(s.length() > i) {
                tmp = s.substring(0, s.length() - i) + tSep + s.substring(s.length() - i);
                s = tmp;
                i += 4;
            // If the number is negative and has a number non-decimal digits divisible by 3, it prevents putting a comma before the 1st digit (ex -300,000.00  comes out -,300,000.00)
            if (s.substring(0,1) == '-') {
                if (s.substring(1,2) == tSep) {
                    s = '-' + s.substring(2);
            return s;
        public static String doFormattingLang(Decimal value, String locale) {
            if(value == null || locale == null) {
                return '0.00';
            System.debug('Helper value: ' + value);
            System.debug('Helper locale: ' + locale);
            String returnValue = '';
            if(locale == 'en') {
                returnValue = doFormatting(value, 2, ',', '.');
            } else if(locale == 'tr') {
                returnValue =  doFormatting(value, 2, '.', ',');
            return returnValue;
        public String getFormattedText() {
            return doFormattingLang(inputDecimal, formatLocale);
  3. Scott Wells repo owner

    Thanks. Is it possible that there are special characters in this source, in particular in String and Integer? Based on the comment above doFormatting(), it looks like you may have grabbed this from an external location.

  4. Nuri Atik reporter

    No, I don't think so. I can use this code on my other computer (Win7 and same Intellij, illuminated Cloud version). However when I try to use this computer(Win 10), I get this error.

  5. Scott Wells repo owner

    Okay. How are you sharing the source between the two environments? Using version control? deploy/retrieve? other?

  6. Scott Wells repo owner

    Okay. Scanning your older logs, I'm seeing this issue cropping up in several other areas, e.g.:

    2017-03-20 14:34:51,858 [   2817]   WARN - .intellij.psi.util.ApexPsiUtil - Failed to find a token for FÝRST in class + com.illuminatedcloud.intellij.psi.ApexTypes 
    java.lang.NoSuchFieldException: FÝRST


    2017-03-20 14:34:51,859 [   2818]   WARN - .intellij.psi.util.ApexPsiUtil - Failed to find a token for EXCEPTÝON in class + com.illuminatedcloud.intellij.psi.ApexTypes 
    java.lang.NoSuchFieldException: EXCEPTÝON
        at java.lang.Class.getDeclaredField(
        at com.illuminatedcloud.intellij.psi.util.ApexPsiUtil.getSupportedElementTypes(SourceFile:158)
        at com.illuminatedcloud.intellij.usages.ApexFindUsagesProvider.<clinit>(SourceFile:31)

    I've never seen this type of behavior before, and since the same source seems to be working fine on another install, my only guess is that something is wrong with the installation on your Windows 10 machine. I hate to ask this, but would you mind reinstalling both IntelliJ and Illuminated Cloud to see if the same problem persists? If it does, I think we'll need to look at whether something is happening during the retrieval such as an improper character encoding (it should be using UTF-8 across the board).

  7. Nuri Atik reporter

    Today I uninstall intellij and illuminated cloud and reinstall them again nearly 8-9 times. I tried both intellij community version and enterprise version. In the end I got same result.

  8. Scott Wells repo owner

    Okay. This is definitely a bizarre one. I think next step will be to try to isolate the source of the issue. Can you zip up your metadata on the machine that works and bring it to the one that doesn't to see if that resolves the issue? If it does, it'll mean that the metadata is being corrupted during the retrieval in which case I'll need to dig into that aspect. Really sorry this is happening! We'll figure it out, though...

  9. Scott Wells repo owner

    Looking at those logs again, pretty much every I has been turned into Ý from the standard classes. That has me thinking that the issue is definitely with text encoding, though I'm having a hard time figuring out where or why this would occur. I'll let you know any other thoughts I have.

  10. Nuri Atik reporter

    Sorry, I couldn't try it. I'm a little busy these days. When I try, I will inform you. Thanks

  11. Scott Wells repo owner

    No problem at all. I was working on some bugs this morning and just didn't know if there was any update on this. Let me know when you get a chance to take a look. Thanks!

  12. Nuri Atik reporter

    Hi Scott, Problem is solved. It is occured because of computer's language. After changed my computer's language to English, I can retrieve metadata from server successfully. Thanks for your help.

  13. Log in to comment