I suspect that tomcat is running as a different user than you - so you need to change it for that user. I'd still go for changing the container setup as it is more controlled.
Ian On 23 May 2017 at 14:22, yuchan <a09...@gmail.com> wrote: > Thanks Ian, > > However, we want to deploy this application in other kinds of web > application not only Tomcat so it is really complicated to have to modify > Tomcat. > > I also tried to set LD_LIBRARY_PATH=/usr/lib/java/gdal/:$LD_LIBRARY_PATH > in > ~/.bashrc and then execute it with source ~/.bashrc where I can see the > LIBRARY_PATH environment variable in console, restart Tomcat 7 and it still > shows the error > > Handler dispatch failed; nested exception is java.lang. > UnsatisfiedLinkError: > org.gdal.osr.osrJNI.new_SpatialReference__SWIG_1()J. Please check the log > for the detail error. > > > > -- > View this message in context: http://osgeo-org.1560.x6. > nabble.com/Cannot-load-Java-GDAL-native-library-in-web- > application-with-error-in-link-library-tp5321448p5321455.html > Sent from the GDAL - Dev mailing list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Ian Turton
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev