Welcome to the BEAM Forum!

We encourage you to sign in our forum and participate in the BEAM community. The forum is maintained by the BEAM project team who will most likely answer your questions within 24 hours (except during common holidays) - if not done by other community members. Collaborate, share your knowledge and learn from other users!

If you don't find what you are looking for, please also consider the following external forums:

Combination View Flat View Tree View
Threads [ Previous | Next ]
Java Null point exception error
toggle
Dear Team

I could open a .hdf file (~136 Memoticon in BEAM but while I try reopening the file once again I get an error message.
I use Windows-7 32 bit.

Please find a screen shot.
Cheers,
tamoghna
Attachment

Attachments: error message.png (97.4k)
Flag Flag
RE: Java Null point exception error
2/1/13 9:04 AM as a reply to TAMOGHNA ACHARYYA.
Hello Tamoghna,

could you run VISAT from the command line, please.
Open a command prompt an go to the 'bin' folder of the BEAM installation directory.
Then run the following command: visat-d.bat > log.txt 2>&1
VISAT will open and then try to open the file which causes the error. Then close VISAT again.
Now you have a log.txt file in the 'bin' folder. Please attach it here.
Maybe I can see some reason for the problem in the log-file.

best wishes
Marco
Flag Flag
RE: Java Null point exception error
2/1/13 1:46 PM as a reply to Marco Peters.
Hi Macro Peters,


Frankly I never ran command prompt before emoticon
Can you please suggest how to go to the 'bin' folder of the BEAM installation directory
through command prompt.

Meanwhile I am trying by myself by doing some research.

Cheers,

tamoghna
Flag Flag
RE: Java Null point exception error
2/1/13 2:57 PM as a reply to Marco Peters.
OK, no problem. It seems that you called the script from the wrong place.
You just have to go one directory deeper.
Type cd bin
In the end you should be at: C:\Program Files\beam-4.10.3\bin.
here you should be able to call the command.

Cheers
Marco
Flag Flag
RE: Java Null point exception error
2/1/13 4:19 PM as a reply to Marco Peters.
Hi,

Please find the log file.

Thanks for your help emoticon

Cheers,
tamoghna
Attachments: logfile.txt (23.7k)
Flag Flag
RE: Java Null point exception error
2/6/13 1:44 PM as a reply to TAMOGHNA ACHARYYA.
The problem originates from the seadas-reader module we use. I've informed the developer of the module. They will show up here within the next days.

regards
Marco
Flag Flag
RE: Java Null point exception error
2/6/13 5:50 PM as a reply to Marco Peters.
Hi Macro,

thanks for your feed back emoticon

Looking forward to get the solution.

Cheers,
tamoghna
Flag Flag
RE: Java Null point exception error
2/7/13 8:02 PM as a reply to TAMOGHNA ACHARYYA.
tamoghna,

I grabbed the file that the logs show you were opening (O2_31MAR2012_002_009_GAN_L1B_ST_S.hdf) and was unable to replicate the error you reported. The file is being opened by the generic netCDF reader, not the seadas reader (although Marco is correct in pointing out that the seadas reader was identified in the logs as being the culprit - I'm just not sure how...). Were you opening other files during the session where the re-opening of the OCM2 L1B file failed?

(BTW, now that I've realized there wasn't a specific reader for these files, we will create one for it in the next release of SeaDAS.)

Regards,
Sean
Flag Flag
RE: Java Null point exception error
2/8/13 4:46 PM as a reply to Sean Bailey.
Tamoghna,

I had also another look into this problem. I was able to reproduce the NullPointerException when using the open dialog of VISAT and slected as file type SeaDAS Browse Products. This is probably because the reader is not intended for this format.
BEAM has no special reader for OCM2 data. You can open it by selecting File->Import Raster Data->NetCDF (Generic) from the menu.
The product which shows up in VISAT has a bit strange band names (the group names remain).
There is also no geo-coding by default. You can attach it by selecting Tools->Attache Pixel GeoCoding from the menu.
Simply accept the defaults.

When working with this data it might be good to increase the memory VISAT is allowed to use. I've explained how to do it in the second post of this thread. (Unfortunately the link does not jump correctly to the post)

best wishes
Marco
Flag Flag
RE: Java Null point exception error
2/10/13 10:34 PM as a reply to Sean Bailey.
Hi Sean,

thanks for your feedback. I am now trying to open the file as netCDF (generic) however it's taking a long time
(the file size being 136 mb). As Macro points out it may be an issue with the memory.

Regards,
tamoghna
Flag Flag
RE: Java Null point exception error
2/10/13 10:44 PM as a reply to Marco Peters.
Hi Macro,

thank you so much for your detailed clarification. yes, now I do not get the null point error however the image file (136 mb) ultimately doesn't open in my system. I notice at the right hand corner there is a progress bar which moves back and forth 14M of 26 M and >> 20M of 26M>> again back to 15M of 20M .

Is it something related to memory and I need to increase it as you pointed out. I went to the bin directory and found the following instruction

" to adjust the maximum memory usage to 512 MB, uncomment the following line:
# -Xmx512m"

Not sure how to do it .

Regards,

tamoghna
Flag Flag
RE: Java Null point exception error
2/11/13 9:19 AM as a reply to TAMOGHNA ACHARYYA.
It is strange that the second value does not go higher than 26MB.
This is definitely not enough memory.

The visat.vmoptions file should like the following by default.
 1# Enter one VM parameter per line
 2# For example, to adjust the maximum memory usage to 512 MB, uncomment the following line:
 3# -Xmx512m
 4# To include another file, uncomment the following line:
 5# -include-options [path to other .vmoption file]
 6-Xmx1024M
 7-Dbeam.home=C:\Program Files\beam\beam-4.10.4-SNAP
 8-Dbeam.splash.image=C:\Program Files\beam\beam-4.10.4-SNAP/bin/splash.png
 9-Dbeam.build.date=20130208


You can change -Xmx1024M to a higher value e.g. -Xmx2000M

regards
Marco
Flag Flag
RE: Java Null point exception error
2/13/13 11:49 AM as a reply to Marco Peters.
Hi Macro,

I am only able to change until -Xmx1500M , not more than that ( it gets blocked).
However, same problem of opening the file remains.

regards,
tamoghna
Flag Flag
RE: Java Null point exception error
2/13/13 2:21 PM as a reply to TAMOGHNA ACHARYYA.
The reason why you can't go higher with the Xmx value is that you are working with a 32Bit PC. Only with a 64Bit system you can use more memory. Sorry, I hadn't this in mind as I wrote the previous post.
But this is not the reason why the second value in the status bar is not going higher than 26MB. This is far from being at the limit. Have your tried to open other data products? Is this value going beyond 26 with these products?
If this will also fail, please reinstall BEAM.

Marco
Flag Flag
RE: Java Null point exception error
10/5/16 7:59 AM as a reply to TAMOGHNA ACHARYYA.
The NullReferenceException is designed as a valid runtime condition that can be thrown and caught in normal program flow. It indicates that you are trying to access member fields, or function types, on an object reference that points to null. That means the reference to an Object which is not initialized.

Johnson
Flag Flag