java.lang.ExceptionInInitializerError

tip

This is caused by a missing dependency, add it to your gradle file: dependencies {
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1' }

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Runtime error
    via GitHub by johnamcruz
    ,
  • GitHub comment 43#187486249
    via GitHub by ariasf
    ,
    • java.lang.ExceptionInInitializerError at org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:128) at org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:142) at org.bob.broid.misipcc.util.NetUtil.getHttpClient(NetUtil.java:54) at org.bob.broid.misipcc.util.NetUtil.doGet(NetUtil.java:75) at org.bob.broid.misipcc.InitActivity.onCreate(InitActivity.java:17) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ExceptionInInitializerError at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72) at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84) at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59) ... 18 more Caused by: java.lang.NoSuchFieldError: org.apache.http.message.BasicLineFormatter.INSTANCE at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52) at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56) at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46) at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72) at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84) at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59) at org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:128) at org.apache.http.impl.conn.BasicHttpClientConnectionManager.<init>(BasicHttpClientConnectionManager.java:142) at org.bob.broid.misipcc.util.NetUtil.getHttpClient(NetUtil.java:54) at org.bob.broid.misipcc.util.NetUtil.doGet(NetUtil.java:75) at org.bob.broid.misipcc.InitActivity.onCreate(InitActivity.java:17) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) at android.app.ActivityThread.access$2300(ActivityThread.java:125) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521)

    Users with the same issue

    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    9 more bugmates