【问题标题】:Spring Roo Database.properties fileSpring Roo Database.properties 文件
【发布时间】:2011-04-14 20:46:42
【问题描述】:

您好,我无法在 spring roo 项目中连接到数据库。我的错误是错误 org.hibernate.util.JDBCExceptionReporter - 没有选择数据库

org.hibernate.exception.GenericJDBCException: could not execute query;
nested exception is javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: could not execute query

我的 Database.properties 文件

database.password=test@
database.url=jdbc\:mysql\://yahoo.com:3306
database.username=arv_aaa    
database.schemaNames=ar@1
database.driverClassName=com.mysql.jdbc.Driver

【问题讨论】:

  • @user506129:请检查我所做的编辑。 database.url 看起来很奇怪

标签: hibernate spring-roo


【解决方案1】:

只需修改以下行:

database.url=jdbc\:mysql\://yahoo.com:3306

并通过以下方式添加一些数据库:

database.url=jdbc\:mysql\://yahoo.com:3306/mydb

希望这会有所帮助!

【讨论】:

  • 问题已解决 我使用的是 mysql 服务器 IP 而不是 url。现在可以了,谢谢
猜你喜欢
  • 1970-01-01
  • 2012-10-12
  • 2012-03-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多