Red Hat

In Relation To Releases

In Relation To Releases

Hibernate OGM 5.1 Final is out

Posted by    |       |    Tagged as Hibernate OGM Releases

I’m happy to announce the latest stable release of Hibernate OGM: Hibernate OGM 5.1 Final

Compared to the latest candidate release, there are not many changes. You can have a look at the 5.1.0.Final changelog to get all the details.

What’s new compared to 5.0 Final?

I’m glad you asked, this version:

If you need to upgrade from a version before 5.1, you can find help on the migration notes.

Does it work with WildFly 10?

Yes, it does.

However, WildFly 10 ships with Hibernate ORM 5.0 and there are a couple of configuration steps to make it work. The easiest way is to download the WildFly modules for Hibernate ORM and Hibernate OGM ; unpack them in the modules folder of your WildFly base directory and set the following property in your persistence.xml:

<property name="jboss.as.jpa.providerModule" value="org.hibernate:5.1"/>

If you are still confused about the process, we explain it with more details in the paragraph 4.5.1. Packaging Hibernate OGM applications for WildFly 10 of the documentation.

Where can I get it?

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.1.0.Final

and these are the backends currently available for 5.1.0.Final:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.1.0.Final

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.1.0.Final

  • Infinispan

    • Embedded: org.hibernate.ogm:hibernate-ogm-infinispan:5.1.0.Final

    • Remote: org.hibernate.ogm:hibernate-ogm-infinispan-remote:5.1.0.Final

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.1.0.Final

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.1.0.Final

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.1.0.Final

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.1.0.Final

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

One of the focus of the next release will be to improve the features supported by the Hot Rod dialect.

How can I get in touch?

You can find us through the following channels:

We are looking forward to hearing your feedback!

You asked for it, we deliver: Hibernate Search 5.7.0.Final, with support for Hibernate ORM 5.2.8, is out! And of course, like previous versions, it features experimental support for Elasticsearch integration (even with some improvements).

Stuck on an older ORM version? Don’t worry, we also released a bugfix version for 5.6, namely 5.6.1.Final.

Hibernate Search 5.7.0.Final is only compatible with Hibernate ORM 5.2.3 and later. There isn’t any version of Hibernate Search compatible Hibernate ORM 5.2.0 to 5.2.2.

If you need to use Hibernate ORM 5.0.x or 5.1.x and cannot upgrade, please use Hibernate Search 5.6.1.Final.

What’s new on 5.7 since the candidate release?

Below are the main changes since the candidate release.

If you are looking for advice on how to migrate, please refer to the migration guide.

For a full list of changes since 5.7.0.CR1, please see the release notes. For a full list of changes since 5.6.0.Final, please see this list of tickets on our JIRA instance.

General improvements

  • HSEARCH-2574: when it makes sense, you can now repeat Hibernate Search annotations on a single attribute/method. For example, if you want to add two index fields on the same title attribute, you can write:

        @Field(analyzer = @Analyzer(definition = "myAnalyzer")
        @Field(name = "title_sort", analyzer = @Analyzer(definition = "myAnalyzerForSort")
        private String title;

    Thus you don’t have to use the composite annotations (@Fields) anymore. But of course, those are still available.

  • HSEARCH-2588: some methods in the Sort DSL allowed to specify the sort field type explicitly, which was useful when sorting on fields added through custom field bridges. We improved support for MetadataProvidingFieldBridge, so that you now only need to implement this interface on your custom field bridges, and won’t need anything special when using the sort DSL anymore. As a result, the byField(String, SortField.Type) and andByField(String, SortField.Type) methods in the sort DSL have been deprecated.

  • HSEARCH-2587: an NPE could occur when using the Sort DSL to sort on embedded (@IndexedEmbedded) fields; this is now fixed.

  • HSEARCH-2576: unnecessary memory allocations within queries have been removed, resulting in better query throughput.

  • And several improvements for other solutions integrating Hibernate Search, like HSEARCH-2597, HSEARCH-2561, HSEARCH-2418 or HSEARCH-2585.

Elasticsearch-specific improvements

  • HSEARCH-2453: Elasticsearch authentication is now fully implemented: there are dedicated username and password properties so that you don’t need to embed the credentials in the URL anymore.

  • HSEARCH-2593: when using automatic node discovery on Elasticsearch, a scheme (HTTP or HTTPS) cannot be detected automatically for newly discovered nodes; by default it is HTTP. You can now customize this to use HTTPS instead: just add hibernate.search.default.elasticsearch.discovery.default_scheme https to your configuration.

  • HSEARCH-2590: queries using pagination could allocate too much memory in certain circumstances; this is now fixed.

What’s new on 5.6?

5.6.1.Final contains exclusively backported fixes from 5.7. You can see a full list of changes since 5.6.0.Final in the release notes.

What’s next?

We’re now focusing on the next two big improvements:

  • support for Elasticsearch 5 without losing support for Elasticsearch 2 (HSEARCH-2434, HSEARCH-2581). This will be in a 5.8 release.

  • streamlining our APIs, in particular to better fit remote indexing services (like Elasticsearch), but also to support Lucene 6. Due to the breaking changes this requires, we will include these changes in a new major release, Hibernate Search 6.0.

How to get these releases

All versions are available on Hibernate Search’s web site.

Ideally use a tool to fetch it from Maven central; these are the coordinates:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-orm</artifactId>
   <version>5.7.0.Final</version>
</dependency>

To use the experimental Elasticsearch integration you’ll also need:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-elasticsearch</artifactId>
   <version>5.7.0.Final</version>
</dependency>

Downloads from Sourceforge are available as well.

Feedback, issues, ideas?

To get in touch, use the following channels:

Eighth bug-fix release for ORM 5.2

Posted by    |       |    Tagged as Hibernate ORM Releases

The Eighth bug-fix release for Hibernate ORM 5.2 has just been published. It is tagged at https://github.com/hibernate/hibernate-orm/releases/tag/5.2.8

The complete list of changes can be found here (or here for people without a Hibernate Jira account).

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

The release bundles can be obtained from SourceForge or BinTray.

It is not every day that we announce the first release of a new major version of Hibernate Validator. And today is one of those days: the first alpha of Hibernate Validator 6 has just been released.

Hibernate Validator 6 is going to be the Reference Implementation of Bean Validation 2.0. That’s why we coordinated the releases of the first alphas of these two projects.

It is also a playground used to validate future enhancements of the Bean Validation specification so feedback on the subjects presented here is very welcome!

Note that Hibernate Validator 6 requires JDK 8 or above.

What’s new

New group id

First, starting from 6, the new home of Hibernate Validator is org.hibernate.validator (it used to be org.hibernate).

For instance, the Maven coordinates of this version are:

<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>6.0.0.Alpha1</version>
</dependency>

We published relocation artifacts to make the transition more smooth. Examine the output of your build, if you see messages like "[WARNING] The artifact org.hibernate:hibernate-validator:jar:6.0.0.Alpha1 has been relocated to org.hibernate.validator:hibernate-validator:jar:6.0.0.Alpha1", you are still using the old GAV coordinates and should upgrade to the new ones.

Also make sure to not depend on 5.x and 6.x at the same time (as the group ids are different, the dependency resolution algorithm of your build tool fails to detect that these are two versions of the same logical artifact).

Java 8 goodness

As we now target Java 8 and above, we benefit from the language improvements:

  • all Bean Validation and Hibernate Validator constraints can be used in type use context (e.g. List<@NotBlank String>);

  • all the annotations that could be repeated with a List container are now marked @Repeatable.

Implementation of the new features of the spec

Earlier this week, Gunnar presented on the Bean Validation website the new features introduced in Early Draft 1 of Bean Validation 2.0. They are implemented in Hibernate Validator 6.0.0.Alpha1 so you can already play with them and give us your feedback.

Nested type use constraints and nested cascaded validation

There are some things where Hibernate Validator goes beyond the Early Draft 1 of the spec.

Typically, with Hibernate Validator, type use constraints may be used even on nested types. And so may cascaded validation.

public class Order {

        private Map<@NotNull @Valid Product, @Size(min = 1) List<@NotNull @Valid OrderLine>> lines;

}

In the above example, Hibernate Validator is going to:

  • validate the @NotNull constraint on Product;

  • cascade the validation to Products;

  • validate that for a Product, the list of OrderLines contains at least one element;

  • validate that the lists do not contain any null element;

  • cascade the validation to OrderLines.

As mentioned above, the nested part is new in Hibernate Validator and is not part of the spec yet. If you think it should go in, raise your hand and participate to the discussions. Expect some interesting discussions soon on what the nodes of the property path should look like in the case of nested types validation.

Lambda based constraint definition

We started to explore how lambdas could be integrated into Hibernate Validator and the first outcome of it is lambda based constraint definition. Using the programmatic API, you can define a constraint without writing a ConstraintValidator:

HibernateValidatorConfiguration configuration = Validation
    .byProvider( HibernateValidator.class )
    .configure();

ConstraintMapping constraintMapping = configuration.createConstraintMapping();

constraintMapping
    .constraintDefinition( ValidPassengerCount.class )
        .validateType( Bus.class )
            .with( b -> b.getSeatCount() >= b.getPassengers().size() );

Note that the programmatic API is not part of the specification so, for now, this part is specific to our implementation.

Validation of Duration

In Hibernate Validator 6, we are able to validate a lot more java.time classes and Marko recently introduced support for Duration.

Here is an example of what you can do with it:

public class TrainingSession {
    [...]

    @DurationMin(hours = 1, minutes = 30)
    @DurationMax(days = 1, inclusive = false)
    private Duration duration;

    [...]
}

Again, let us know if you think this feature should go into the spec.

Getting 6.0.0.Alpha1

To get the release with Maven, Gradle etc. use the GAV coordinates org.hibernate.validator:{hibernate-validator|hibernate-validator-cdi|hibernate-validator-annotation-processor}:6.0.0.Alpha1. As mentioned earlier, the group id has been changed to org.hibernate.validator.

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

Feedback, issues, ideas?

To get in touch, use the usual channels:

What’s next?

Bean Validation 2.0 and Hibernate Validator 6 are still under active development. We will release new alphas on a regular basis.

Hibernate OGM 5.1 CR 1 is out

Posted by    |       |    Tagged as Hibernate OGM Releases

Good news!

The first candidate release for Hibernate OGM 5.1 is out.

Compared to 5.1 Beta3, this release upgrades Hibernate Search to version 5.5.6.Final and supports MongoDB aggregate operation in native queries.

You can find all the details in the 5.1.0.CR1 changelog.

If you need to upgrade from a version before 5.0, you can find help on the migration notes.

Hibernate Search 5.5.6.Final

Hibernate Search transparently indexes your data and offers fast full-text and geolocation search.

This version supports Elasticsearch.

This means that now you can use Hibernate OGM to do CRUD operations on your favourite NoSQL database while having it also transparently synchronize to an Elasticsearch cluster.

If you are not familiar with Hibernate Search you can find all the details about the latest stable version in the official blog.

Aggregation in MongoDB

MongoDB native queries now support the aggregation operation syntax.

For example, this is now a valid native query:

String nativeQuery = "db.Poem.aggregate(["
                  + "{ '$match': "
                        + "{'$or': ["
                                 + "{'author': { '$regex': 'Oscar.*', '$options': 'i'}}, "
                                 + "{ 'name': { '$regex': 'Po.*'} }"
                        + "]}}, "
                  + "{ '$sort' : { 'name' : -1 } }"
                  + "])";

List<Poem> poems = (List<Poem>) em.createNativeQuery( nativeQuery, Poem.class ).getResultList();

Where can I get it?

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.1.0.CR1

and these are the backends currently available for 5.1.0.CR1:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.1.0.CR1

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.1.0.CR1

  • Infinispan

    • Embedded: org.hibernate.ogm:hibernate-ogm-infinispan:5.1.0.CR1

    • Remote: org.hibernate.ogm:hibernate-ogm-infinispan-remote:5.1.0.CR1

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.1.0.CR1

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.1.0.CR1

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.1.0.CR1

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.1.0.CR1

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

We are going to clean up the documentation and release 5.1 Final.

After that, we will focus on Hibernate OGM 5.2 which will support Hibernate ORM 5.2

How can I get in touch?

You can find us through the following channels:

We are looking forward to hear your feedback!

Hibernate Validator 5.4.0.Final

Posted by    |       |    Tagged as Hibernate Validator Releases

It’s with great pleasure that I announce the final release of Hibernate Validator 5.4.0.

What’s new since 5.4.0.CR1

For those of you following closely this blog, not much to say since 5.4.0.CR1. We fixed a few bugs and polished a few things.

We shod in a small new feature: you can now require a @ScriptAssert constraint violation to be reported on a specific property. In the following example, the constraint violation will be reported on the endDate property rather than at the class level:

@ScriptAssert(lang = "javascript", script = "_this.endDate.after(_this.startDate)", reportOn="endDate")
public class CalendarEvent {

    private Date startDate;
    private Date endDate;

    //...
}

You can find the complete list of all addressed issues in the change log.

New documentation layout

We converted the Hibernate Validator documentation to AsciiDoctor a loooong time ago but we were still using a Docbook output to be able to generate the PDF documentation. AsciiDoctor now has a (still in alpha but already pretty mature) PDF plugin and we decided to take the final step and get rid of our Docbook output.

So our reference documentation now uses a nice AsciiDoctor output and so does our PDF documentation.

We hope you’ll like it. We do!

5.4.0 Retrospective

You might not follow our blog on a regular basis so here is a retrospective of all the good things included in 5.4.0.Final.

JavaMoney support

Hibernate Validator now includes JavaMoney (JSR 354) support. You can use @DecimalMin and @DecimalMax constraints on your MonetaryAmount fields and we also introduced a new @Currency annotation allowing you to constrain the currency used in your MonetaryAmounts.

See our previous blog posts for more information:

This feature was initially contributed by Lukas Niemeier and Willi Schönborn from Zalando. Thanks again.

Annotation processor improvements

A special thank you goes to Marko Bekhta for his work on the annotation processor. Marko invested a lot of time to get the annotation processor on par with the latest Hibernate Validator features. Go validate your constraint definitions at compile time!

WildFly patch

Using WildFly and wanting to use the good things of this new version? We now provide a WildFly patch you can apply on top of your WildFly installation to use 5.4.0.Final.

You can find more information in the 5.4.0.Beta1 release announcement.

And a whole lot of other good things

  • Improvements to the @Email constraint

  • New constraints specific to Polish identification numbers

  • A Ukrainian translation

Getting 5.4.0.Final

To get the release with Maven, Gradle etc. use the GAV coordinates org.hibernate:{hibernate-validator|hibernate-validator-cdi|hibernate-validator-annotation-processor}:5.4.0.Final.

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

Feedback, issues, ideas?

To get in touch, use the usual channels:

What’s next?

Bean Validation 2.0 and Hibernate Validator 6 are under active development. The first alpha will be out in the next few days.

As far as Bean Validation 2.0 is concerned, there are very interesting discussions going on about value extraction which is THE big BV 2.0 feature. Come and join us on Bean Validation website to define the future of Bean Validation.

After a relatively quiet candidate release, we just published Hibernate Search version 5.6.0.Final with experimental Elasticsearch integration, along with 5.7.0.CR1.

Version 5.6.0.Final brings the latest bugfixes for our experimental Elasticsearch integration. This is the version to use with Hibernate ORM versions 5.0 and 5.1.

Version 5.7.0.CR1 brings the exact same changes as 5.6.0.Final, and now features the compatibility with Hibernate ORM version 5.2.7 (but not lower than 5.2.3, see more on this further down).

What’s new on 5.6 since the candidate release?

Below are the main changes since the candidate release.

For a full list of changes since 5.6.0.CR1, please see the release notes. For a full list of changes since 5.5, please see this list of tickets on our JIRA instance.

Common changes

  • HSEARCH-2547: nesting an @IndexedEmbedded with includePaths within an @IndexedEmbedded without an includePaths will now work properly.

  • HSEARCH-2535: @Facet with string encoding will now work properly on multi-valued properties (such as String[] or List<String>).

Elasticsearch-specific changes

  • HSEARCH-2501: the handling of @CalendarBridge.resolution with Elasticsearch was aligned on the one with Lucene: they are now consistent.

  • HSEARCH-2531: with Elasticsearch, index names can now be overridden using configuration properties, just like when using Lucene. Thanks to Cary Yu for reporting the issue!

  • HSEARCH-2519 and HSEARCH-2520: the Elasticsearch VALIDATE and MERGE index management strategies now handle analyzer definitions. This will only affect you if you were using @AnalyzerDef-defined analyzers on entities that are indexed in Elasticsearch. If you are, please be aware that the MERGE strategy may now close/reopen your index automatically during bootstrap! See the reference documentation for more information about the MERGE strategy.

What’s new on 5.7?

The main change in 5.7.0.CR1 since 5.7.0.Beta2 is the upgrade to Hibernate ORM 5.2.7. For a full list of changes, see the release notes.

Please note that Hibernate Search 5.7 now requires Hibernate ORM 5.2.3 onwards, and cannot be used with previous Hibernate ORM versions.

When will 5.7 be released?

5.7 is beginning its candidate release period, meaning that as far as we are concerned, it is already ready. We are giving a last chance for the community to report bugs, and unless we are delayed by major bugs, the actual 5.7.0.Final release should happen in mid-February.

How to get these releases

All versions are available on Hibernate Search’s web site.

Ideally use a tool to fetch it from Maven central; these are the coordinates:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-orm</artifactId>
   <version>5.6.0.Final</version>
</dependency>

Or, for Hibernate Search 5.7:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-orm</artifactId>
   <version>5.7.0.CR1</version>
</dependency>

To use the experimental Elasticsearch integration you’ll also need:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-search-elasticsearch</artifactId>
   <version>5.6.0.Final</version>
</dependency>

Change the version to 5.7.0.CR1 in order to test the Hibernate ORM 5.2 integration.

Downloads from Sourceforge are available as well.

Feedback, issues, ideas?

To get in touch, use the following channels:

Hibernate ORM 5.0.12.Final and 5.1.4.Final released

Posted by    |       |    Tagged as Hibernate ORM Releases
These are the last releases in the 5.0/5.1 series. You will need to migrate to 5.2 for future bugfixes.

Hibernate ORM 5.0.12.Final:

Hibernate ORM 5.1.4.Final:

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

Seventh bug-fix release for ORM 5.2

Posted by    |       |    Tagged as Hibernate ORM Releases

The Seventh bug-fix release for Hibernate ORM 5.2 has just been published. It is tagged at https://github.com/hibernate/hibernate-orm/releases/tag/5.2.7

The complete list of changes can be found here (or here for people without a Hibernate Jira account).

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

The release bundles can be obtained from SourceForge or BinTray.

Hibernate Validator 5.4.0.CR1

Posted by    |       |    Tagged as Hibernate Validator Releases

I am proud to announce the release of Hibernate Validator 5.4.0.CR1. This is a candidate release, please take the time to test it and report any issues you might find so that we can build the best possible 5.4.0.Final.

What’s new

5.4.0.CR1 is a small release built on the shoulders of our previous beta. It contains a couple of nice improvements and bugfixes:

  • We improved the javax.money support with a new annotation @Currency

  • Marko Bekhta finished his work on the annotation processor: we are now on a par with the Hibernate Validator engine features

  • We also fixed a possible overflow issue in java.time validation reported by Stanislav Bashkyrtsev

You can find the complete list of all addressed issues in the change log.

Playing with @Currency

In Beta1, we introduced the ability to validate your Order bean containing a MonetaryAmount property with the @DecimalMin annotation. Starting from CR1, you can also use the @Currency annotation to specify the currencies allowed:

public class Order {

    @NotBlank
    private String name;

    @DecimalMin(value = "0", inclusive = false)
    @Currency("EUR")
    private MonetaryAmount amount;

    public JavaxMoneyOrder(String name, MonetaryAmount amount) {
        this.name = name;
        this.amount = amount;
    }
}

JDK 9 support

As usual, we are working on validating the releases of Hibernate Validator with the latest JDK 9 early access builds.

5.4.0.CR1 is supported on the JDK 9+148 build. However, a blocking issue in JDK 9 prevents it to run on +151. It should be fixed in the next JDK 9 release.

Getting 5.4.0.CR1

To get the release with Maven, Gradle etc. use the GAV coordinates org.hibernate:{hibernate-validator|hibernate-validator-cdi|hibernate-validator-annotation-processor}:5.4.0.CR1.

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

Feedback, issues, ideas?

To get in touch, use the usual channels:

What’s next?

The obvious next step is the 5.4.0.Final release.

As far as Bean Validation 2.0 is concerned, there are very interesting discussions going on about value extraction which is THE big BV 2.0 feature. Come and join us on Bean Validation website to define the future of Bean Validation.

back to top