Grails

Hibernate Plugin update to 3.4.0, include Entity Manager jar, and download issue

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta3
  • Fix Version/s: 1.2-M2
  • Component/s: Persistence
  • Labels:
    None

Description

There are a couple of non-criteria issues:

in beta 3 and snapshot, the Hibernate plugin always get automatically downloaded from the Internet. it's quite annoying. afaik, there is another issue abt that. I suppose, in the final release it will support non-Hibernate, so there will be a way to make Grails not to do the download.

real issues:
1. The current Hibernate annotations is 3.3.0, the latest is 3.4.0. It's nice to keep it up to date. And for my JPA Plugin, probably the Hibernate Entity Manager 3.4 requires Annotation 3.4. So when the Hibernate plugin snapshot is automatically downloaded, it adds an incompatible hibernate annotation to the classpath and cause startup error.

2. should the hibernate plugin includes: hibernate-entitymanager-3.4.0.jar ? it doesn't affect me too much as i could put the jar in my plugin. Just wonder if the hibernate plugin should contains a full set of Hibernate library so whoever want to use it could just depend on a single plugin. (e.g. for those guys who don't use GORM and JPA Plugin but use Hibernate entity manager directly)

Activity

Hide
Mingfai Ma added a comment -

workaround - manually remove the hibernate plugin:

1. at $projectRoot/application.properties, remove the line of plugins.hibernate

2. under $user_home/.grails/$grailsVersion/projects/$projectName/plugins/

  • delete the grails-hibernate*.zip , if exists
  • delete the hibernate* directory
Show
Mingfai Ma added a comment - workaround - manually remove the hibernate plugin: 1. at $projectRoot/application.properties, remove the line of plugins.hibernate 2. under $user_home/.grails/$grailsVersion/projects/$projectName/plugins/
  • delete the grails-hibernate*.zip , if exists
  • delete the hibernate* directory
Hide
Graeme Rocher added a comment -

Why can't you just do this?:

grails uninstall-plugin hibernate

Show
Graeme Rocher added a comment - Why can't you just do this?: grails uninstall-plugin hibernate
Hide
Mingfai Ma added a comment -

yes, i know it. I actually have documented to ask ppl to run "grails uninstall-plugin hibernate" if hibernate plugin is installed. And reference to this note only if "grails uninstall-plugin hibernate" results as error.

For full command line usage, i think there is not problem. but the uninstall-plugin could easily fail if any file is locked in any way. e.g. by a text editor that lock a file. In Intellij IDEA, if i remember it correctly, i need to close the IDE in order to uninstall if the app has been started once. Given there are exceptional cases, it's better to doc the raw approach about deleting files.

With IDEA's latest patch (from its JIRA, not even in any release), even a upgrade during installation will get error.

You currently already have a version of the plugin installed [hibernate-1.1-beta3]. Do you want to upgrade this version? (y, n)
y

Error installing plugin: Unable to delete file C:\Users\mingfai.ma\.grails\1.1-beta3\projects\temp\plugins\hibernate-1.1-beta3\lib\dom4j-1.6.1.jar: Unable to delete file C:\Users\mingfai.ma\.grails\1.1-beta3\projects\temp\plugins\hibernate-1.1-beta3\lib\dom4j-1.6.1.jar

these are not issue with Grails at all. (maybe grails could improve its error message when there is error during uninstall.)

Show
Mingfai Ma added a comment - yes, i know it. I actually have documented to ask ppl to run "grails uninstall-plugin hibernate" if hibernate plugin is installed. And reference to this note only if "grails uninstall-plugin hibernate" results as error. For full command line usage, i think there is not problem. but the uninstall-plugin could easily fail if any file is locked in any way. e.g. by a text editor that lock a file. In Intellij IDEA, if i remember it correctly, i need to close the IDE in order to uninstall if the app has been started once. Given there are exceptional cases, it's better to doc the raw approach about deleting files. With IDEA's latest patch (from its JIRA, not even in any release), even a upgrade during installation will get error.
You currently already have a version of the plugin installed [hibernate-1.1-beta3]. Do you want to upgrade this version? (y, n)
y

Error installing plugin: Unable to delete file C:\Users\mingfai.ma\.grails\1.1-beta3\projects\temp\plugins\hibernate-1.1-beta3\lib\dom4j-1.6.1.jar: Unable to delete file C:\Users\mingfai.ma\.grails\1.1-beta3\projects\temp\plugins\hibernate-1.1-beta3\lib\dom4j-1.6.1.jar
these are not issue with Grails at all. (maybe grails could improve its error message when there is error during uninstall.)
Hide
Graeme Rocher added a comment -

this was fixed in 1.2-M2 although we wont' be included entity manager jars

Show
Graeme Rocher added a comment - this was fixed in 1.2-M2 although we wont' be included entity manager jars
Hide
Ian Robinson added a comment -

Just downloaded 1.2-M2 and the hibernate jars in the plugin still seem to be 3.3.0

Show
Ian Robinson added a comment - Just downloaded 1.2-M2 and the hibernate jars in the plugin still seem to be 3.3.0

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: