Questions tagged as 'nullpointerexception'

1
answer

NullPointerException while reading JSONArray passing String

This is my code, which receives a String in JSON format from the url link When extracting the data, according to this class / method public class JSONDataHandler { public List<String> extractDados(String string) { List<String&...
asked by 27.06.2018 / 16:35
3
answers

JavaFX: Location is required

This is the main code, I'm having problems with FXMLLoader, since I tried several ways and the path is never found. package com.quixada.ufc.fbd.main; import java.util.ArrayList; import com.quixada.ufc.fbd.viewFXController.OnChangeScreen; im...
asked by 10.11.2018 / 15:51
1
answer

NullPointerException error [closed]

   Caused by: java.lang.NullPointerException        at DAO.Database.ScheduleReview (Database.java:184) This error was displayed in my logcat . The method: public boolean verificaSeTemRegistroNaTabela(String tabela){ String...
asked by 17.11.2016 / 19:56
1
answer

NullPointerException when connecting to server

I'm doing a server / client Java program. When I start the server class I get the error    Exception in thread "Thread-0" java.lang.NullPointerException I'll leave the code below to help me solve the problem: public class Servidor imple...
asked by 14.12.2015 / 14:08
1
answer

How to update a TreeView of directories in C #

I have a TreeViewMS component (the one with Multiple Selection) listing the system directories on a Form. I created an event on the Form that when pressed F5, this TreeView will refresh (if some new directory on the system or not). It even...
asked by 25.04.2016 / 16:29
2
answers

How do I access a Fragments ArrayList after a screen rotation?

I was trying to programmatically add to my Activity a list of Fragments that implement some CardViews. These CardViews have some TextViews that I would like to define from my Activity, and in fact it works by setting them in events after the Fra...
asked by 24.01.2015 / 19:28
1
answer

Null pointer exception on a radio button

I'm trying to put two PrimeFaces radio buttons on an xhtml page: <p:selectOneRadio id="fis_jur" layout="custom" value="#{usuario.fis_jur}" required="true"> <f:selectItem itemLabel="Física" itemValue="1"/> <f:selectItem...
asked by 26.11.2014 / 02:11
1
answer

Null pointer with Location Manager

I have the following code which returns NullPointerException in line: lat = location.getLatitude(); private GoogleMap mMap; private String provider; private LocationManager locationManager; @Override protected void onCreate(Bund...
asked by 24.05.2014 / 16:46
4
answers

Object reference not set to an object instance in array

I have a problem. I have to do a rental program where you tell the data of 5 movies, and then the program lists all the information! And it's mandatory to make a class for this! I have already done the class DadosFilme , and instanciei...
asked by 06.09.2018 / 20:26
2
answers

NullPointerException error getting location

I'm making an application that shows the user's coordinates: This works correctly and checks to see if GPS is released: public void verificaGPS(){ if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) !=...
asked by 28.07.2016 / 23:01