Questions tagged [nullpointerexception]

The Java exception thrown when an application attempts to use null in a case where an object is required.

3,732 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12votes
0answers
6kviews

I got runtime exceptions in my android studio:"Fail to get file list and NullPointerException" after adding MultiDex

I add dependency implementation 'com.android.support:multidex:1.0.3' and defaultconfig multiDexEnabled = true In my app gradle file, now my build apk processed successfully but when I run the ...
user avatar
12votes
0answers
1kviews

App crashes when trying to establish VPN connection?

According to the doc VpnService.prepare(context) is used to establish a VPN connection in android, and it's doing the trick in almost all device models except specific ones ( Oppo X9076 Android 5.0 ). ...
user avatar
  • 1,737
12votes
4answers
4kviews

Getting Instrumentation run failed due to 'java.lang.NullPointerException'

I am trying to write Unit test cases for Activities in my app by extending the test class with ActivityUnitTestCase. I could successfully run the test cases earlier but now I'm always getting the ...
user avatar
  • 2,153
11votes
0answers
2kviews

NullPointerException in android.app.ActivityThread.handleStopActivity

So there is bug that keeps coming up with out anything in the trace related to me, here is a sample trace: java.lang.NullPointerException at android.app.ActivityThread.handleStopActivity(...
user avatar
  • 13.1k
10votes
1answer
1kviews

NullPointerException in HardwareRenderer

I wish I had more information about this error but I just don't. I have a tool called BugSense(Now it is Splunk MINT) that sends crashes to a remote server and this is all I'm getting: java.lang....
user avatar
  • 6,684
9votes
2answers
4kviews

An internal error occurred during: "Refreshing Process Information". java.lang.NullPointerException

Whenever I create a folder under WebContent in Eclipse Luna, this pops up even though the folder gets created. The message is: Problem Occured 'Refreshing Process Information' has ...
user avatar
9votes
2answers
1kviews

Issue retrieving ConnectivityManager in a device with multi sim

I am having an issue getting ConnectivityManager: ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); I am using the application ...
user avatar
8votes
1answer
2kviews

java.lang.NullPointerException for gradle of android studio project

I am getting java.lang.NullPointerException . I have changed build.gradle in app level gradle . My build .gradle is as follows : apply plugin: 'com.android.application' apply from: "../../../...
user avatar
8votes
1answer
2kviews

Hadoop: NullPointerException when redirecting to job history server

I have a Hadoop cluster (HDP 2.1). Everything has been working for a long time, but suddenly jobs have started to return the following recurrent error: 16/10/13 16:21:11 INFO Configuration....
user avatar
  • 3,690
8votes
3answers
988views

getMetaData() throws internal NullPointerException

Calling getMetaData() on a component in ColdFusion 10 seems to randomly throw an internal NullPointerException. While this exception is neither exposed nor affects the actual request (and thus is not ...
user avatar
  • 7,469
8votes
0answers
2kviews

IabHelper Android bug (NullPointerException) launchPurchaseFlow?

I am using the last version files of in-app billing from Google. Today I got an error in my phone when I download the app (I tried to repeat the steps but the error doesn't appear anymore). Let's say ...
user avatar
  • 3,563
8votes
1answer
26kviews

RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.NullPointerException

I am trying to validate a user record from my database using Spring Framework, RESTful Web Services and Jersey Implementation. I am using MySQL v5.6.0, Eclipse Galileo, Apache tomcat v6.0 ...
user avatar
7votes
2answers
2kviews

Spring Amqp internal NullPointerException on RabbitTemplate convertAndSend

I randomically experience a NullPointerException while trying to publish a message using RabbitTemplate.convertAndSend I tried both spring-amqp:1.7.6 and spring-amqp:1.7.8 and this should be the ...
user avatar
  • 1,261
7votes
1answer
2kviews

NullPointerException related to FragmentManager.popBackStack. How to resolve?

I have an Android app where I have an activity and a stack of fragments. Using Crashlytics, I have received a single instance of the following Exception: Fatal Exception: java.lang....
user avatar
  • 11.4k
7votes
0answers
2kviews

NullPointerException: int android.support.v4.app.FragmentManagerImpl.mCurState null object reference

I've updated my app with Android L and i have this exception i can't understand: NullPointerException: Attempt to read from field 'int android.support.v4.app.FragmentManagerImpl.mCurState' on a null ...
user avatar
  • 911
6votes
0answers
3kviews

Android react native java null pointer exception

My large react-native application crashes sometimes with following error. java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.uimanager.ReactShadowNode....
user avatar
6votes
1answer
438views

NullPointerException when getting extra from intent on receiver. Only on Huawei devices

I found on my bugtracker strange NullPointerException in my app. The interresting part is that it only occurs on Huawei devices (Honor 7 and P8 Lite). So I ran a little test code to check if this is ...
user avatar
  • 1,030
6votes
2answers
208views

Box.COM integration with an android app-OAuthActivity-Nullpointerexception?

I am integrating BOX.COM with my android application.So I am using BoxAndroidLibraryV2 and BoxJavaLibraryV2 with my application. I could run the sample android application BoxSDKSample. So I copied ...
user avatar
  • 917
6votes
1answer
4kviews

java.lang.RuntimeException: Failure delivering result ResultInfo while logging using Facebook

My application is working fine on emulator. So I decided to run my application on my Android phone. I am trying to login to Facebook account using my application and it works fine on emulator. And as ...
user avatar
  • 21.9k
6votes
0answers
4kviews

Spring data repository @Autowiring is null when using @Transactional annotation on service bean

I am studying spring framework and trying to use it in my project. But I have came across the following problem with spring data repository and @Transactional annotation used in my service. The ...
user avatar
  • 61
6votes
1answer
1kviews

TimePicker NullPointerException on ICS

Alright so I just switched my TimePickerDialog to a TimePicker widget directly visible in the Activity I'm working on because of customer demand. The problem is when I press any of the arrows on said ...
user avatar
5votes
1answer
956views

While selecting video from gallery giving Invalid column latitude error in Android 10 pixel 2

>select video from gallery Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI); startActivityForResult(...
user avatar
5votes
1answer
2kviews

Null reference used for synchronization (monitor-enter)

When I turn off my Internet connection and log out from Firebase app, I can't return my app. Also get next error: 2019-11-05 20:26:19.364 5593-5611/com.mandarine.target_list E/System: Uncaught ...
user avatar
  • 3,887
5votes
0answers
588views

Logback 2.0 at android give NullPointerException when I'm running unit tests

I moved to logback 2.0. When I'm running unit tests (using @Test), all the tests work well. However they give an error: Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported exception:...
user avatar
5votes
1answer
293views

NullPointerException on ViewDragHelper.getTouchSlop()

I have an issue, a strange one that i cannot replicate but i see the issue exists on a lot of users. The crash is caught in Crashlitycs. The issue is: Fatal Exception: java.lang....
user avatar
5votes
3answers
5kviews

Android - NullPointerException Attempt to invoke virtual method 'com.google.android.gms.tasks.Task

Trying to set up a simple app that uses Firebase Auth to handle Registration/Login of a user. This issue is quite confusing as the outcome is different on my physical testing device (HTC M8 7.1.1) and ...
user avatar
  • 127
5votes
1answer
940views

android.widget.Editor: NullPointerException in SpannableStringInternal

I am receiving error reports in Crashlytics for NPEs in SpannableStringInternal but could not reproduce the issue on any phone or determine the source of it. I'm calling for the Internet to help me ...
user avatar
  • 15.2k
5votes
0answers
2kviews

Expected a Map while deserializing, but got a class java.lang.Long

I have been getting this error "Expected a Map while deserializing, but got a class java.lang.Long" while i use firebase database. I looked up some question the same problem on stackoverflow but didn'...
user avatar
  • 1,955
5votes
0answers
474views

Java WebStart occasional NPE since 1.8_031

We have a signed Java app that is distributed to clients with Java WebStart, but since 1.8_031 we sometimes see an NPE. With Java 1.8_031 or earlier the app always worked. The same machine can ...
user avatar
5votes
1answer
379views

Inserting an image blob into MySQL - NullPointerException

I'm working on a database application in which I'm inserting images into a database. I'm storing the InputStreams in the database as a BLOB, and I am having issues retrieving them and setting them to ...
user avatar
5votes
2answers
2kviews

Android: NullPointerException on webview

Does anyone have this problem? I am not quite understand how to fix it. Not sure is that my code cause this exception or a bug on a webview. java.lang.NullPointerException at android.webkit....
user avatar
  • 7,693
5votes
1answer
1kviews

first attempts at creating Application Project result in java.lang.NullPointerException error

I have downloaded the ADT bundle (yesterday), unzipped it, opened Eclipse and followed the directions from http://developer.android.com/sdk/installing/bundle.html to set it up. I then followed the ...
user avatar
5votes
1answer
2kviews

Unpredictable behaviour caused by PackageManager.DONT_KILL_APP

The API docs of PackageManager.DONT_KILL_APP say: Be careful when you set this since changing component states can make the containing application's behavior unpredictable. Unfortunately they don'...
user avatar
  • 1,218
5votes
1answer
751views

android 4.0.3 ScrollingTabContainerView NullPointerException

Our Android Application randomly crashes (very hard to repro the issue) with the following stack trace . This is seen when the orientation of the device is changed from portrait to landscape from the ...
user avatar
4votes
0answers
287views

android throws nullpointerexception at service.startForeground in production

I'm having this weird exception in production reported by Crashlytics in few users... I don't have really much information so i wasnt't able to reproduce it but i will paste everything crashlytics ...
user avatar
  • 2,655
4votes
1answer
376views

Kotlin and Spring boot, transient properties not initialized properly

I am using spring boot with a DDD application, in which each aggregate root entity has a transient field called events, which are not persisted in database: @MappedSuperclass abstract class ...
user avatar
4votes
0answers
513views

Is there any reason to get NullPointerException when closing a foreground service?

Background On a large app, that is very popular, I've noticed that when we close a foreground service, on a very specific group of devices (OnePlus devices: 6, 6T,A6000 and a few others) and Android ...
user avatar
4votes
2answers
404views

Android setContentView(View) throws NullPointerException related to appcompat-7 library

I've been developing Android apps for a long time and I've faced with many problems which were resolved at the end of day, but in my last project I have a really weird problem which is related to ...
user avatar
  • 299
4votes
1answer
2kviews

scala.MatchError: [abc,cde,null,3] (of class org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema) in Spark JSON with missing fields

I have as JSON input file: {"a": "abc", "b": "bcd", "d": 3}, {"a": "ezx", "b": "hdg", "c": "ssa"}, ... some fields per object are missing instead of placing the null value. In Apache Spark using ...
user avatar
4votes
1answer
2kviews

android DialogFragment mDialog is null cause exception

I am developing android card game, and i am using DialogFragment where I render some images and tell the player to take action against opponent. the following piece of code gets executed many times ...
user avatar
4votes
0answers
173views

Does Java execute code sequentially within a single thread?

my code looks like the following: SomeType first = null; if(true){ first = new SomeType(); } first.setSomething(); In this case I will receive a NullPointerException at the last line at runtime, ...
user avatar
  • 399
4votes
0answers
535views

An exception in MouseInfo.getPointerInfo().getLocation()

I Use JavaFX and Swing in my GUI app. More detailed, I use SwingNode on top of AnchorPane to add a JPanel, and some map on it (ARCGIS JMap - that runs only on swing), that refreshes itself all the ...
user avatar
  • 190
4votes
0answers
399views

Spark and Hive interoperability

I am using EMR-4.3.0, Spark 1.6.0, Hive 1.0.0. I write a table like so (pseudocode) - val df = <a dataframe> df.registerTempTable("temptable") sqlContext.setConf("hive.exec....
user avatar
4votes
0answers
295views

NullPointerException in CMUSphinx

I have written a small program to generate SRT files for a given Audio using CMUSphinx. The program worked fine for all but one audio, where I am getting a NullPointerException, after two of the ...
user avatar
4votes
0answers
1kviews

Android nullpointerexception in ActionBarDrawerToggle.syncState()

I launched my app a few days ago and I can sometimes force a crash by leaving the app with the back button and then opening it a few hours later. It doesn't always do this, in fact it's completely ...
user avatar
  • 121
4votes
2answers
521views

NullPointerException when attempting to pass string array from one class to another

In my Android app, there are some strings that I need to use in two different places in my app. So I wrote a class from which I can get these strings. When I try to call the return method from the ...
user avatar
  • 1,093
4votes
0answers
1kviews

An internal error occurred during: "Android Library Update". java.lang.NullPointerException

I have just installed the following setup for mobile development with Cocos2d and encountered the following error, almost every time I restarted Eclipse: "An internal error occurred during: "Android ...
user avatar
  • 41
4votes
0answers
889views

item.getIcon() ALWAYS NULL

I stumbled upon this tutorial about in-app notifications on the ActionBar. http://www.jmhend.me/layerdrawable-menuitems All I get is NullPointer inside android.graphics.drawable.LayerDrawable when ...
user avatar
  • 331
4votes
1answer
2kviews

Files.createTempDirectory("") throws NullPointerException

When I call Files.createTempDirectory("") I get the below exception: java.lang.NullPointerException at sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(WindowsSecurityDescriptor.java:353) at sun....
user avatar
  • 41
4votes
1answer
662views

Android internal NPE in ViewGroup dispatchAttachedToWindow

Does anyone knows how to solve the following bug ? java.lang.NullPointerException at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2434) at android.view.ViewGroup....
user avatar
  • 1,072

15 30 50 per page
1
2 3 4 5
75