Grails suddenly throws error Could not determine Hibernate dialect for database name

前端 未结 5 1879
执念已碎
执念已碎 2020-12-10 03:37

I was using grails in version 2.2.0 on Ubuntu for some time and everything went good. My application ran fine. I updated my JDK to 1.7.0_25

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 04:43

    If upgrading is an issue I posted a comment on the grails bug for a (non destructive) workaround which at least in my case works with 2.2.1:

    http://jira.grails.org/browse/GRAILS-10183?focusedCommentId=76068&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-76068

    • Download springloaded-core-1.1.3.jar and store it locally (I store it in my source tree so that it gets checked in)
    • Edit grailsw

      #### start of hack to workaround GRAILS-10183 (http://jira.grails.org/browse/GRAILS-10183)
      SPRINGLOADED_CORE_1_1_3="../../local-maven-repo/org/springsource/springloaded/springloaded-core/1.1.3/springloaded-core-1.1.3.jar"
      STARTER_CLASSPATH="$SPRINGLOADED_CORE_1_1_3:wrapper/grails-wrapper-runtime-2.2.1.jar:wrapper:."
      #STARTER_CLASSPATH="wrapper/grails-wrapper-runtime-2.2.1.jar:wrapper:."
      #### end of hack to workaround GRAILS-10183 (http://jira.grails.org/browse/GRAILS-10183)
      

    Now when you use the grails wrapper springloaded core 1.1.3 is first in the classpath and it just works. Since both the jar file and grailsw are checked in with the source tree, anybody who checks it out benefits from the fix which is better than asking everybody to hack their local grails install.

提交回复
热议问题