Skip to content
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

IllegalAccessError and IllegalArgumentException on meghanada startup #179

Open
dankeyy opened this issue Oct 21, 2021 · 1 comment
Open

Comments

@dankeyy
Copy link

dankeyy commented Oct 21, 2021

trying to start the meghanada server (with a brand new java file), responds with:

launch server cmd:java -Djava.net.preferIPv4Stack=true -Dmeghanada.class.completion.matcher=prefix -Dmeghanada.completion.matcher=prefix -Dmeghanada.format=sexp -Dmeghanada.cache.in.project=false -Dmeghanada.skip.build.subprojects=true -Dmeghanada.search.static.method.classes=java.util.Objects,org.junit.Assert -Dmeghanada.javac.arg=-Xlint:all -Dmeghanada.maven.path=mvn -Xms128m -XX:ReservedCodeCacheSize=240m -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Dfile.encoding=UTF-8 -jar /home/dankey/.emacs.d/.local/etc/meghanada-server/meghanada-1.3.1.jar -p 0  -l /tmp/meghanada_server_1000.log
Meghanada-Server Starting ...
Server waiting client connection ...
meghanada-client process start ...
Please wait. Meghanada indexing ... 
Beginning of buffer [10 times]
Error:java.lang.IllegalAccessError: . Please check *meghanada-server-log*
Beginning of buffer [14 times]
End of buffer

looking into the actual server log, i see: https://pastebin.com/Fu2i1Qy0
using the latest version of doom.

@xaperret
Copy link

Seems I have a similar issue with doom-emacs with emacs version

~ doom help
> Executing 'doom help' with Emacs 29.0.50 at 2021-11-21 17:57:14

Server log

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
[INFO ][Main      :  54] use java home: /usr/lib/jvm/java-17-openjdk
[INFO ][Main      :  55] use java runtime: OpenJDK Runtime Environment 17.0.1+12
[INFO ][Main      :  59] use java vm: OpenJDK 64-Bit Server VM 17.0.1+12
[INFO ][Main      : 151] Meghanada-Server Version:1.3.1-4d1e3bf
[INFO ][EmacsServe: 366] zpage tracez handler http://localhost:58219/tracez
[INFO ][EmacsServe: 372] Start server Listen localhost port:41959
[INFO ][EmacsServe: 394] client connected
[ERROR][Executor  :  40] Catching
java.lang.IllegalArgumentException: Unsupported class file major version 61
	at meghanada.org.objectweb.asm.ClassReader.<init>(ClassReader.java:196) ~[meghanada-1.3.1.jar:?]
	at meghanada.org.objectweb.asm.ClassReader.<init>(ClassReader.java:177) ~[meghanada-1.3.1.jar:?]
	at meghanada.org.objectweb.asm.ClassReader.<init>(ClassReader.java:163) ~[meghanada-1.3.1.jar:?]
	at meghanada.org.objectweb.asm.ClassReader.<init>(ClassReader.java:284) ~[meghanada-1.3.1.jar:?]
	at meghanada.reflect.asm.ASMReflector.readClassIndex(ASMReflector.java:157) ~[meghanada-1.3.1.jar:?]
	at meghanada.reflect.asm.ASMReflector.lambda$null$2(ASMReflector.java:307) ~[meghanada-1.3.1.jar:?]
	at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at meghanada.reflect.asm.ASMReflector.lambda$getClasses$3(ASMReflector.java:299) ~[meghanada-1.3.1.jar:?]
	at meghanada.module.ModuleHelper.walkModuleFS(ModuleHelper.java:67) ~[meghanada-1.3.1.jar:?]
	at meghanada.module.ModuleHelper.walkModuleFS(ModuleHelper.java:63) ~[meghanada-1.3.1.jar:?]
	at meghanada.module.ModuleHelper.walkModuleFS(ModuleHelper.java:63) ~[meghanada-1.3.1.jar:?]
	at meghanada.module.ModuleHelper.walkModuleFS(ModuleHelper.java:63) ~[meghanada-1.3.1.jar:?]
	at meghanada.module.ModuleHelper.walkModuleFS(ModuleHelper.java:63) ~[meghanada-1.3.1.jar:?]
	at meghanada.module.ModuleHelper.walkModule(ModuleHelper.java:37) ~[meghanada-1.3.1.jar:?]
	at meghanada.reflect.asm.ASMReflector.getClasses(ASMReflector.java:296) ~[meghanada-1.3.1.jar:?]
	at meghanada.reflect.asm.CachedASMReflector.lambda$updateClassIndexFromDirectory$7(CachedASMReflector.java:276) ~[meghanada-1.3.1.jar:?]
	at meghanada.utils.FunctionUtils.lambda$wrapIOConsumer$2(FunctionUtils.java:34) ~[meghanada-1.3.1.jar:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:?]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:686) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[?:?]
	at meghanada.reflect.asm.CachedASMReflector.updateClassIndexFromDirectory(CachedASMReflector.java:270) ~[meghanada-1.3.1.jar:?]
	at meghanada.reflect.asm.CachedASMReflector.createClassIndexes(CachedASMReflector.java:194) ~[meghanada-1.3.1.jar:?]
	at meghanada.session.subscribe.CacheEventSubscriber.analyze(CacheEventSubscriber.java:64) ~[meghanada-1.3.1.jar:?]
	at meghanada.session.subscribe.CacheEventSubscriber.on(CacheEventSubscriber.java:38) ~[meghanada-1.3.1.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at meghanada.com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87) ~[meghanada-1.3.1.jar:?]
	at meghanada.com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144) ~[meghanada-1.3.1.jar:?]
	at meghanada.com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72) [meghanada-1.3.1.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
[INFO ][EmacsServe: 354] receive [pc, /h/x/s/p/S/ArrayListIntIterator.java]. 15.07 ms
[ERROR][CommandHan:  49] Catching
java.lang.IllegalAccessError: class meghanada.analyze.TreeAnalyzer (in unnamed module @0x2ea227af) cannot access class com.sun.tools.javac.tree.JCTree$JCCompilationUnit (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.tree to unnamed module @0x2ea227af
	at meghanada.analyze.TreeAnalyzer.analyzeCompilationUnitTree(TreeAnalyzer.java:439) ~[meghanada-1.3.1.jar:?]
	at meghanada.analyze.TreeAnalyzer.analyzeUnit(TreeAnalyzer.java:539) ~[meghanada-1.3.1.jar:?]
	at meghanada.analyze.TreeAnalyzer.tryAnalyzeUnit(TreeAnalyzer.java:519) ~[meghanada-1.3.1.jar:?]
	at meghanada.analyze.TreeAnalyzer.lambda$analyze$5(TreeAnalyzer.java:509) ~[meghanada-1.3.1.jar:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290) ~[?:?]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
	at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:686) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:159) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[?:?]
	at meghanada.analyze.TreeAnalyzer.analyze(TreeAnalyzer.java:509) ~[meghanada-1.3.1.jar:?]
	at meghanada.analyze.JavaAnalyzer.runAnalyzeAndCompile(JavaAnalyzer.java:286) ~[meghanada-1.3.1.jar:?]
	at meghanada.project.Project.compileString(Project.java:1165) ~[meghanada-1.3.1.jar:?]
	at meghanada.session.Session.diagnosticString(Session.java:917) ~[meghanada-1.3.1.jar:?]
	at meghanada.server.CommandHandler.diagnostics(CommandHandler.java:123) ~[meghanada-1.3.1.jar:?]
	at meghanada.server.emacs.EmacsServer.lambda$dispatch$8(EmacsServer.java:150) ~[meghanada-1.3.1.jar:?]
	at com.leacox.motif.matching.Matching1.lambda$get$15(Matching1.java:45) ~[meghanada-1.3.1.jar:?]
	at com.leacox.motif.matching.Pattern$1.apply(Pattern.java:40) ~[meghanada-1.3.1.jar:?]
	at com.leacox.motif.matching.FluentMatchingR.getMatch(FluentMatchingR.java:118) ~[meghanada-1.3.1.jar:?]
	at meghanada.server.emacs.EmacsServer.dispatch(EmacsServer.java:352) ~[meghanada-1.3.1.jar:?]
	at meghanada.server.emacs.EmacsServer.lambda$acceptConnection$35(EmacsServer.java:439) ~[meghanada-1.3.1.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
[INFO ][EmacsServe: 354] receive [dl, /h/x/s/p/S/ArrayListIntIterator.java, /t/meghanadaSLvJfj.java]. 331.5 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants