Tag Archives: jvm

[Solved] java: Internal error in the mapping processor: java.lang.NullPointerException

1. Background description

Project background: IDEA (2020.3)+Springboot (2.1.5. RELEASE) + maven

Error content: java: Internal error in the mapping processor: java.lang.NullPointerException

2. Error cause

The cause of the error has not been found

3. Solutions

When using mapstruct, IDEA version 2020.3 gives an error when building the project: java: Internal error in the mapping processor: java.lang.NullPointerException

Solution: Modify editor configuration

Path: Setting —> Build,Execution,Deployment –> Compiler –> User-local build process VM options (overrides Shared options)

Configuration content: – Djps.track.ap dependencies=false

As shown in the figure below:

end!

Resin Failed to Startup Error: ERROR: transport error 202: bind failed: Address already in use: JVM_Bind Listenin (Two Resins in One PC)

Error content:

ERROR: transport error 202: bind failed: Address already in use: JVM_Bind Listening for transport dt_socket at addres

The cause of the error is obviously port occupation, but I have clearly changed the app_servers in the resin.properties file to a different port.

The reason
The reason is that I modified the jvm_args in the resin.properties file of one of the resins before in order to allow idea to debug the resin service remotely.

Original content

jvm_args  : -Xmx4000m -Xms4000m -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:-OmitStackTraceInFastThrow -XX:+UseParNewGC -XX:+DisableExplicitGC -javaagent:wagent.jar -javaagent:stophotdeploy.jar -Djdk.tls.ephemeralDHKeySize=2048 -Dfile.encoding=GBK -javaagent:rasp/rasp.jar

I changed it to

jvm_args  : -Xdebug -Xrunjdwp:transport=dt_socket,address=9081,server=y,suspend=n -Dcom.sun.management.jmxremote -Xloggc:/var/log/resin_gc.log

The other resin service still keeps the original content, so the two services cannot be started, and an error will be reported that the address port is occupied.

 

Solution:

The solution is to configure address= for both resins and set the port differently, or use the original default jvm_args.

Here use the method of configuring address= for both.

The first file.

jvm_args  : -Xdebug -Xrunjdwp:transport=dt_socket,address=9081,server=y,suspend=n -Dcom.sun.management.jmxremote -Xloggc:/var/log/resin_gc.log

Second file

jvm_args  : -Xdebug -Xrunjdwp:transport=dt_socket,address=9082,server=y,suspend=n -Dcom.sun.management.jmxremote -Xloggc:/var/log/resin_gc.log

Gephi cannot find Java 1.8 or higher [How to Solve]

Previously installed Gephi and configured the Java environment, but not used for more than a year, recently opened Gephi reported an error:

cannot find Java 1.8 or higher

I followed the [online tutorial] to set the jdkhome variable in Gephi.conf as follows:

jdkhome="C:/Users/username/AppData/LocalLow/Oracle/Java/jdk11.0.9_x64& #34;

Another error was reported:

Cannot locate java installation in specified jdkhome

I read a bunch of posts on the Internet again, guess that my Java is not installed in the default path, but installed in the D drive, And the Gephi.conf file should only use Associate to the installation path of Java to, reconfigure:

jdkhome="D:/Program Files/JAVA sdk"

Gephi can be opened normally.

[Solved] JNI Error: Fatal signal 11 (SIGSEGV)

2022-09-14 09:19:01.092 3562-3580/com.derry.opengl A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x24 in tid 3580 (GLThread 103) 

I often encounter this kind of error report, making me very bummed.

I tried a solution (rooted phone or emulator, otherwise the error log file can not be found): 1.

1. find the file where the logs are located: data/tombstones

2. Find the file with this latest date

3. save the file to the desktop (I did not encounter problems with permissions using the emulator, so I can export directly) If you encounter insufficient permissions, you need to use su superuser permissions (chmod 777 xxxxx)

4. open the log file: there are error logs inside (this point is not enough permissions for me) specific analysis of the problem, this point is mainly to explain how to view this log file

--------- log main 09-14 09:18:58.184 3562 3562 D : houdini no need remount 09-14 09:18:58.201 3562 3562 I art : Late-enabling -Xcheck:jni 09-14 09:18:58.236 3562 3562 E libnb : load libnb 09-14 09:18:58.252 3562 3562 D houdini : [3562] Initialize library(version: 7.1.1b_x.49852 RELEASE)... successfully. 09-14 09:18:58.254 3562 3562 W art : Unexpected CPU variant for X86 using defaults: x86 09-14 09:18:58.719 3562 3562 W art : Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 09-14 09:18:58.782 3562 3562 I art : Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 09-14 09:18:58.783 3562 3562 I art : at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2341) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.widget.ActionBarContainer.(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance0!( java.lang.Object[]) (Constructor.java:-2) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflate(org.xmlpull.v1. XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1. XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1. XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377) 09-14 09:18:58.783 3562 3562 I art : at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 09-14 09:18:58.783 3562 3562 I art : at void com.derry.opengl.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:19) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6692) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118) 09-14 09:18:58.783 3562 3562 I art : at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2621) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2729) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1480) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Looper.loop() (Looper.java:154) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6176) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Method.invoke!( java.lang.Object, java.lang.Object[]) (Method.java:-2) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:893) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:783) 09-14 09:18:58.783 3562 3562 I art : Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.derry.opengl-1/base.apk"],nativeLibraryDirectories=[/data/app/com.derry.opengl-1/lib/arm, /data/app/com.derry.opengl-1/base.apk! /lib/armeabi-v7a, /system/lib, /vendor/lib]] 09-14 09:18:58.783 3562 3562 I art : at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 09-14 09:18:58.783 3562 3562 I art : at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2341) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.widget.ActionBarContainer.(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance0!( java.lang.Object[]) (Constructor.java:-2) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflate(org.xmlpull.v1. XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1. XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1. XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377) 09-14 09:18:58.783 3562 3562 I art : at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 09-14 09:18:58.783 3562 3562 I art : at void com.derry.opengl.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:19) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6692) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118) 09-14 09:18:58.783 3562 3562 I art : at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2621) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2729) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1480) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Looper.loop() (Looper.java:154) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6176) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Method.invoke!( java.lang.Object, java.lang.Object[]) (Method.java:-2) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:893) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:783) 09-14 09:18:58.783 3562 3562 I art : 09-14 09:18:58.843 3562 3562 W System.err: java.io.FileNotFoundException: /sdcard/lbpcascade_frontalface.xml (Permission denied) 09-14 09:18:58.844 3562 3562 W System.err: at java.io.FileOutputStream.open(Native Method) 09-14 09:18:58.844 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:221) 09-14 09:18:58.844 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:169) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.utils.FileUtil.copyAssets2SDCard(FileUtil.java:16) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MyGLRenderer.(MyGLRenderer.java:43) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.init(MyGLSurfaceView.java:29) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.(MyGLSurfaceView.java:21) 09-14 09:18:58.844 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance0(Native Method) 09-14 09:18:58.844 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.createView(LayoutInflater.java:645) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:377) 09-14 09:18:58.844 3562 3562 W System.err: at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 09-14 09:18:58.844 3562 3562 W System.err: at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MainActivity.onCreate(MainActivity.java:19) 09-14 09:18:58.844 3562 3562 W System.err: at android.app.Activity.performCreate(Activity.java:6692) 09-14 09:18:58.845 3562 3562 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 09-14 09:18:58.846 3562 3562 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621) 09-14 09:18:58.846 3562 3562 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729) 09-14 09:18:58.846 3562 3562 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 09-14 09:18:58.847 3562 3562 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) 09-14 09:18:58.848 3562 3562 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 09-14 09:18:58.848 3562 3562 W System.err: at android.os.Looper.loop(Looper.java:154) 09-14 09:18:58.848 3562 3562 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6176) 09-14 09:18:58.848 3562 3562 W System.err: at java.lang.reflect.Method.invoke(Native Method) 09-14 09:18:58.848 3562 3562 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 09-14 09:18:58.848 3562 3562 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) 09-14 09:18:58.857 3562 3562 W System.err: java.io.FileNotFoundException: /sdcard/seeta_fa_v1.1.bin (Permission denied) 09-14 09:18:58.862 3562 3562 W System.err: at java.io.FileOutputStream.open(Native Method) 09-14 09:18:58.862 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:221) 09-14 09:18:58.862 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:169) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.utils.FileUtil.copyAssets2SDCard(FileUtil.java:16) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.MyGLRenderer.(MyGLRenderer.java:45) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.init(MyGLSurfaceView.java:29) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.(MyGLSurfaceView.java:21) 09-14 09:18:58.862 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance0(Native Method) 09-14 09:18:58.862 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 09-14 09:18:58.862 3562 3562 W System.err: at android.view.LayoutInflater.createView(LayoutInflater.java:645) 09-14 09:18:58.862 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 09-14 09:18:58.862 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:377) 09-14 09:18:58.863 3562 3562 W System.err: at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 09-14 09:18:58.863 3562 3562 W System.err: at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 09-14 09:18:58.863 3562 3562 W System.err: at com.derry.opengl.MainActivity.onCreate(MainActivity.java:19) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.Activity.performCreate(Activity.java:6692) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) 09-14 09:18:58.863 3562 3562 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 09-14 09:18:58.863 3562 3562 W System.err: at android.os.Looper.loop(Looper.java:154) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6176) 09-14 09:18:58.863 3562 3562 W System.err: at java.lang.reflect.Method.invoke(Native Method) 09-14 09:18:58.863 3562 3562 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 09-14 09:18:58.863 3562 3562 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) 09-14 09:18:58.998 3562 3562 D : static HostConnection *HostConnection::createUnique(): call 09-14 09:18:58.999 3562 3562 D : HostConnection::get() New Host Connection established 0xd2dfcd30, tid 3562 09-14 09:18:59.103 3562 3586 I OpenGLRenderer: Initialized EGL, version 1.4 09-14 09:18:59.103 3562 3586 D OpenGLRenderer: Swap behavior 1 09-14 09:18:59.105 3562 3586 D : HostConnection::get() New Host Connection established 0xd2dfcf10, tid 3586 09-14 09:18:59.416 3562 3580 D : HostConnection::get() New Host Connection established 0xd7012480, tid 3580 09-14 09:18:59.794 3562 3580 E EGL_emulation: eglQueryContext 32c0 EGL_BAD_ATTRIBUTE 09-14 09:18:59.794 3562 3580 E EGL_emulation: tid 3580: eglQueryContext(1413): error 0x3004 (EGL_BAD_ATTRIBUTE)

[Solved] Error occurred during initialization of VM javalangNoClassDefFoundError javalangObject

When you run java/javac/java -version under the doc command, an error was reported:

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

 

Or eclipse cannot be opened for this reason

I summarized the following three reasons:

1: java environment variables are misconfigured, check the right and wrong environment variables, especially check the classpath

General (in the case of java configuration only), the value of the environment variable

JAVA_HOME ========= “your jdk installation directory” such as “C:Program FilesJavajdk1.8.0_121”

Path ========= “%JAVA_HOME%in;%JAVA_HOME%jrein”

CLASS_PATH ========= “%JAVA_HOME%libdt.jar;%JAVA_HOME%lib ools.jar”

2: If there is no problem with the environment variable configuration, then go to the jdk installation directory (such as C:Program FilesJavajdk1.8.0_121) and look for tools.jar under lib and rt.jar under jrelib to see if they exist, it is possible that rt.pack and tools.pack exist.

At this point, just unpack the corresponding files into rt.jar and tools.jar, and you can use the unpack200 tool inside the bin

#cd /usr/java/j2sdk1.4.2/lib
#unpack tools.pack tools.jar
#cd …/jre/lib
#…/…/unpack rt.pack rt.jar

3: There is no tools.jar under lib or rt.jar under jrelib, or there are missing files under lib or jrelib (40 files), so just copy them from elsewhere.

If you run java command after copying tools.jar or rt.jar, there may be missing files under jrelib, look carefully or just copy a whole jrelib, it can be solved.

[Solved] java Internal error in the mapping processor java.lang.NullPointerException

Error:

java: Internal error in the mapping processor: java.lang.NullPointerException  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.createManifestUrl(DefaultVersionInformation.java:182)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.openManifest(DefaultVersionInformation.java:153)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.getLibraryName(DefaultVersionInformation.java:129)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.getCompiler(DefaultVersionInformation.java:122)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.fromProcessingEnvironment(DefaultVersionInformation.java:95)  	
at org.mapstruct.ap.internal.processor.DefaultModelElementProcessorContext.<init>(DefaultModelElementProcessorContext.java:50)  
at org.mapstruct.ap.MappingProcessor.processMapperElements(MappingProcessor.java:218)  	
at org.mapstruct.ap.MappingProcessor.process(MappingProcessor.java:156)  	
at org.jetbrains.jps.javac.APIWrappers$ProcessorWrapper.process(APIWrappers.java:109)  	
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  	
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  	
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  	
at java.lang.reflect.Method.invoke(Method.java:498)  	
at org.jetbrains.jps.javac.APIWrappers$1.invoke(APIWrappers.java:213)  	
at org.mapstruct.ap.MappingProcessor.process(Unknown Source)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)  
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)  	
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)  	
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)  	
at com.sun.tools.javac.main.Main.compile(Main.java:523)  	
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)  	
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)  	
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:231)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:501)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:353)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:277)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:231)  	
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1441)  	
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1100)  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1224)  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1066)  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:832)  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:419)  	at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)  	at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:132)  	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)  	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:132)  	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:219)  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  	at java.lang.Thread.run(Thread.java:748)  

When using MapStruct, idea version 2020.3, an error occurs when building the project: java: Internal error in the mapping processor: java.lang.NullPointerException

Solution:
Setting –>Build,Execution,Deployment –>Compiler –>User-local build add the parameter
-Djps.track.ap.dependencies=false

Mat Failed to Open a Memory Dump Error [How to Solve]

1. When mat opens a memory dump file, the following error is reported:

An internal error occurred durina: “Parsing heap dump from

2. At the same time, the size of the dump file is relatively large, which indicates that the memory of the mat software is small, and it is not enough to open the analysis

Big problem. The configuration needs to be adjusted.

3. Solution: adjust the configuration by installing

1) right click display package content

2) Click to open this folder

3) Continue to click to open this folder

4) Right-click to open this profile

5) Change this configuration to 5120m and save the configuration. Just reopen MAT.

4. Done!

[Solved] error Unable to find the ncurses libraries

When you enter the kernel directory, compile the kernel, and execute make menuconfig, you are prompted as follows:

*** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 ***
 *** Install ncurses (ncurses-devel) and try again.
 ***
scripts/kconfig/Makefile:202: recipe for target 'scripts/kconfig/dochecklxdialog' failed
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
Makefile:520: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2

 

How to Solve:

1. Check out .bashrc

2… Solve according to the error: apt-get install ncurses-devel , again with the error.

E: Unable to locate package ncurses-devel

3. The above reason is because the system lacks libncurses library, so install it: sudo apt-get install libncurses-dev

4. Make menuconfig again, successfully: sudo apt-get install libncurses-dev

[Solved] java Internal error in the mapping processor java.lang.NullPointerException

Error Messages:

java: Internal error in the mapping processor: java.lang.NullPointerException  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.createManifestUrl(DefaultVersionInformation.java:182)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.openManifest(DefaultVersionInformation.java:153)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.getLibraryName(DefaultVersionInformation.java:129)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.getCompiler(DefaultVersionInformation.java:122)  	
at org.mapstruct.ap.internal.processor.DefaultVersionInformation.fromProcessingEnvironment(DefaultVersionInformation.java:95)  	
at org.mapstruct.ap.internal.processor.DefaultModelElementProcessorContext.<init>(DefaultModelElementProcessorContext.java:50)  
at org.mapstruct.ap.MappingProcessor.processMapperElements(MappingProcessor.java:218)  	
at org.mapstruct.ap.MappingProcessor.process(MappingProcessor.java:156)  	
at org.jetbrains.jps.javac.APIWrappers$ProcessorWrapper.process(APIWrappers.java:109)  	
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  	
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  	
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  	
at java.lang.reflect.Method.invoke(Method.java:498)  	
at org.jetbrains.jps.javac.APIWrappers$1.invoke(APIWrappers.java:213)  	
at org.mapstruct.ap.MappingProcessor.process(Unknown Source)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)  
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)  	
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)  	
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)  	
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)  	
at com.sun.tools.javac.main.Main.compile(Main.java:523)  	
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)  	
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)  	
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:231)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:501)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:353)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:277)  	
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:231)  	
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1441)  	
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1100)  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1224)  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1066)  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:832)  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:419)  	at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)  	at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:132)  	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)  	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:132)  	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:219)  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  	at java.lang.Thread.run(Thread.java:748)  

In the use of MapStruct, idea2020.3 version in the build project error: java: Internal error in the mapping processor: java.lang.NullPointerException

Solution:
Setting –>Build,Execution,Deployment –>Compiler –>User-local build Add the parameter:
-Djps.track.ap.dependencies=false

[Solved] IDEA java compile error: Error:java: Compilation failed: internal java compiler error

There are two possible cases of error: Java: compilation failed: internal java compiler error.

1. The JDK version may be inconsistent

Check whether the following three parts are consistent.

Preferences -> Compiler -> Version setting SDK version in Java compiler

File -> Project Structure -> SDK version in project

File -> Project Structure -> Module -> Module SDK version in each module dependencies

2. The memory setting of the compilation environment may be insufficient.

Preferences -> Compiler -> Shared build process heap size

Increase the default memory of 700M.

[Solved] BASE64Encoder Error: Cannot resolve symbol ‘BASE64Encoder’

Question:

Cannot resolve symbol ‘BASE64Encoder’

reason:

After jdk9, the official does not support Import sun.misc.Base64encoder.

Solution:

Method 1: reduce the JDK version to less than 1.8. (not recommended)
Method 2: use the official new jar package import java.util Base64.

The purpose of the following Java class is to modify the corresponding coding format of the file name in different browsers to make it display Chinese correctly.

This is done with sun.misc.BASE64Encoder;

Set BASE64Encoder base64encoder = new BASE64Encoder(); Modify to Base64.Encoder encoder = Base64.getencoder();

And change the encode() method to encodeToString(). Nothing else needs to be modified.

In this way, IDEA will not report an error.

[Solved] asList().add() error: UnsupportedOperationException

ArrayList.add() and aslist().add() problem

using aslist().add() report an error: UnsupportedOperationException


Cause and analysis

asList() is using the internal class ArrayList of Arrays, this internal class does not override the add() method, so the add method used here is the parent class abstract class of the ArrayList class, the add() method here by default is to throw an exception: UnsupportedOperationException

Internal class of arrays

  private static class ArrayList<E> extends AbstractList<E>
        implements RandomAccess, java.io.Serializable
    {
        private static final long serialVersionUID = -2764017481108945198L;
        private final E[] a;

        ArrayList(E[] array) {
            a = Objects.requireNonNull(array);
        }

        @Override
        public int size() {
            return a.length;
        }

        @Override
        public Object[] toArray() {
            return a.clone();
        }

        @Override
        @SuppressWarnings("unchecked")
        public <T> T[] toArray(T[] a) {
            int size = size();
            if (a.length < size)
                return Arrays.copyOf(this.a, size,
                                     (Class<?extends T[]>) a.getClass());
            System.arraycopy(this.a, 0, a, 0, size);
            if (a.length > size)
                a[size] = null;
            return a;
        }

        @Override
        public E get(int index) {
            return a[index];
        }

        @Override
        public E set(int index, E element) {
            E oldValue = a[index];
            a[index] = element;
            return oldValue;
        }

        @Override
        public int indexOf(Object o) {
            E[] a = this.a;
            if (o == null) {
                for (int i = 0; i < a.length; i++)
                    if (a[i] == null)
                        return i;
            } else {
                for (int i = 0; i < a.length; i++)
                    if (o.equals(a[i]))
                        return i;
            }
            return -1;
        }

        @Override
        public boolean contains(Object o) {
            return indexOf(o) != -1;
        }

        @Override
        public Spliterator<E> spliterator() {
            return Spliterators.spliterator(a, Spliterator.ORDERED);
        }

        @Override
        public void forEach(Consumer<?super E> action) {
            Objects.requireNonNull(action);
            for (E e : a) {
                action.accept(e);
            }
        }

        @Override
        public void replaceAll(UnaryOperator<E> operator) {
            Objects.requireNonNull(operator);
            E[] a = this.a;
            for (int i = 0; i < a.length; i++) {
                a[i] = operator.apply(a[i]);
            }
        }

        @Override
        public void sort(Comparator<?super E> c) {
            Arrays.sort(a, c);
        }
    }

Add method of ArrayList() class

 public boolean add(E e) {
        ensureCapacityInternal(size + 1);  // Increments modCount!!
        elementData[size++] = e;
        return true;
    }

Add method of AbstractList class

Aslist() uses this method

public void add(int index, E element) {
        throw new UnsupportedOperationException();//This is where the exception is thrown
    }