Questions tagged as 'nullpointerexception'

1
answer

error: Exception in thread "main" java.lang.NullPointerException

I'm trying to give a set an attribute that is a vector, and that is in a y class, however I'm having a x class, which is made up of this y class. At the time I write the code does not give any error, however when I run the...
asked by 14.11.2016 / 18:09
1
answer

Enum returning me null pointer

My Enum is returning Null Pointer when relaying this call: System.out.println(DefinicaoSCM.getDefinicaoSCMPorDisciplina(Disciplina.IMPLEMENTACAO)); Implementation: public enum DefinicaoSCM { DESCONHECIDO(null, "NA", "NA"), IMPLANT...
asked by 25.11.2016 / 18:32
1
answer

NullPointerException when doing query in SQLite

I am having a problem that is greatly undermining the development of my application. It aims to sort out an issue (not implemented yet, I am using a fixed value for the question id) through a query in SQLite, and pass it on to the TextViews. Her...
asked by 05.10.2016 / 19:18
1
answer

Object reference not set to an instance of an object - (objects are not null)

Good afternoon, I do not understand some concepts and I'm in great doubt about this problem, I did some research to try to identify, but without success. I have this code and it is returning error at the time of calling the Log2 method P...
asked by 22.09.2016 / 17:49
0
answers

When trying to get the id of the user saved in sharedPreferences, sometimes it returns null

When I log in to the application, I save your data in SharedPreferences using GSON (to save the API response with id, name, email, etc.). The problem is that when I start the app, I check if the Model User is null. If it is not, it opens the...
asked by 25.08.2016 / 20:43
1
answer

My list continues to have tail and head as null

It was all going well until I noticed that the list is not populated, leaving my head and tail as null. Supposedly the program should read from an input file and fill the list within a cycle. Here is the code in question: package projectosa...
asked by 04.07.2016 / 13:11
1
answer

Java Nullpointerexeption, schedule does not insert appointment

I have a project for college, a simple agenda, with no graphics or database. There are four classes: Contact, Commitment, Schedule and Test. In the Contact and Commitment classes we have only the basic variables and their constructors, getter...
asked by 06.11.2015 / 19:03
1
answer

NullPointException when setting value from Converter

I have an application where I need to calculate data coming from a particular relationship. When usuarioController.view == 3 , Login is set to Usuario and Plano (already persisted) to Login so that in the next...
asked by 08.10.2015 / 02:41
1
answer

FAB + NullPointerException Button

I suppose it's a simple problem, but I can not see the solution. I created a Floating Button (FAB) in a Fragment on Android, and when I try to configure the ClickListener, I get a NullPointer error. Here are the codes: xml: <android.supp...
asked by 01.03.2016 / 18:21
0
answers

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

I'm trying to pass an old code to an MVC standard, but by modifying the methods and creating the new Zoom class, I'm encountering this flaw in the console: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at CONTROL.CAplic...
asked by 25.10.2015 / 02:41