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

java.lang.IllegalArgumentException when running server #118

Closed
mohkale opened this issue May 7, 2020 · 3 comments
Closed

java.lang.IllegalArgumentException when running server #118

mohkale opened this issue May 7, 2020 · 3 comments

Comments

@mohkale
Copy link

mohkale commented May 7, 2020

I'm on meghanada 1.2.1 and emacs GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.17, cairo version 1.17.3) of 2020-04-20.

Here's the full server log:

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
[INFO ][Main      :  55] use java home: /usr/lib/jvm/java-13-openjdk
[INFO ][Main      :  56] use java runtime: OpenJDK Runtime Environment 13.0.2+8
[INFO ][Main      :  60] use java vm: OpenJDK 64-Bit Server VM 13.0.2+8
[INFO ][Main      : 155] Meghanada-Server Version:1.2.1-7362fa3
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.nustaq.serialization.FSTClazzInfo (file:/home/mohkale/.dotfiles/editors/emacs/var/meghanada/meghanada-1.2.1.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of org.nustaq.serialization.FSTClazzInfo
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO ][Session   : 194] load project from cache. projectRoot:/home/mohkale/programming/repos/com2109-assignment01
[INFO ][EmacsServe: 364] zpage tracez handler http://localhost:43797/tracez
[INFO ][EmacsServe: 370] Start server Listen localhost port:44325
[INFO ][EmacsServe: 391] client connected
[INFO ][CacheEvent:  75] start analyze sources ...
[ERROR][Project   : 334] Catching
java.lang.IllegalArgumentException: error: invalid source release: 14
	at com.sun.tools.javac.main.Arguments.error(Arguments.java:904) ~[jdk.compiler:?]
	at com.sun.tools.javac.main.Arguments.doProcessArgs(Arguments.java:383) ~[jdk.compiler:?]
	at com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:347) ~[jdk.compiler:?]
	at com.sun.tools.javac.main.Arguments.init(Arguments.java:246) ~[jdk.compiler:?]
	at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:185) ~[jdk.compiler:?]
	at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:119) ~[jdk.compiler:?]
	at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:68) ~[jdk.compiler:?]
	at meghanada.analyze.JavaAnalyzer.runAnalyzeAndCompile(JavaAnalyzer.java:151) ~[meghanada-1.2.1.jar:?]
	at meghanada.analyze.JavaAnalyzer.analyzeAndCompile(JavaAnalyzer.java:101) ~[meghanada-1.2.1.jar:?]
	at meghanada.analyze.JavaAnalyzer.analyzeAndCompile(JavaAnalyzer.java:79) ~[meghanada-1.2.1.jar:?]
	at meghanada.project.Project.compileJava(Project.java:319) ~[meghanada-1.2.1.jar:?]
	at meghanada.project.gradle.GradleProject.compileJava(GradleProject.java:513) ~[meghanada-1.2.1.jar:?]
	at meghanada.project.gradle.GradleProject.compileJava(GradleProject.java:503) ~[meghanada-1.2.1.jar:?]
	at meghanada.session.subscribe.CacheEventSubscriber.lambda$analyze$3(CacheEventSubscriber.java:80) ~[meghanada-1.2.1.jar:?]
	at meghanada.config.Config.timeItF(Config.java:135) [meghanada-1.2.1.jar:?]
	at meghanada.session.subscribe.CacheEventSubscriber.analyze(CacheEventSubscriber.java:76) [meghanada-1.2.1.jar:?]
	at meghanada.session.subscribe.CacheEventSubscriber.on(CacheEventSubscriber.java:38) [meghanada-1.2.1.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at meghanada.com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87) [meghanada-1.2.1.jar:?]
	at meghanada.com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144) [meghanada-1.2.1.jar:?]
	at meghanada.com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72) [meghanada-1.2.1.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:830) [?:?]
[WARN ][CacheEvent:  94] compile message  error: invalid source release: 14
[INFO ][Config    : 139] analyzed and compiled. elapsed:352.9 ms
[INFO ][CacheEvent: 101] class index size:2176 total elapsed:380.5 ms
[INFO ][Config    : 202] memory usage (used/total/max): 35.00MB / 154.00MB / 1976.00MB
[INFO ][CacheEvent: 106] Ready
[INFO ][CacheEvent:  68] create class index ... read 12 jars. elapsed:1.716 s

and here's the output from java --version:

openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode)
@mopemope
Copy link
Owner

mopemope commented May 8, 2020

@mohkale Perhaps, the source compatibility settings are incorrect. Check your settings.

@mohkale
Copy link
Author

mohkale commented May 8, 2020

Sorry, I'm not much of a java dev, how would I do that?

@mohkale
Copy link
Author

mohkale commented May 11, 2020

So evidently it was a source compatibility setting issue. I didn't set a default value for java.sourceCompatibility in build.gradle.kts and it seems to have defaulted to 14 for some reason 😓. Apologies for the bogus issue, thnx for pointing me in the right direction.

@mohkale mohkale closed this as completed May 11, 2020
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