[gdal-dev] Java bindings RuntimeException

Sascha Alexander Jopen jopen at informatik.uni-bonn.de
Sun Jul 26 06:23:48 EDT 2009


Hello,

i had to replace the gdal libraries and java bindings for an existing
application. I use the current svn trunk revision. But now i get a
RuntimeException whenever i try to use gdal.Open():

Exception in thread "main" java.lang.RuntimeException
	at org.gdal.gdal.MajorObject.<init>(MajorObject.java:17)
	at org.gdal.gdal.Dataset.<init>(Dataset.java:15)
	at org.gdal.gdal.gdal.Open(gdal.java:527)
	at gui.trackingGUI.openAndProcessOptionsDialog(trackingGUI.java:877)

This basically means, that the constructor MajorObject() receives a null
pointer as its cPtr argument. The inherited class' Dataset constructors
cPtr is non-null, however. So gdalJNI.SWIGDatasetUpcast(cPtr) produces
this null pointer. I can not debug this method, because it is executing
JNI native code.
The method in question is defined in gdal_wrap.cpp, and i can't see, why a
non-null pointer cast results in a null pointer.

Maybe some knows how to solve this problem or can me give some hints on
further debugging.

Thanks in advance,
Sascha Jopen



More information about the gdal-dev mailing list