Questions tagged as 'nullpointerexception'

2
answers

Why of Null Pointer Exception in simple agenda program in Java, and how to configure the function that returns an array of phones

Good evening! I'm having a problem with a college work, which is seemingly simple (though I'm very noob in Java, and I do not know what to do!). I'd like you to help me, I'm getting Null Pointer Exception when calling menu number 3 after crea...
asked by 02.05.2017 / 06:21
2
answers

NullPointException in method not registering

Does anyone know how to solve this nullPointException? In the second method I'm using two comboBox Follows the CustomerID class package DAO; import Beans.ClienteBeans; import Utilitarios.Conexao; import Utilitarios.VerificacadoresEConrreto...
asked by 16.01.2017 / 23:35
1
answer

Fill textview android studio / sql server [closed]

Good malt, I'm not able to populate a textview using a sql server database. Can someone help me? Here's what I have in onCreate: connectionClass = new MainActivity(); text = (TextView) findViewById(R.id.textView4); Connection con = connection...
asked by 20.09.2016 / 22:38
2
answers

Application is returning NullPointerException error despite object being set

Error clicking save new process after assigning data in each field: java.lang.NullPointerException: Attempt to invoke virtual method 'long com.example.alex.levprocess.processos.RepositorioProcesso.salvar(com.example.alex.levprocess.processos.P...
asked by 30.11.2015 / 00:02
2
answers

NullPointerException on a servlet when using DataVoting method

I'm working with a servlet but this is giving% error of% when I use the method of object java.lang.NullPointerException . Here is the code: @Override protected void doGet(HttpServletRequest request, HttpServletResponse response)...
asked by 29.08.2015 / 13:08
1
answer

Error Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById (int)' on a null object reference

I have this error and I can not solve it, it gives every time I run the app. LogCat: 01-15 16:09:03.380 2473-2473/com.prjctt.allan.financeiro E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.prjctt.allan.financeiro, PID: 2473...
asked by 15.01.2015 / 19:29
1
answer

NullPointerException in connection with database

Anyway, I'm getting a nullpointerException so I have no clue how to deal with it, I read the net on and apparently the problem is in uninitialized variables and stuff like that, but I'm sure everything has been initialized here. Servl...
asked by 19.11.2017 / 16:24
1
answer

NullPointerException: Attempt to invoke virtual method

I'm trying to pass information from one Activity to another through the position in the list, but it's giving this nullpointer error. Where do I get the information - Main Activity @Override protected void onListItemClick(Li...
asked by 03.11.2016 / 22:27
1
answer

I can not get some Strings from strings.xml

I want to get a String that is in the strings.xml file, but always gives the following error: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.macave.rastreador/com.macave.rastreador.AjudaActivity}: java.lang.NullP...
asked by 31.12.2016 / 10:40
1
answer

Creating music player application with JLayer

I'm trying to create a Java application that receives a song through JFileChooser and adds that song to a list ( ArrayList<File> ). But when you access the array.getindex(0).getPath() file, the system drops NullPo...
asked by 11.11.2016 / 20:49