Questions tagged as 'nullpointerexception'

1
answer

Java Error NullPointerException in construction

main.java package projeto; import java.sql.*; import javax.swing.JOptionPane; import java.sql.Connection; import java.sql.Statement; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql....
asked by 20.05.2018 / 22:27
1
answer

Problems registering for bank

Friends, I have a system to control productivity of each analyst, I am a beginner and I'm starting with JSP and SERVLET + JPA and I have the following scenario: I'm trying to register an analyst with a user (user to access the system for a...
asked by 23.02.2018 / 05:53
1
answer

Error inserting bank data into JTable

I have a problem loading data into a JTable, using BD Derby, the database connection works the most when trying to open the JFrame Cad_Usuarios the error below appears: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at...
asked by 02.10.2017 / 03:42
1
answer

error java.lang.NullPointerException [duplicate]

I have this error and I can not find the problem.    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at windows.WebPage.getUserList (MainPage.java:53) at   windows.TelePrincipal.Show_Users_In_JTable (MainPage.java:...
asked by 17.09.2018 / 22:15
1
answer

Error: System.NullReferenceException: 'Object reference not set to an instance of an object.'

I have the Agenda object class, according to the information below: namespace Teach.Negocio.Models { [Table(name: "Agendas")] public class Agenda { public long Id { get; set; } public virtual Aluno Aluno { get; set;...
asked by 24.06.2018 / 03:06
1
answer

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString ()' on a null object reference

I'm having trouble on line 141, where it says the string is null and points me to the error in this line JSONObject jsonObject = new JSONObject(response.body().toString()); But I am not able to solve, below the code along with logc...
asked by 12.04.2018 / 16:35
3
answers

How to prevent a System.NullReferenceException inside an if [closed]

I'm developing a web application where a photographer does upload of an image. After copying the image, I'm going to scan all the metadata of the image in order to capture some information from the directories (Exif, IPTC, XMP, JFIF, PNG, BM...
asked by 20.07.2017 / 20:28
2
answers

java.lang.NullPointerException

Main class presenting problem in call of method createNewContact and insertCustomer: case 1: cliente = new Cliente(); cliente.setNome(JOptionPane.showInputDialog("Nome: ")); cliente.setCpf(Long.par...
asked by 22.06.2015 / 16:18
1
answer

Help with pointer error in Java

I'm doing a Priority Bank Queue project, I did everything the way I learned, but this is giving some null pointer error that I can not understand, could anyone please help me understand where I'm going wrong? Project link: Java Project...
asked by 27.05.2018 / 00:50
3
answers

Check two negations on an if expression

I'm putting this in: if(!teste.trim().equals("") || (!(teste == null))){ // ...faz algo sem NullPointerException... } But the second clause is not working, which tests if it is not null . I do not know what I'm doing. Later...
asked by 17.08.2016 / 12:37