This started out as a user issue but I think I have gone pretty far down the
rabbit hole and I have a few questions that I wonder if someone on this
mailing list could answer.
Goal: Deploy the GeoServer war including the GDAL plugin on WebLogic 12.1.3
on RHEL7.
Initially, I was able to get this setup working on Windows using the
binaries from ImageIO-ext. The instructions were pretty clear and things
worked after a day or so of figuring things out. It was when I moved to
deploying onto a RHEL7 server that I started having issues. ImageIO-ext also
does not provide binaries for RHEL7 so I was taking a gamble. Once GDAL and
the java bindings installed, booting up GeoServer gave me errors like this
one for all the GDAL types.
java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.SWIGDriverUpcast(J)J
at org.gdal.gdal.gdalJNI.SWIGDriverUpcast(Native Method)
at org.gdal.gdal.Driver.<init>(Driver.java:15)
at org.gdal.gdal.gdal.GetDriverByName(gdal.java:264)
In the log, there was also a record of the GDAL version being detected and
it never threw the "no gdaljni in java.library.path" so I could assume that
the JNI detection was working but there was a different link failing. Of
course, there is some hindsight in my email here and I spent way more time
than I wanted to on this issue. After digging and learning more about what
SWIG was doing to wrap GDAL and all the jar dependencies from ImageIO-ext I
finally ran across that SWIG 2 was installed and that there was a major
change between 1.x and 2.x versions, particularly in the class signatures
created by the java.swg template.
swig-1.3.40/Lib/java/java.swg
PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
super($imclassname.SWIG$javaclassnameUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
swig-2.0.0/Lib/java/java.swg
PTRCTOR_VISIBILITY $javaclassname(long cPtr, boolean cMemoryOwn) {
super($imclassname.$javaclazznameSWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
Notice that they changed the order of the SWIG Upcast method which resulted
in the java class have an incorrect signature. (I have no idea why a
underscore got in there.) The error from above is looking for a method that
does not exist.
protected Driver(long cPtr, boolean cMemoryOwn) {
super(gdalJNI.Driver_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
The end result was that I uninstalled SWIG 2.x and ended up building SWIG
1.3.40 from source. SWIG 1.x couldn't even figure out the RHEL7 host name. I
have no idea what other things might not work. Finally, I was able to get
the GDAL image types detected in the GeoServer stores with SWIG 1.3.40 and
GDAL 2.1.0. Even though I found the source for ImageIO-ext on github, they
include libraries where the source is not available, or at least I couldn't
find it. ImageIO-ext doesn't seem to be upgraded for SWIG 2.x or 3.x. For
example, the dependency imageio-ext-gdal-bindings seems pretty important but
it is stuck at GDAL 1.9.2 and most likely still on the old SWIG api.
https://github.com/geosolutions-it/imageio-ext/search?utf8=%E2%9C%93&q=imageio-ext-gdal-bindings
So, where do I go with my questions? It doesn't seem like I could even patch
this on my own because of hidden libraries. I have no idea if all the
features will even work on RHEL7 because I can't even trust the linking. Is
there a reason why everything is stuck on old libraries and old OS? Is this
the right board for these kind of issues? If not, what would be?
Thanks for reading,
Brian
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/GDAL-on-RHEL7-questions-tp5270708.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel