Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEOS-11702] GeoFence: major libs update #8254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

etj
Copy link
Member

@etj etj commented Feb 4, 2025

Update many libs according to GeoFence 3.8

Major points:

  • update of hibernate / hibernate spatial
  • use of an H2 version not compatible with other plugins and previous geofence version. This part has been documented in the revised doc pages (installation/migrations).

GeoFence 3.8 SNAPSHOT is not merged into geofence/main yet, but has been already built and deployed in the osgeo maven repo.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

@etj etj requested review from aaime and afabiani February 4, 2025 11:53
@etj etj self-assigned this Feb 4, 2025
@etj
Copy link
Member Author

etj commented Feb 7, 2025

There's a single error when compiling with JDK21:

Java 21 (65) is not supported by the current version of Byte Buddy which officially supports Java 20 (64) - update Byte Buddy or set net.bytebuddy.experimental as a VM property

Byte Buddy is used by hibernate instead of javaassist since version 5.3CR2 (where long ago javassist replaced cglib)


#. Extract the files in this archive to the :file:`WEB-INF/lib` directory of your GeoServer installation.

.. warning:: this plugin will install a version of the `H2 <http://www.h2database.com>`__ library that **is not compatible**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would indicate that it's also safe to remove (it is, right?), in other words, that it's possible to use GeoFence with NetCDF/Grib provided the H2 v2 database is removed and the rule storage is moved to an external database.

I see it's written down in the same page, but some careless user might not read to the end, better to inform them now and indicate there are instructions later in the page.

@@ -1073,6 +1073,14 @@
<artifactId>gs-geofence-server</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Older versions of h2 fail in drop/create tables -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needed? The dependency towards gs-geofence-server should be enough, it's already declared as a dependency there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without it, mvn will usee the 1.1 version :|


<!-- Older versions of h2 fails in drop/create tables -->
<!-- This version may break netcdf/grib modules -->
<!-- Please do consider using a postgis backend instead -->
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we shoud have a profile to enable/disable this dependency.
Use case, starting GeoServer during development with both geofence and netcdf, with this setup it would be impossible...

@aaime
Copy link
Member

aaime commented Feb 7, 2025

Looks like we have a legit failure under Java 21:

2025-02-04T15:09:34.6500839Z WARNING: Dynamic loading of agents will be disallowed by default in a future release
2025-02-04T15:09:35.1389246Z 15:09:35,138 [ERROR] Tests run: 4, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.992 s <<< FAILURE! - in org.geoserver.geofence.server.internal.SecurityContextUserResolverTest
2025-02-04T15:09:35.1394297Z 15:09:35,139 [ERROR] getRoles(org.geoserver.geofence.server.internal.SecurityContextUserResolverTest)  Time elapsed: 0.838 s  <<< ERROR!
2025-02-04T15:09:35.1395473Z org.mockito.exceptions.base.MockitoException: 
2025-02-04T15:09:35.1396042Z 

while not yet officially supported, we're keeping the entire GeoServer working under Java 21 too.

Saw your comment about it only now. At a minimum, disable the test under Java 21, the builds must be all green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants