Most voted "nullpointerexception" questions
Use this tag when the question refers to some information or problem relating exclusively to Nullpointerexception. An exception of type Nullpointerexception, is thrown by Java when an application tries to access an object but its reference is null.
Learn more…201 questions
Sort by count of
-
0
votes0
answers54
viewsHow do I identify where the flaws that Google Analytics returns occur?
I am receiving by Google Analytics the following flaws: NullPointerException (@ViewGroup:dispatchDraw:2879) {main} NullPointerException (@ViewGroup:dispatchDraw:2859) {main} But I don’t know how to…
-
0
votes2
answers758
viewsNullpointerexception error when using JSF EL
When I add this line of code to my XHTML page: <f:param name="pedido" value="#{pedido.id}"/> It generates this error: jun 04, 2015 10:59:42 AM…
-
0
votes1
answer54
viewsNullpointerexception error with class composition
I have a class called Users, which has as attribute an array of type Sensors protected Sensors sensors[10]; It also has the setDescription method public void setDescription (int ind, String…
-
0
votes1
answer78
viewsNullpointexception to set value from Converter
I have an application where I need to calculate data from a certain relationship. When usuarioController.view == 3, is defined as a Login for Usuario and a Plano (already persisted) to Login so that…
-
0
votes0
answers171
viewsException 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 console flaw: Exception in thread "AWT-EventQueue-0"…
-
0
votes1
answer4030
viewsjava.lang.Nullpointerexception: Attempt to invoke virtual method on a null Object Reference
I’m trying to enter some values in the bank, but you’re always giving exception. My class that inserts in the bank: private String email; private int codigo; private Button btnOkay; private Button…
-
0
votes2
answers160
viewsNullpointerexception when creating a View on Android
I’m creating a Activity on Android, whose code is here, and I’m getting a NullPointerException near the line final TextView txtResult = new TextView(this); I got the following dump from the stack:…
-
0
votes1
answer57
viewsMy list still has Tail and head as null
It was all going well until I noticed that the list is not filled out, leaving my head and Tail as null. Supposedly the program should read from an input file and fill in the list within a cycle.…
-
0
votes1
answer248
viewsCrash when implementing tabs and swipeable views
I’m starting in android development and want to put tabs with swipeable views, I followed a tutorial from Androidhive why of google tutorial It didn’t make any sense to me. The point is that after…
-
0
votes1
answer822
views"FATAL EXCEPTION: main java.lang.Nullpointerexception" error on android
My code is so private void makeJsonArryReq() { showProgressDialog(); JsonArrayRequest req = new JsonArrayRequest(Const.URL_JSON_ARRAY, new Response.Listener<JSONArray>() { @Override public…
-
0
votes1
answer2188
viewsException in thread "main" java.lang.Nullpointerexception
How do I fix this mistake? Java - Exception in thread "main" java.lang.Nullpointerexception at Client.Customer Registration(Client.java:43) at Operations.main(Operations.java:9) Follows my code:…
-
0
votes1
answer46
viewsNullpointerexception when query in Sqlite
I have a problem that is seriously damaging the development of my application. It aims to draw a question (not implemented yet, I’m using a fixed value for the question id) through a query in…
-
0
votes2
answers194
viewsNullpointerexception error using Boolean type
I’m having problems again with this project, the application runs normally opens the screen to register and everything, but when you click on the button to save it simply closes the app, but the…
-
0
votes1
answer470
viewsNullpointerexception Selectonemenu [JSF + PRIMEFACES]
On a JSF page about a car shop, I first select the brand of the car and then choose the model. However, when selecting an item from the first "Hyundai" menu, it gives NullPointerException and I…
-
0
votes1
answer140
viewsError to popular jtable with database
I have to make a client registration application in JAVA, I am using eclipse. The problem is in the method listarCli(), because when I comment on this method the error does not appear. The error is:…
-
0
votes1
answer405
viewsHow to declare and instantiate a Double vector?
I’m trying to fill a Double vector with 1’s, but I don’t know how to declare and instantiate the variable. double betaParcial[] = null; // 'linha' seria o tamanho do vetor, e pode assumir qualquer…
-
0
votes1
answer66
viewsError to play search screen data for registration screen for editing
Gentlemen, I’m having a hard time getting the objs from my customer search screen, and playing it on the sign-up screen for editing it. My search screen is with a button with a <p:button…
-
0
votes1
answer57
views"Nullpointerexception" error is null
I have created a student and teacher registration program. You have a List option as well. However, when I go to register the teacher he gives the following error "Exception in thread "main"…
-
0
votes2
answers109
viewsNullpointerexception on Android
I have a problem listing the photos in the folder DCIM on Android. It gives loop error for, launching a java.lang.NullPointerException? What can it be? See the code that I get the information from…
-
0
votes1
answer66
viewsNullpointerexception on a non-null object
I’m doing a small project for graduation, in it I want to create a new character that has name, sex and class, I’m testing the program and it’s giving a very strange error. Here’s the code: //…
-
0
votes1
answer84
viewsJava Nullpointerexeption, agenda inserts no compromise
I have a project for the college, a simple schedule, no graphic parts or database. There are four classes: Contact, Commitment, Schedule and Test. In the Contact and Commitment classes we have only…
-
0
votes0
answers94
viewsException in thread "main" java.lang.Nullpointerexception after it runs the first time
exercicio02.CaracterSort.buscarJogador(CaracterSort.java:116) at exercicio02.CaracterSort.cadastro(CaracterSort.java:110) at exercicio02.CaracterSort.main(CaracterSort.java:39) When I run the code…
-
0
votes1
answer56
viewsNullpointer Exception during registration using MVC standard
I have a ready-made application that was created procedural, but for learning purposes I decided to reprogram it using object orientation and the MVC standard. During the registration of a publisher…
-
0
votes1
answer167
viewsFAB + Nullpointerexception button
I suppose it’s a simple problem, but I can’t visualize the solution. I created a floating button (FAB) in a Fragment on Android, and when trying to configure Clicklistener, I get a Nullpointer…
-
0
votes1
answer78
viewsError trying to post a php page through Android Studio
Error 03 - 12 18: 44: 46.688 23858 - 23891 / com.natanielsoares.eceller E / AndroidRuntime: FATAL EXCEPTION: AsyncTask #3 Process: com.natanielsoares.eceller, PID: 23858 java.lang.RuntimeException:…
-
0
votes1
answer68
viewsData acquisition by Jtable
I’m trying to get JButtonGuardar(panelInserir) pass user input(local time text) of the JPanelInserir to the JPanelEventos(where is Jtable) At the moment, I am not succeeding, if you have any…
-
0
votes2
answers923
viewsjava.lang.Nullpointerexception: Attempt to read from field 'java.lang.String
I am trying to implement a stack(database),the problem is that I am not able to send my data to the other Activitys of my application, so when I open another Activity to check if the data is…
-
0
votes1
answer2503
viewsjava.lang.Runtimeexception: Unable to instantiate Activity Componentinfo
I am running the project on my mobile phone, however it presents the following exception error: java.lang.Runtimeexception: Unable to instantiate Activity Componentinfo Mainactivity: public class…
-
0
votes1
answer139
viewsNullpointerexception error when calling a method
public void addFormaPagamento() { btnAdd.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { boolean isInsertForma = dbApp.insertFormaPagamento(…
-
0
votes1
answer679
viewsjava.lang.Nullpointerexception error on android application
In this code occurs the cited error, pointing to the method CarregarTelaPrincipal(). Why is it happening? package com.example.usuario.myapp; import android.app.Activity; import…
-
0
votes0
answers77
viewsWhen trying to get the user id saved in sharedPreferences, sometimes it returns null
When logging into the app, I save your data to Sharedpreferences using GSON (to save the API response with id, name, email, etc). The problem is that when starting the app, I check if the Model User…
-
0
votes1
answer1780
viewserror :Exception in thread "main" java.lang.Nullpointerexception
I’m trying to set an attribute that’s a vector, and it’s in a class y, but I have a class x, which consists of this class y. At the time I write the code there is no error, but when executing the…
-
0
votes1
answer54
viewsNullpointerexception when comparing two String arrays in java
I have two String matrices and when executing this: if (prod[i][0].equals(temporaria[j][0]) && prod[i][0]!= null && temporaria[j][0]!= null) get Nullpointerexception without at least…
-
0
votes1
answer607
viewsObject reference not defined for an object instance - (objects are not null)
Good afternoon, I do not understand some concepts and I have great doubt regarding this problem, I did some research to try to identify, but without success. I have this code and is returning error…
-
0
votes2
answers232
viewsproblem with java.lang.Nullpointerexception
Well, I’m trying to popular a Jtable with database data, but I have always found the same java.lang.Nullpointerexception Exception. It should work as follows: user clicks the update button and the…
-
0
votes1
answer149
viewsInjected object but is null
I have an object that is injected into my converter : package br.com.pokemax.modelo.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import…
-
0
votes1
answer91
viewsEnum me returning null Pointer
My Enum is returning Null Pointer when re-running this call: System.out.println(DefinicaoSCM.getDefinicaoSCMPorDisciplina(Disciplina.IMPLEMENTACAO)); Implementation: public enum DefinicaoSCM {…
-
0
votes1
answer61
viewsReturning Nullpointer in controller
I have a method in controller which has as its function to make a query in my bank and after returning me only one field of this search, however I am taking nullpointer in the first for that I’m…
-
0
votes1
answer108
viewsJava java.lang.Nullpointerexception in a Jpanel constructor
I’m trying to compile a memory game in java, but gives the following error: Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:217) at…
-
0
votes1
answer61
viewsnullException when setting database data as parameter
I am trying to bring the database data with this method of my DAO class: public List<Transacoes> listDBPF(){ Connection con = new ConnectionFactory().getConnection(); ResultSet res;…
-
0
votes1
answer641
viewsAttempt to invoke virtual method android.database.sqlite.SQLiteDatabase.rawQuery(java.lang.String, java.lang.String[])' null Object Reference
Okay, I’m new to Android and I’m developing a somewhat complex application for a course completion. At the moment the problem is to display a listview with information from a local database…
-
0
votes2
answers508
viewsHow to check if a String is null and add in an array?
I have a problem, I have several variables (String) with the following names: textTransferd1, textTransferd2 to 73 (textTransferO73). At certain times the variable textTransferd2 for example may…
-
0
votes1
answer62
viewsNull.point.Exception when executing another class method
I’m running this code: execution class package aloiexecv2; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; /** * * @author root */ public class…
-
0
votes1
answer1002
viewsUnable to start Activity Componentinfo{}: java.lang.Nullpointerexception
I’m having difficulty finding the solution to this problem, in the code I want to go from Activity "Mainactivity" to "Plantalist", but when testing the application in the virtual machine the app…
-
0
votes3
answers58
viewsNullreferenceexception error in Join
I created a Join in LINQ to create a List: (from p in listaProcedimento join pd in oListaprocedimentodetalhe on p.codigo equals pd.codigoProcedimento into pd1 from pd2 in pd1.DefaultIfEmpty() select…
-
0
votes0
answers57
viewsSystem.Nullreferenceexception
There is a webservice that I need to create which needs to have some particularities, among them, the information of Soapaction (as below). However, when I put and will debug I already get the error…
-
0
votes1
answer282
viewsAttempt to invoke virtual method 'long Contactodao.alterar(Contact)' on a null Object Reference
Error: 09-12 14:05:28.662 10410-10410/costamilam.guilherme.contatosempresariais E/AndroidRuntime: FATAL EXCEPTION: main Process: costamilam.guilherme.contatosempresariais, PID: 10410…
-
0
votes1
answer38
viewsProblem with Nullpointerexception
I got a class like this: public class TileRender { private Map mapa; private TileMap tileMap; private Tile[] tiles; private List<ObjectPointMap> objMap; public TileRender(TileMap tileMap, Map…
-
0
votes1
answer95
viewsNullpointerexception in Java web
I’m having a problem in a JSP that should insert a project to my work returning me as an error, this virtually identical an exercise I did earlier, so I don’t understand the reason for the error.…
-
0
votes1
answer177
viewsNullpointerexception when calling method return in another class
I have the following method in the Logincontroller class @RequestMapping(value = "/usuarioEntidade", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST) public Resposta…
java spring spring-mvc spring-boot nullpointerexceptionasked 7 years, 1 month ago Eduardo Krakhecke 935