-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apex Server Language Error #388
Comments
If the above don't solve it, it would be nice if we could take a look at the code. Is this an open project? Or are you able to open up a support case and grant us permission to look into your org? @GaryFNC - Would be good to give more info on the error so that the user can at least pinpoint what was the last thing that was processed before the NPE. |
Hi @vazexqi,
Sorry, it is not an open project, but happy to provide any debug information you may need. Thanks! |
The fact that it works for some but not others is an indication that it choke on some classes/triggers. This could be because of bad syntax or because of some other missing information (like managed packages or sobjects not being pulled down). We try to be as tolerant as possible even when we don't have all the information, but there are limits to not having the information available. @marcalbaladejo - Are you able to open a support issue with the org id and user id so that we can take a closer look at the code? Without seeing the code, here's what I can think of:
|
Hi,
Thanks!! |
Hi Nick, but not this: |
@marcalbaladejo - Thanks for the update. That helps us narrow it down. |
@marcalbaladejo - Just wanted to let you know that we finally got the case routed to the team and we are taking a look at this. |
thanks @vazexqi |
@marcalbaladejo The actual exception that you encountered (and its effects on other lines in the class) is fixed in release 42.14.0 of the extension - to be released late this week. However, there is still an underlying issue where we don't yet properly handle the short form of the SObject without the namespace prefix. The problem is understood and will be fixed in an upcoming version. The effect is that the lines that use the short from of the SObject name will not properly do Go To or Find All due to a perceived semantic error, but with the exception fixed, the other lines in the class will work properly. |
@GaryFNC This is a great step forward, thank you very much! |
@marcalbaladejo Thanks for chasing down the problem for us - made it much simpler to find the underlying issue.... I'll leave this open until I get the full fix done. |
This should be fixed by #413 @marcalbaladejo - Please reopen this issue if you have any other questions. |
Thanks @vazexqi , yes, it is not failing now, thanks!! |
Summary
Hi,
We are getting these errors in the output console. Any idea about how to fix them?
09:15:12.381 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types.
Apr 19, 2018 9:15:12 AM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
WARNING: Unsupported notification method: initialized
Apr 19, 2018 9:15:12 AM apex.jorje.parser.impl.BaseApexLexer dedupe
INFO: Deduped array ApexLexer.DFA22_transition. Found 7403062 shorts which is 14MB not including array overhead. Removed 6746470 shorts which is 12MB not counting array overhead. Took 9 ms.
09:15:15.002 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Patching standard library for System.Database.* methods
09:15:15.008 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Done patching standard library for System.Database.* methods
09:15:15.608 [ApexIndexer STARTING] INFO a.jorje.lsp.impl.index.ApexIndexer - Scanning user-defined types.
09:15:15.607 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types took 3227 ms.
09:15:31.238 [ApexIndexer STARTING] ERROR a.jorje.lsp.impl.index.ApexIndexer - exception thrown in traversing codeunit for references
java.lang.NullPointerException: null
at apex.jorje.lsp.impl.utils.TypeUsageSiteUtil.processTypeUsageSite(TypeUsageSiteUtil.java:46)
at apex.jorje.lsp.impl.index.ApexIndexer$1.visitEnd(ApexIndexer.java:543)
at apex.jorje.lsp.impl.index.ApexIndexer$1.visitEnd(ApexIndexer.java:254)
at apex.jorje.semantic.ast.expression.NewListInitExpression.traverse(NewListInitExpression.java:112)
at apex.jorje.semantic.ast.statement.VariableDeclaration.traverse(VariableDeclaration.java:81)
at apex.jorje.semantic.ast.statement.VariableDeclarationStatements.traverse(VariableDeclarationStatements.java:87)
at apex.jorje.semantic.ast.statement.BlockStatement.traverse(BlockStatement.java:140)
at apex.jorje.semantic.ast.statement.MethodBlockStatement.traverse(MethodBlockStatement.java:75)
at apex.jorje.semantic.ast.member.Method.traverse(Method.java:103)
at apex.jorje.semantic.ast.compilation.UserClass.traverse(UserClass.java:126)
at apex.jorje.lsp.impl.index.ApexIndexer.insertCodeUnit(ApexIndexer.java:254)
at apex.jorje.lsp.impl.index.ApexIndexer.buildCacheInternal(ApexIndexer.java:186)
at apex.jorje.lsp.impl.index.ApexIndexer.buildCache(ApexIndexer.java:196)
at apex.jorje.lsp.impl.index.ApexIndexer.lambda$startUp$1(ApexIndexer.java:895)
at java.util.Optional.ifPresent(Optional.java:159)
at apex.jorje.lsp.impl.index.ApexIndexer.startUp(ApexIndexer.java:893)
at com.google.common.util.concurrent.AbstractScheduledService$ServiceDelegate$2.run(AbstractScheduledService.java:217)
at com.google.common.util.concurrent.Callables$3.run(Callables.java:100)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Thanks!
The text was updated successfully, but these errors were encountered: