Bump com.maxmind.db:maxmind-db from 3.2.0 to 4.0.0 in /modules/ingest-geoip
Bumps com.maxmind.db:maxmind-db from 3.2.0 to 4.0.0.
Release notes
Sourced from com.maxmind.db:maxmind-db's releases.
4.0.0
This is a major release with several breaking changes. Please see https://github.com/maxmind/MaxMind-DB-Reader-java/blob/HEAD/UPGRADING.md for detailed migration instructions.
- Java 17 or greater is now required.
- Added support for MaxMind DB files larger than 2GB. The library now uses an internal Buffer abstraction that can handle databases exceeding the 2GB ByteBuffer limit. Files under 2GB continue to use a single ByteBuffer for optimal performance. Requested by nonetallt. GitHub #154. Fixed by Silvano Cerza. GitHub #289.
Metadata.getBuildDate()has been replaced withbuildTime(), which returnsjava.time.Instantinstead ofjava.util.Date. The instant represents the database build time in UTC.DatabaseRecord,Metadata,Network, and internalDecodedValueclasses have been converted to records. The following API changes were made:
DatabaseRecord.getData()andDatabaseRecord.getNetwork()have been replaced with record accessor methodsdata()andnetwork().- Simple getter methods on
Metadata(e.g.,getBinaryFormatMajorVersion(),getDatabaseType(), etc.) have been replaced with their corresponding record accessor methods (e.g.,binaryFormatMajorVersion(),databaseType(), etc.).Network.getNetworkAddress()andNetwork.getPrefixLength()have been replaced with record accessor methodsnetworkAddress()andprefixLength().- Removed the legacy
DatabaseRecord(T, InetAddress, int)constructor; pass aNetworkwhen constructing records manually.- Deserialization improvements:
- If no constructor is annotated with
@MaxMindDbConstructor, records now use their canonical constructor automatically. For non‑record classes with a single public constructor, that constructor is used by default.@MaxMindDbParameterannotations are now optional when parameter names match field names in the database: for records, component names are used; for classes, Java parameter names are used (when compiled with-parameters). Annotations still take precedence when present.- Added
@MaxMindDbIpAddressand@MaxMindDbNetworkannotations to inject the lookup IP address and resulting network into constructors. Annotation metadata is cached per type to avoid repeated reflection overhead.
Changelog
Sourced from com.maxmind.db:maxmind-db's changelog.
4.0.0 (2025-11-10)
This is a major release with several breaking changes. Please see https://github.com/maxmind/MaxMind-DB-Reader-java/blob/main/UPGRADING.md for detailed migration instructions.
- Java 17 or greater is now required.
- Added support for MaxMind DB files larger than 2GB. The library now uses an internal Buffer abstraction that can handle databases exceeding the 2GB ByteBuffer limit. Files under 2GB continue to use a single ByteBuffer for optimal performance. Requested by nonetallt. GitHub #154. Fixed by Silvano Cerza. GitHub #289.
Metadata.getBuildDate()has been replaced withbuildTime(), which returnsjava.time.Instantinstead ofjava.util.Date. The instant represents the database build time in UTC.DatabaseRecord,Metadata,Network, and internalDecodedValueclasses have been converted to records. The following API changes were made:
DatabaseRecord.getData()andDatabaseRecord.getNetwork()have been replaced with record accessor methodsdata()andnetwork().- Simple getter methods on
Metadata(e.g.,getBinaryFormatMajorVersion(),getDatabaseType(), etc.) have been replaced with their corresponding record accessor methods (e.g.,binaryFormatMajorVersion(),databaseType(), etc.).Network.getNetworkAddress()andNetwork.getPrefixLength()have been replaced with record accessor methodsnetworkAddress()andprefixLength().- Removed the legacy
DatabaseRecord(T, InetAddress, int)constructor; pass aNetworkwhen constructing records manually.- Deserialization improvements:
- If no constructor is annotated with
@MaxMindDbConstructor, records now use their canonical constructor automatically. For non‑record classes with a single public constructor, that constructor is used by default.@MaxMindDbParameterannotations are now optional when parameter names match field names in the database: for records, component names are used; for classes, Java parameter names are used (when compiled with-parameters). Annotations still take precedence when present.- Added
@MaxMindDbIpAddressand@MaxMindDbNetworkannotations to inject the lookup IP address and resulting network into constructors. Annotation metadata is cached per type to avoid repeated reflection overhead.
Commits
73d600cPreparing for 4.0.0bad6ed5Prepare documentation for 4.0.0 release0a08799Merge pull request #314 from maxmind/dependabot/maven/org.junit.jupiter-junit...2e12f94Bump org.junit.jupiter:junit-jupiter from 6.0.0 to 6.0.1158a84bMerge pull request #313 from maxmind/greg/eng-323602d85c9Set Dependabot cooldown period to 4 days7d6d8d0Merge pull request #312 from maxmind/dependabot/maven/com.puppycrawl.tools-ch...5ebaf90Bump com.puppycrawl.tools:checkstyle from 12.1.0 to 12.1.11013dc6Merge pull request #309 from maxmind/greg/eng-32301d28478Optimize UINT64/UINT128 decoding to avoid BigInteger allocation- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
:x: Gradle check result for 26173ee203b7dab7deaa932d78bb15c34f25e7e0: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
:x: Gradle check result for 83f2ae820128d780eb645f14f4fab90e59cff25d: FAILURE
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?
Probably need to find replacement classes which were replaced in later version:
java.lang.NoSuchMethodError: 'java.lang.String com.maxmind.db.Metadata.getDatabaseType()'
Putting up a good first issue label in case anyone wants to take a first pass to fix this.
@sandeshkr419 I'd like to work on this. Can you assign me?
Thanks @tigermint - I have assigned this to you.
Once you are able to fix and we are able to merge your changes, I will close this PR in favor of your changes.
@sandeshkr419 I have taken a look at this problem. Below are my finding and things that need to be fixed in order to migrate from 3.2.0 to 4.0.0. I have used this link for your reference. As per the document, .getDatabaseType() has been changed to .databaseType(). Can you please take a look once if possible.
As you can see in the above image we are getting a error in testLazyLoading and testLoadingCustomDatabase in GeoIpProcessorFactoryTests on line 119 in file DatabaseReader.java ( com/maxmind/geoip2/DatabaseReader.java) , which is because of the the function called in line 115 in the DatabaseReader.java ( com/maxmind/geoip2/DatabaseReader.java). This is because the build function getting called on line 165 in IngestGeoIpModulePlugin.java which in turn is getting called on line 155 in file DatabaseReaderLazyLoader.java. I am not able to find a way to resolve the error as DatabaseReader.java in read-only file.
Other errors are also due to the same issue in getDataBaseType() function in com/maxmind/geoip2/DatabaseReader.java.
It seems that until the geoip -> com.maxmind.geoip2:geoip2:4.4.0 dependency is not updated to be compatible with com.maxmind.db:maxmind-db 4.0.0, we will not be able to update it to 4.0.0 from 3.2.0.
Requesting you to please confirm once.
Thanks @MeetPatel2209 for taking a look.
It seems that until the geoip -> com.maxmind.geoip2:geoip2:4.4.0 dependency is not updated to be compatible with com.maxmind.db:maxmind-db 4.0.0, we will not be able to update it to 4.0.0 from 3.2.0.
Is it feasible to upgrade this (com.maxmind.geoip2:geoip2:4.4.0) dependency as well?
Thanks @MeetPatel2209 for taking a look.
It seems that until the geoip -> com.maxmind.geoip2:geoip2:4.4.0 dependency is not updated to be compatible with com.maxmind.db:maxmind-db 4.0.0, we will not be able to update it to 4.0.0 from 3.2.0.
Is it feasible to upgrade this (com.maxmind.geoip2:geoip2:4.4.0) dependency as well?
@sandeshkr419 I took a look at the (com.maxmind.geoip2:geoip2) dependency and saw that the latest version for this is 5.0.0 which was released on 20th November, 2025 which contains support for the com.maxmind.db:maxmind-db 4.0.0 dependency as seen below in the same DatabaseReader.java class. Hence the errors related to DatabaseReader.java and method not defined are no longer occurring.
Same lines of code in DatabaseReader.java are updated as per com.maxmind.db:maxmind-db 4.0.0 ( databaseType()) :
Latest version of com.maxmind.geoip2:geoip2 :
But on using this latest version for both the dependencies, I am facing below errors. It seems that the class AbstractResponse has been removed from package com.maxmind.geoip2.model which causing errors in compilation of the IngestGeoIpModulePlugin.java file. So we might need to refactor the IngestGeoIpModulePlugin.java class to accommodate the newer versions of the dependencies.
Requesting you to take a look.
@sandeshkr419 any action that is required for this issue or some other issue that I can pick up if possible?