Unable to setup Agora Recording SDK - agora.io

I am trying to setup Agora recording setup, I have complied the samples provided in bundle and trying to run them. I am getting following exception where code is unable to find recording.dll
Exception in thread "main" java.lang.UnsatisfiedLinkError: no recording 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 io.agora.recording.RecordingSDK.<clinit>(RecordingSDK.java:24)

This doesn't look like an Agora error rather a Java error. The function is not finding a dependent method in its link path, you can check which function its failing on, and then check if you have a path mismatch in your compilation path
You can do java -XshowSettings:properties -version and then look at the value of java.library.path to see the library paths.

Related

Pytorch runtime not included when project is built as a jar

We have our ONNX model, and we're trying to use it in our app. Running the project from the IDE works just fine, but running the jar file produces this error. We debugged this issue and found that the supportedEngines in IDE runtime includes ONNXRuntime and PyTorch, but the JAR file includes ONNXRuntime only. The issue happens when we reach StackBatchifier.batchify(), on String inputName = ((NDArray)inputs[0].get(i)).getName();
We have the following dependencies in our gradle file:
api("org.apache.logging.log4j:log4j-slf4j-impl:2.18.0") api("ai.djl:model-zoo:0.21.0-SNAPSHOT") api("ai.djl.huggingface:tokenizers:0.21.0-SNAPSHOT") api("ai.djl.pytorch:pytorch-model-zoo:0.21.0-SNAPSHOT") api("ai.djl.onnxruntime:onnxruntime-engine:0.19.0") api("org.jetbrains.kotlin:kotlin-stdlib:1.7.20")
Do we need to put any jar configurations for it to work?
Error Message
Exception in thread "main" ai.djl.translate.TranslateException: java.lang.UnsupportedOperationException: This NDArray implementation does not currently support this operation
at ai.djl.inference.Predictor.batchPredict(Predictor.java:189)
at ai.djl.inference.Predictor.predict(Predictor.java:126)
at ProfanityPredictionModel.predict(ProfanityPredictionModel.kt:30)
at TestModel.main(TestModel.kt:18)
Caused by: java.lang.UnsupportedOperationException: This NDArray implementation does not currently support this operation
at ai.djl.ndarray.NDArrayAdapter.getAlternativeArray(NDArrayAdapter.java:1225)
at ai.djl.ndarray.NDArrayAdapter.getNDArrayInternal(NDArrayAdapter.java:1173)
at ai.djl.ndarray.NDArrays.stack(NDArrays.java:1825)
at ai.djl.ndarray.NDArrays.stack(NDArrays.java:1785)
at ai.djl.translate.StackBatchifier.batchify(StackBatchifier.java:52)
at ai.djl.inference.Predictor.processInputs(Predictor.java:217)
at ai.djl.inference.Predictor.batchPredict(Predictor.java:177)
... 3 more

Bytecode verification issue tool

We are facing a VerifyError in our application while deploying to WAS environment. The following is the exception:
Error 500: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/org/jaxb/Input_JAXB_Deserialization_Stub, method=write(ILjava/lang/Object;)V, pc=356
We are still trying to identify the issue, but all efforts not going well. Is there any way that the libraries used in run time is good in bytecode compatibility?. For example, we can add all the libraries and run the byte code verification.

How to solve "Library not loaded" error because of LocalAuthentication.framework?

I can successfully run my app in IOS 8 but in IOS 7, my app crashes.
The message is:
dyld: Library not loaded: /System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication
Referenced from: /Users/burakkilic/Library/Developer/CoreSimulator/Devices/A0210158-BC6C-43AA-9D85-AA8DE6115AAA/data/Applications/xxx
Reason: no suitable image found. Did find:
/System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication: mach-o, but wrong architecture
How can I solve it?
You could weak link LocalAuthentication.framework and conditionally access the LocalAuthentication API at runtime.
The latter can be done by either:
Checking the iOS version you are running.
Using reflection to test for the presence of API methods (respondsToSelector, et al).

NullPointerException org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:37)

Got the following stacktrace when launching gradle 1.1, anyone know how to resolve them:
Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:37)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:28)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:47)
I think the automatic unzip of the dists/gradle-1.1-bin/13d7lnhcrghv2i5e54el41jpgr/gradle-1.1-bin.zip might be failing. I checked permissions and that I have access to that directory.
If I unzip manually, then I get the following error:
Exception in thread "main" java.lang.RuntimeException: Gradle distribution 'http://services.gradle.org/distributions/gradle-1.1-bin.zip' contains too many directories. Expected to find exactly 1 directory.
at org.gradle.wrapper.Install.createDist(Install.java:73)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:47)
I did a google search for gradle nullpointerexception and it mentioned the JAVA_HOME needs to be set for compiling, but I've already checked it is set correctly and been able to compile stuff with ant in that environment.
I was getting exactly same error and I changed the version of gradle that I was using. Inside my gradle-wrapper.properties, changed version 2.4 to 2.2.1 and error is gone.

WAS6.1 java.lang.UnsatisfiedLinkError: sun/instrument/InstrumentationImpl.getObjectSize0

I am trying to use the classmexer to profile some instance memory runtime.I have set the following as Generic JVM arguments in Webshpere 6.1:
-javaagent:c:/Downloads/classmexer.jar
Following exception is thrown:
Caused by: java.lang.UnsatisfiedLinkError: sun/instrument/InstrumentationImpl.getObjectSize0(Ljava/lang/Object;)J
at sun.instrument.InstrumentationImpl.getObjectSize(InstrumentationImpl.java:116)
at com.javamex.classmexer.MemoryUtil.deepMemoryUsageOf0(MemoryUtil.java:178)
It works fine standalone though.
Any suggestions?
You have to copy the dependencies and classmexer to shared library directory, probably AppServer/lib/ext. The Exception is thrown because WAS doesn't search for everything required from the PATH set in your shell. That is why it still works as standalone.