I am trying to use MaxMind GeoIP2 on Google App Engine. Locally it works, but when I deploy it on GAE I get an error because of a restricted class
java.lang.NoClassDefFoundError: java.nio.MappedByteBuffer is a restricted class. Please see the Google App Engine developer's guide for more details.
at java.nio.channels.FileChannel.map(FileChannel.java)
at com.maxmind.db.BufferHolder.<init>(BufferHolder.java:31)
at com.maxmind.db.Reader.<init>(Reader.java:116)
at com.maxmind.geoip2.DatabaseReader.<init>(DatabaseReader.java:39)
at com.maxmind.geoip2.DatabaseReader.<init>(DatabaseReader.java:27)
at com.maxmind.geoip2.DatabaseReader$Builder.build(DatabaseReader.java:133)
Is there any "trick", like using a particular version of GeoIP2, that will not use this error ? I use version 2.7.0 via gradle
compile group: "com.maxmind.geoip2", name: "geoip2", version: "2.7.0"
Anybody tried with legacy version of GeoIP ? Any luck there ? My only aim is to understand how to use this library, if possible, or to find an alternative one that offers the same capability (obtaining ISO code of the country from the IP)