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

前端 未结 5 1887
执念已碎
执念已碎 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:23

    This is due to a change in 1.7.0_25 which causes a problem when using spring-loaded. It's fixed in Grails 2.2.3, so upgrading to that will fix this. See http://jira.grails.org/browse/GRAILS-10183

    0 讨论(0)
  • 2020-12-10 04:27

    It seems that the problem is related to the version of JDK 7 (openjdk 7u25).

    Alternative is to use Ubuntu PPA for Oracle JDK: https://launchpad.net/~webupd8team/+archive/java

    which worked fine for me and solved the problem.

    0 讨论(0)
  • 2020-12-10 04:34

    Replacing OpenJDK 1.7.x with OpenJDK 1.6.x seems to have solved it for me (Ubuntu 13.04).

    0 讨论(0)
  • 2020-12-10 04:37

    A new install of Grails 2.3.4 on Fedora 18 had the same issue from me. The solution in my case (thanks to the comment from Halil) was to upgrade to JDK 1.7.0_45.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题