I have upgraded my project Dagger version from 2.29.1 to 2.44, but after the upgrade I am not able to compile the code.
This is the error I am getting:
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration SomeExtnContractImpl
File being compiled: (97,1) in FILE_NAME.kt
The root cause org.jetbrains.kotlin.com.intellij.openapi.util.io.FileTooBigException was thrown at: org.jetbrains.kotlin.com.intellij.openapi.util.io.FileUtil.loadFileBytes(FileUtil.java:201)
Caused by: org.jetbrains.kotlin.com.intellij.openapi.util.io.FileTooBigException: Attempt to load 'PROJECT_PATH/DaggeAppComponent.java' in memory buffer, file length is 24808949 bytes.
I have tired setting custom editor properties with these values (in KB):
idea.max.content.load.filesize=30000
idea.max.intellisense.filesize=35000
idea.max.vcs.loaded.size.kb=30000
But I'm still getting the same error. Please suggest what can be done to fix this?
To fix this error, a possible workaround is to use this in gradle.properties
kotlin.daemon.jvmargs=-Didea.max.content.load.filesize=300000 -Didea.max.intellisense.filesize=300000
Note: 300000 here will be equivalent to 30 MB.
Related
I'm working on a flutter project in vs code, and I'm trying to run ./gradlew signingReport to get the SHA1 certificate but when I try to run that I get the following error message:
Could not compile build file 'C:\src\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-4.3.1\android\build.gradle'.
startup failed:
General error during conversion: Unsupported class file major version 63
I've looked around and there seems to be some kind of problem with the way the java versions are set up, but I don't know what or where to change.
If you need more information from me to help me solve this please tell me what can I provide, this is driving me crazy.
Unsupported class file major version 63
As far as I know, class file major version 63 needs java19.
I think you have to update it.
If you are on java-19 do this to solve this error:-
Unsupported class file major version 63
just go at your project folder and then open android/gradle/wrapper/gradle-wrapper-properties
then change this :-
distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip
To This :-
distributionUrl=https://services.gradle.org/distributions/gradle-7.6-all.zip
and then your issue get solved 😁
My packages are as following:
implementation("io.netty:netty-transport-native-epoll:$nettyVersion")
implementation("io.netty:netty-transport-native-kqueue:$nettyVersion")
implementation("io.netty:netty-transport-native-epoll:$nettyVersion:linux-aarch_64")
implementation("io.netty:netty-transport-native-epoll:$nettyVersion:linux-x86_64")
implementation("io.netty:netty-transport-native-kqueue:$nettyVersion:osx-x86_64")
Gradle showing the package getting installed correctly: (where <source> is the path to our internal library storage)
Cached resource <source>/releases/io/netty/netty-transport-native-kqueue/4.1.78.Final/netty-transport-native-kqueue-4.1.78.Final-osx-x86_64.jar is up-to-date (lastModified: Fri Jun 24 17:45:28 PDT 2022).
Gradle output showing the system:
------------------------------------------------------------------------
Detecting the operating system and CPU architecture
------------------------------------------------------------------------
os.detected.name=osx
os.detected.arch=x86_64
os.detected.version=12.4
os.detected.version.major=12
os.detected.version.minor=4
os.detected.classifier=osx-x86_64
Simplest way I can reproduce is:
KQueue.isAvailable()
returns false.
If I run the following to get more information:
KQueue.unavailabilityCause().printStackTrace();
I get: (removed repeating or unnecessary stack traces)
java.lang.UnsatisfiedLinkError: could not load a native library: netty_transport_native_kqueue_x86_64
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:239)
at io.netty.channel.kqueue.Native.loadNativeLibrary(Native.java:155)
...
Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_kqueue_x86_64 in java.library.path: /Users/kdilsiz/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
...
Am I not supposed to be able to run this code? What am I missing?
If I search online for the error, it shows outdated Netty package loading errors (only showing up in debug level logging). This is NOT my problem. The package loads correctly when I run gradle and I can see it is being cached/loaded with gradle -info --refresh-dependencies.
It was due to one of the dependencies importing netty-all. This was causing the Kqueue packages to be imported twice and with different versions.
The problem was that I did not fully read the stack trace from:
KQueue.unavailabilityCause().printStackTrace();
In the end of that stack trace, it said:
Caused by: java.lang.IllegalStateException: Multiple resources found for 'META-INF/native/libnetty_transport_native_kqueue_x86_64.jnilib' with different content:
...
After that, I was able to find where the package was coming from and fix it. Then I was able to locally run the Java Code to run domain socket and test it locally.
I used IntelliJ to run it after the fix. (VsCode had a problem even after the fix, hence wanted to mention it)
I am trying to use jlink as part of the javafx-maven-plugin plugin to create a runtime image with AdoptOpenJDK 15. For some reason I end up getting the following error during the jlink goal:
Error: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: ...\target\image\bin\javaw.exe
javafx:run, however, works fine.
Note: The path to the project has been omitted from the error message.
Some antiviruses can block the creation of executable files. Check if this is the case and configure your antivirus to exclude ...\target\image\bin\javaw.exe from being checked, or to trust the jlink process to write whatever it wants.
I am having a problem with Sonarqube running from with gradle within a Jenkins pipeline. I am using sonar-scanner-3.0.3.778, gradle 4.3, and the gradle Sonarqube plugin version 2.6.1
When running, we are getting an error that a file cannot be analyzed but there is no reason. When I turn on the '--stacktrace' I am getting the error below error and I have found NO reference to anyone else getting this in any of my searches. Does anyone know what the following mean?
Caused by: org.sonar.sslr.grammar.GrammarException: The inner part of
ZeroOrMore and OneOrMore must not allow empty matches at
org.sonar.sslr.internal.vm.Instruction$CommitVerifyInstruction.execute(Instruction.java:277)
at org.sonar.sslr.internal.vm.Machine.execute(Machine.java:162) at
org.sonar.sslr.internal.vm.Machine.execute(Machine.java:105) at
org.sonar.sslr.internal.vm.Machine.parse(Machine.java:83) at
org.sonar.sslr.parser.ParseRunner.parse(ParseRunner.java:46) at
com.sonar.sslr.api.typed.ActionParser.parse(ActionParser.java:101) at
com.sonar.sslr.api.typed.ActionParser.parse(ActionParser.java:97) at
org.sonar.java.ast.parser.JavaParser.parse(JavaParser.java:55) at
org.sonar.java.ast.parser.JavaParser.parse(JavaParser.java:32) at
org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:94)
... 70 more
I have installed the Java 9 plugin. My project hasn't changed, but when I try to run, I get this:
If you need anything else, feel free to comment that you don't have enough info.
My .log file: https://pastebin.com/SQXZVcQk
Seems like a configuration issue as per my understanding. There are two possible causes/solution to it:
From the logs:
Root exception:
java.lang.ExceptionInInitializerError
at com.jniwrapper.util.ProcessorInfo.b(SourceFile:95)
Caused by: com.jniwrapper.LibraryNotFoundException: Cannot find JNIWrapper native library (jniwrap64.dll) in java.library.path:
Eclipse is not able to configure the java.library.path properly, in which case you can try setting the VM argument using the following on the command line:
-Djava.library.path="${workspace_loc:project}\lib;${env_var:PATH}"
Check out How to add native library to "java.library.path" with Eclipse launch (instead of overriding it) for further details and platform specific solutions.
&& make sure you include the path to jdk-9 early access build that should ideally be a must for the plugin used based out of Java9.
Also, the log reads
!ENTRY org.eclipse.ui 4 0 2017-08-27 09:22:31.358
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: -1
at es.org.chemi.games.snake.ui.GameField.createGameField(GameField.java:217)
at es.org.chemi.games.snake.ui.GameField$1.controlResized(GameField.java:99)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:236)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
For the pertaining code, you might want to look into the implementation of
createGameField at GameField.java:217. If this wasn't specifically occurring on previous java version for you then solving (1) should get rid of this or else you might want to give the solutions at Eclipse Bug: Unhandled event loop exception No more handles a try.
On receiving the same error in eclipse I fixed it by selecting this option instead of the default (highlighted by the red arrow in the snapshot)