Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-07-2012, 03:07 AM   #1
Registered: May 2011
Posts: 520

Rep: Reputation: Disabled
Upload file issue

Does anyone have any ideas that the below errors are happening due to line 59 & 71, for my app by Jdev

public String UploadImage() {

UploadedFile myfile = (UploadedFile)this.getFile();

BindingContext bindingctx = BindingContext.getCurrent();
BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
DCIteratorBinding iter =

Row row = iter.getCurrentRow();
59 row.setAttribute("pict", createBlobDomain(myfile));
61 return null;
62 }
64 private BlobDomain createBlobDomain(UploadedFile file) {
66 InputStream in = null;
67 BlobDomain blobDomain = null;
68 OutputStream out = null;
70 try {
71 in = file.getInputStream();
72 ...

Caused by: java.lang.NullPointerException
at view.backing.UploadImageClass.createBlobDomain(
at view.backing.UploadImageClass.UploadImage(

Many Thanks & Best Regards,
Old 06-08-2012, 03:11 AM   #2
Registered: May 2011
Posts: 520

Original Poster
Rep: Reputation: Disabled
Any advice to this?

Many Thanks & Best Regards,
Old 06-08-2012, 03:13 AM   #3
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,164

Rep: Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345Reputation: 3345
please try to use [code][/code] to keep formatting of your code.

NullPointerException means you tried to use the class file (line 71: file.getInputStream()), but probably it was null. You would need to check if this call UploadedFile myfile = (UploadedFile)this.getFile(); returned valid myfile.

If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SFTP file upload bash script issue. moodah Programming 1 10-07-2010 10:55 PM
Can't upload anything. Maybe a Flash issue? joeyrf Ubuntu 1 02-22-2010 04:58 AM
Upload file to ftp server -vsftp- but can not delete or change the file once uploaded murattas6 Linux - Server 2 06-26-2009 06:00 AM
Redhat ES3 / vsftpd file upload permissions issue c955437 Linux - Software 4 07-19-2007 08:51 AM
Ftp issue can't upload 1jnike Solaris / OpenSolaris 6 05-15-2007 05:40 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration