File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Getting NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Getting NullPointerException" Watch "Getting NullPointerException" New topic
Author

Getting NullPointerException

Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
can anyone explain why am getting such an error in this code


exception is

This message was edited 2 times. Last update was at by Devaka Cooray



Do What You Wanna Be....Taking Things The Way They Come
scjp 1.6 91 percent, scmad 90 percent(rounded off to nearest integer)
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2114

Howdy, Ted!

Champion, where exactly are you getting the exception? Is it in line 8 of the code above?


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
yes....
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 13408


What is the value of url that is passed into the method?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
i did print the stream in the next line...it is giving a valid name everytime i run the program....
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
You're not getting the exception there, the exception is happening where the stack trace says it is: inside that other library.
 
 
subject: Getting NullPointerException
 
developer file tools