Salesforce Offline Symbol Table Problem
Hi, I have an error when creating a Salesforce project. The screenshot of error and log file attached. Thanks.
Comments (16)
-
repo owner -
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;} //http://eltoro.force.com/FormattingNumbersInsideApex 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. if(dec==0){ i--; } 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); } }
-
repo owner Thanks. Is it possible that there are special characters in this source, in particular in
String
andInteger
? Based on the comment abovedoFormatting()
, it looks like you may have grabbed this from an external location. -
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.
-
repo owner Okay. How are you sharing the source between the two environments? Using version control? deploy/retrieve? other?
-
reporter With deploy/retrieve
-
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
and:
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(Class.java:2070) 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).
-
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.
-
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...
-
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. -
reporter Thanks for your help. I'm outside of work now. When I try this, I'll inform you.
-
repo owner Nuri, any update on this?
-
reporter Sorry, I couldn't try it. I'm a little busy these days. When I try, I will inform you. Thanks
-
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!
-
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.
-
repo owner - changed status to resolved
Ah, interesting. Thanks so much for letting me know and glad it's resolved!
- Log in to comment
Hi, Nuri. I'm seeing something very strange in the logs. I'm seeing things like:
and:
Notice the special character being used instead of "I". Can you provide an example of the source code that's doing this?