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)
Related
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.
I'm trying to setup libpostal/jpostal on my Windows 10 machine in a Java environment. I followed the Windows Installation Guide on GitHub.
I am able to see the libpostal folder installed under: C:\xxx\Program Files\libpostal\ with sub folders: .git, autom4te.cache, data, m4, resources etc.
However, when I run:
AddressExpander expander = AddressExpander.getInstance();
I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpostal_expander in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.mapzen.jpostal.AddressExpander.<clinit>(AddressExpander.java:7)
at jpostal.JPostal.execute(JPostal.java:24)
at global_projects.GlobalMain.main(GlobalMain.java:37)
I normally use Maven for my build. However, since there is currently no Maven repository for JPostal, I am using Gradle.
I followed the solution suggested on this GitHub thread by adding the following gradle.build file, however I still get the same error.
What am I doing wrong?
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'm dying trying to figure this out!
Essentially, I've finished up an Ionic app and am ready to publish it to the Google Play Store. The problem is that I'm having trouble following the directions posted on the Ionic Framework website.
So far, I've created an 'android' folder under 'platforms'.
Error thrown:
Android Studio project detected
ANDROID_HOME=C:\Users\fromf\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_191
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
(node:43720) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
My various attempts:
Firstly, that I cannot seem to find the 'build' folder referenced at 'platforms/android/build/outputs/apk'. It simply does not exist.
Having recognised that I'm lacking the 'build' folder, I attempted to change the environment variables according to this website: http://www.tiagoporto.com/blog/environment-setting-tutorial-ionic-android-on-windows/. This did not work.
I followed the directions given on various SoF Q&As, and manually downloaded the needed gradle, called "gradle-2.2.1-all.zip". Still did not work.
I am at my wits ends. Please please please help!
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)