hibernate4-maven-plugin 1.0.5 released!

Today we released the version 1.0.5 of hibernate4-maven-plugin to Central!

This release mainly fixes a NullPointerException-bug, that was introduced in 1.0.4. The NPE was triggered, if a hibernate.properties-file is present and the dialect is specified in that file and not in the plugin configuration. Thanks to Paulo Pires and and everflux, for pointing me at that bug.

But there are also some minor improvements to talk about:

  • Package level annotations are now supported (Thanks to Joachim Van der Auwera for that)
  • Hibernate Core was upgraded to 4.3.7.Final
  • Hibernate Envers was upgraded to 4.3.7.Final
  • Hibernate Validator was upgrades to 5.1.3.Final

The upgrade of Hibernate Validator is a big step, because 5.x supports Bean Validation 1.1 (JSR 349). See the FAQ of hibernate-validator for more details on this.

Because Hibernate Validator 5 requires the Unified Expression Language (EL) in version 2.2 or later, a dependency to javax.el-api:3.0.0 was added. That does the trick for the integration-tests included in the source code of the plugin. But, because I am not using Hibernate Validator in any of my own projects, at the moment, the upgrade may rise some backward compatibility errors, that I am not aware of. If you stumble across any problems, please let me know!

Release notes:

commit ec30af2068f2d12a9acf65474ca1a4cdc1aa7122 Author: Kai Moritz Date: Tue Nov 11 15:28:12 2014 +0100 [maven-release-plugin] prepare for next development iteration commit 18840e3c775584744199d8323eb681b73b98e9c4 Author: Kai Moritz Date: Tue Nov 11 15:27:57 2014 +0100 [maven-release-plugin] prepare release hibernate4-maven-plugin-1.0.5 commit b95416ef16bbaafecb3d40888fe97e70cdd75c77 Author: Kai Moritz Date: Tue Nov 11 15:10:32 2014 +0100 Upgraded hibernate-validator from 4.3.2.Final to 5.1.3.Final Hibernate Validator 5 requires the Unified Expression Language (EL) in version 2.2 or later. Therefore, a dependency to javax.el-api:3.0.0 was added. (Without that, the compilation of some integration-tests fails!) commit ad979a8a82a7701a891a59a183ea4be66672145b Author: Kai Moritz Date: Tue Nov 11 14:32:42 2014 +0100 Upgraded hibernate-core, hibernate-envers, hibernate-validator and maven-core * Upgraded hibernate-core from 4.3.1.Final to 4.3.7.Final * Upgraded hibernate-envers from 4.3.1.Final to 4.3.7.Final * Upgraded hibernate-validator from 4.3.1.Final to 4.3.2.Final * Upgraded maven-core from 3.2.1 to 3.2.3 commit 347236c3cea0f204cefd860c605d9f086e674e8b Author: Kai Moritz Date: Tue Nov 11 14:29:23 2014 +0100 Added FAQ-entry for problem with whitespaces in the path under Windows commit 473c3ef285c19e0f0b85643b67bbd77e06c0b926 Author: Kai Moritz Date: Tue Oct 28 23:37:45 2014 +0100 Explained how to suppress dependency-scanning in documentation Also added a test-case to be sure, that dependency-scanning is skipped, if the parameter "dependencyScanning" is set to "none". commit 74c0dd783b84c90e116f3e7f1c8d6109845ba71f Author: Kai Moritz Date: Mon Oct 27 09:04:48 2014 +0100 Fixed NullPointerException, when dialect is specified in properties-file Also added an integration test-case, that proofed, that the error was solved. commit d27f7af23c82167e873ce143e50ce9d9a65f5e61 Author: Kai Moritz Date: Sun Oct 26 11:16:00 2014 +0100 Renamed an integration-test to test for whitespaces in the filename commit 426d18e689b89f33bf71601becfa465a00067b10 Author: Kai Moritz Date: Sat Oct 25 17:29:41 2014 +0200 Added patch by Joachim Van der Auwera to support package level annotations commit 3a3aeaabdb1841faf5e1bf8d220230597fb22931 Author: Kai Moritz Date: Sat Oct 25 16:52:34 2014 +0200 Integrated integration test provided by Claus Graf (clausgraf@gmail.com) commit 3dd832edbd50b1499ea6d53e4bcd0ad4c79640ed Author: Kai Moritz Date: Mon Jun 2 10:31:13 2014 +0200 [maven-release-plugin] prepare for next development iteration

Comments / Questions

  1. Anna says:

    Hi,
    I’m using as dialect a class which is specified in project where we are using your plugin. Since version 1.4 I’m getting

    Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: myDialect.MySQLServerDialect
    at de.juplo.plugins.hibernate4.ValidationConfiguration.(ValidationConfiguration.java:36)
    at de.juplo.plugins.hibernate4.Hbm2DdlMojo.execute(Hbm2DdlMojo.java:679)

    With version 1.3 everything works fine.

    Could you guys check it please?

    1. Kai Moritz says:

      If you can provide me with some example-code, that generates the error, I would look into it.

  2. yuxh says:

    I tried appfuse 3.5 which intergrate with version 1.0.5 of hibernate4-maven-plugin. when I run >mvn hibernate4:export -X ,I found:
    [DEBUG] Setting dialect [org.hibernate.dialect.Oracle10gDialect]
    [INFO] HHH000227: Running hbm2ddl schema export
    [DEBUG] Import file not found: /import.sql
    [DEBUG]
    drop table app_user cascade constraints

    drop table app_user cascade constraints;
    [ERROR] HHH000389: Unsuccessful: drop table app_user cascade constraints
    [ERROR] ORA-00911: invalid character

    I didnot modify anything,can you help me.thank you

    1. Kai Moritz says:

      Hi yuxh,

      this does not look like a bug in the plugin.

      It looks like there is some invalid data in the table, that stops the drop.

      I would drop the table manually and give it a retry…

  3. Klaus Unger says:

    first things first … thanks for the great plugin!!!

    my colleague and myself have come across some minor issues:

    We do have the following snippets


    @ElementCollection
    @CollectionTable(name = "T2", joinColumns = @JoinColumn(name = "T1_ID", foreignKey = @ForeignKey(name = "FK_T2_TO_T1")))

    It seems, that the ForeignKey annotation embedded in the CollectionTable has no effect.


    @Table(name = "T1", uniqueConstraints=@UniqueConstraint(name="U_REFERENZ", columnNames="REFERENCE"))

    It also seems, that the uniqueConstraint annotation embedded in the table has no effect.

    Are me missing some configuration part, is it by intention or have me spotted a minor glitch?
    Thanks for a short reply.

    Again … thanks for the great plugin
    cheers
    Klaus

    1. Kai Moritz says:

      At the first glance, that does not look like a bug in the plugin.

      Under the hood, the plugin is using the official SchemaExport-Tool from Hibernate (see: the offical Toolset-Guide).

      Try running the export manualy with that tool.
      If the error persists, it is a hibernate-bug and you should ask that guys.
      If not, please contact me again!

Leave a Reply to Anna Cancel reply

Your email address will not be published. Required fields are marked *