nullpointerexception

Android App began crashing, I can't explain it

Hi, I was putting the finishing touches on my app today. I created a layout-large main.xml, and a drawable-hdpi for a few of my app's images. That was all working fine, on both the WVGA and HVGA emulators. Then I added a "Help" button, with no associated code, into my menu-key menu. That was also working. I can't remember changing anythi...

Unknown why the NullPointerException is thrown

Hey guys, I'm using a lazy image loader for my ListView with the following code inside getView(): Bitmap cachedImage = asyncImageLoader.loadBitmap(item.getImage(), wallpaperNumber, new ImageCallback() { public void imageLoaded(Bitmap bitmapImage, String wallpaperNumber) { ImageView imageViewByTag = (ImageView) listView....

NullPointerException in a singleton when Tomcat is shutting down

I have apache tomcat 6 installed as a service on my windows xp machine. I have a class which implements ServletContextListener and it initializes a singleton required for the correct flow of the servlets (it does so on contextInitialized). The problem I'm seeing is that when I stop the service in windows (via services.msc) and I still ha...

NullPointer Exception in Java

I am attempting to calculate Z_Scores in Java. However, I am new to programming and Java and cannot seem to figure out what is wrong. I keep getting a null pointer exception. Can anyone enlighten me as to what I am doing wrong. I am getting the exception at line 80 in bold. For whatever reason it doesn't like the object I am using. Here ...

Java NullPointerException when adding to ArrayList

My code is throwing a NullPointerException, even though the object seems to properly exist. public class IrregularPolygon { private ArrayList<Point2D.Double> myPolygon; public void add(Point2D.Double aPoint) { System.out.println(aPoint); // Outputs Point2D.Double[20.0, 10.0] myPolygon.add(aPoint); // NullPointe...

Getting NullPointerException when accessing a variable in a Java class

Hi guys, I have a problem when setting a variable inside a Java class Here is my code This is where I create the instances (IdeaInfo is a class that acts similar to a Struct): IdeaInfo[] IDEAS = new IdeaInfo[100]; String[] TITLES = new String[100]; This is the function that will use those instances: try { while ((line ...

null pointer when app is run in avd

everything was fine until this morning, lol. upon trying to run this app in my avd, i get a null pointer. problem is, i can't find one mention of my code in the logcat. and i've systematically commented out every line of code in my app, to no avail. this tells me that i either have more than one, or that it's not where i'm looking. ...

Is the null always thrown on the topmost line mentioned in the trace?

I'm trying to locate the source of the error in this trace: org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver logException: Handler execution resulted in exception java.lang.NullPointerException at com.wikistart.service.WikiServiceImpl.getWikis(WikiServiceImpl.java:548) at com.wikistart.controller.WikiCont...

java.lang.NullPointerException after second attempt

private void jButtonStiahniActionPerformed(java.awt.event.ActionEvent evt) { //start the Rengine (JRI) String src,symbol1,symbol2 = null,title; REXP exp2; Rengine re = new Rengine(null, false, null); re.eval("library('quantmod')"); if(!boolOanda){ src="...

NullPointerException app loading

When my app loads the following error comes up on some devices. It refers to none of my source files at all! How do I go about fixing this one? java.lang.NullPointerException at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:42) at com.google.android.maps.MapView.onDraw(MapView.java:494) at android.view.View.draw(View.j...

Using JSP with Embedded Jetty 7 in Eclipse IDE, getting LogConfigurationException

I've included all jars the application requires, I'm trying to use Jetty Embedded I have a simple java class with a main method that has the following setup, servlets still work correctly just can't get JSP's to work. All required jars are included, started with basic Jetty jars then added all from the jsp folder. Server server = new ...

Java null pointer exceptions - don't understand why...

Run time error on main method in MovieList.java. I'm not sure my program design is fundamentally very good, but I'd like to know why it crashes. Thanks in advance. package javaPractical.week3; import javax.swing.*; public class Movie { //private attributes private String title; private String movieURL; private String ...

Fixing null pointer exceptions in Java (with ArrayList)

Possible Duplicate: Java null pointer exceptions - don't understand why MOVIE.JAVA package javaPractical.week3; import javax.swing.*; public class Movie { // private attributes private String title; private String movieURL; private String year; private String genre; private String actor; // constructor Movie(String t, Stri...

Safe dereferencing in Python

Groovy has a nice operator for safe dereferencing, which helps to avoid NullPointerExceptions: variable?.method() The method will only be called, if variable is not null. Is there a way to do the same in Python? Or do I have to write if variable: variable.method()? ...