Java heap space error caused by ApexIndexer
See original GitHub issueHello,
Unfortunately the same issue as #1103 is still exiting. I’m unable to load the @isTest panel and the code completion is not working. Here is the complete log generated when I tried to run a test from VSCode for example:
10:16:27.791 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Patching standard library for System.Database.* methods 10:16:27.800 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Done patching standard library for System.Database.* methods 10:16:29.740 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types took 7367 ms. 10:16:29.744 [ApexIndexer STARTING] INFO a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types. sept. 03, 2019 10:18:07 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError GRAVE: Internal error: java.lang.reflect.InvocationTargetException java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67) at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120) at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261) at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190) at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192) at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94) at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65) ... 11 more Caused by: java.lang.OutOfMemoryError: Java heap space
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
@ntotten Carrying over from the SF Success Community question. The error above is somewhat similar to the ones that we get when opening org that have a very large number of metadata artifacts.
From yesterday when I re-opened a massive-org project …
12:36:54.324 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types. Nov 07, 2019 12:36:55 PM apex.jorje.parser.impl.BaseApexLexer dedupe INFO: Deduped array ApexLexer.DFA22_transition. Found 7075527 shorts which is 13MB not including array overhead. Removed 6418975 shorts which is 12MB not counting array overhead. Took 9 ms. 12:36:59.076 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Patching standard library for System.Database.* methods 12:36:59.084 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Done patching standard library for System.Database.* methods 12:37:00.545 [ApexIndexer STARTING] INFO a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types. 12:37:00.548 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types took 6223 ms. Exception in thread "ForkJoinPool.commonPool-worker-27" java.lang.OutOfMemoryError: Java heap space
Thanks…